X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Example%2FPrintFile.cxx;h=38237a3ba5be1be9fc2e3ba349e15d3067e4a0ef;hb=33e0626ee829c06cee6f6dda37f7f720c6c9b311;hp=d2291f7aa1269f1d6491d01b34103d933cad21d8;hpb=6b51b22366f878e1050c75a6ebb755bd2ff365c7;p=gdcm.git diff --git a/Example/PrintFile.cxx b/Example/PrintFile.cxx index d2291f7a..38237a3b 100644 --- a/Example/PrintFile.cxx +++ b/Example/PrintFile.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: PrintFile.cxx,v $ Language: C++ - Date: $Date: 2005/10/25 14:52:27 $ - Version: $Revision: 1.66 $ + Date: $Date: 2005/10/27 09:07:45 $ + Version: $Revision: 1.68 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -30,7 +30,7 @@ #include "gdcmOrientation.h" #include -// TODO : code factorization, for 'sigle file' an 'whole directory' processing +// TODO : code factorization, for 'single file' an 'whole directory' processing void ShowLutData(gdcm::File *f); @@ -264,14 +264,18 @@ int main(int argc, char *argv[]) pixelType = f->GetPixelType(); sPP = f->GetSamplesPerPixel(); - planarConfig = f->GetPlanarConfiguration(); + if (sPP == 3) + planarConfig = f->GetPlanarConfiguration(); std::cout << " pixelType= [" << pixelType << "] SamplesPerPixel= [" << sPP - << "] PlanarConfiguration= [" << planarConfig - << "] "<< std::endl - << " PhotometricInterpretation= [" - << f->GetEntryString(0x0028,0x0004) + << "] "; + if (sPP == 3) + std::cout << " PlanarConfiguration= [" << planarConfig + << "] "<< std::endl; + + std::cout << " PhotometricInterpretation= [" + << f->GetEntryString(0x0028,0x0004) << "] "<< std::endl; int numberOfScalarComponents=f->GetNumberOfScalarComponents();