#include <math.h>
int main(int argc, char *argv [])
{
if( argc < 2 ) return 1;
const char *filename = argv[1];
{
std::cerr << "Failed to read: " << filename << std::endl;
return 1;
}
{
}
int dims[2] = {};
{
std::cout << csael << std::endl;
std::cout <<
"Columns:" << el.
GetValue() << std::endl;
}
{
std::cout << csael2 << std::endl;
std::cout <<
"Rows:" << el2.
GetValue() << std::endl;
}
double spacing[2] = { 1. , 1. };
bool spacingfound = false;
{
{
std::cout << csael3 << std::endl;
std::cout <<
"PixelSpacing:" << el3.
GetValue() <<
"," << el3.
GetValue(1) << std::endl;
spacingfound = true;
}
}
if( !spacingfound )
{
std::cerr << "Problem with PixelSpacing" << std::endl;
}
if( !dims[0] || !dims[1] )
{
std::cerr << "Problem with dims" << std::endl;
return 1;
}
std::string outfilename = "outcsa.dcm";
{
std::cerr << "could not write: " << outfilename << std::endl;
return 1;
}
return 0;
}