Program: gdcm
Module: $RCSfile: PrintFile.cxx,v $
Language: C++
- Date: $Date: 2005/04/26 16:21:55 $
- Version: $Revision: 1.32 $
+ Date: $Date: 2005/05/04 07:29:17 $
+ Version: $Revision: 1.36 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
if (argc > 3)
gdcm::Debug::DebugOn();
-
+
+ bool res;
if (argc > 4)
- e1->SetLoadMode(NO_SEQ | NO_SHADOW);
- e1->Load( fileName.c_str() );
+ e1->SetLoadMode(NO_SEQ | NO_SHADOW);
- if ( !e1->IsReadable() )
+ // gdcm::File::IsReadable() is no usable here, because we deal with
+ // any kind of gdcm-Parsable *document*
+ // not only gdcm::File (as opposed to gdcm::DicomDir)
+ res = e1->Load( fileName.c_str() );
+ if ( !res )
{
delete e1;
return 0;
std::cout << "\n\n" << std::endl;
std::cout <<std::endl;
- std::cout <<" dataSize " << f1->GetImageDataSize() << std::endl;
+ std::cout <<" dataSize " << f1->GetImageDataSize() << std::endl;
std::cout <<" dataSizeRaw " << f1->GetImageDataRawSize() << std::endl;
int nX,nY,nZ,sPP,planarConfig;
sPP = e1->GetSamplesPerPixel();
planarConfig = e1->GetPlanarConfiguration();
- std::cout << " pixelType= [" << pixelType
+ std::cout << " pixelType= [" << pixelType
<< "] SamplesPerPixel= [" << sPP
<< "] PlanarConfiguration= [" << planarConfig
<< "] "<< std::endl