int main(int argc, char* argv[])
{
- if (argc)
+ if (argc<2)
{
std::cerr << "Test::TestReadWriteReadCompare: Usage: " << argv[0]
- << " (no arguments needed)." << std::endl;
+ << " fileToCheck.dcm " << std::endl;
}
std::cout<< "Test::TestReadWriteReadCompare: description " << std::endl;
<< "images " << std::endl
<< " match (as expanded by gdcm)." << std::endl;
- int i = 0;
- while( gdcmDataImages[i] != 0 )
+ //int i = 0;
+ //while( gdcmDataImages[i] != 0 )
{
std::string filename = GDCM_DATA_ROOT;
filename += "/";
- filename += gdcmDataImages[i++];
+ //filename += gdcmDataImages[i++];
+ filename +=argv[1];
std::cout << " Testing: " << filename << std::endl;
- //////////////// Step 1 (see above description):
+ //////////////// Step 1 (see above description):
gdcmHeader *header = new gdcmHeader( filename );
if( !header->IsReadable() )
gdcmFile* file = new gdcmFile( header );
int dataSize = file->GetImageDataSize();
- void* imageData = file->GetImageData(); //EXTREMELY IMPORTANT
+ uint8_t* imageData = file->GetImageData(); //EXTREMELY IMPORTANT
// Sure, it is : It's up to the user to decide if he wants to
// GetImageData or if he wants to GetImageDataRaw
// (even if we do it by setting a flag, he will have to decide)