]> Creatis software - gdcm.git/blobdiff - Example/PrintFile.cxx
Comments
[gdcm.git] / Example / PrintFile.cxx
index d2291f7aa1269f1d6491d01b34103d933cad21d8..38237a3ba5be1be9fc2e3ba349e15d3067e4a0ef 100644 (file)
@@ -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 <iostream>
 
-// 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();