From fce2b7d9927fc3772285801c578851c3da6579f7 Mon Sep 17 00:00:00 2001 From: jpr Date: Thu, 27 Oct 2005 09:07:45 +0000 Subject: [PATCH] To avoid useless warnings --- Example/PrintFile.cxx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Example/PrintFile.cxx b/Example/PrintFile.cxx index be0c80e6..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 15:57:52 $ - Version: $Revision: 1.67 $ + 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 @@ -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(); -- 2.45.1