From: jpr Date: Tue, 3 Jul 2007 08:17:24 +0000 (+0000) Subject: Bug fix for old ACR-NEMA images : X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=b269aed055d3376ab940f59c574bceb1487d2e5b;p=gdcm.git Bug fix for old ACR-NEMA images : When entry 0x0028, 0x0004 (photochromatic interpretation) was missing, IsMonochrome() always said FALSE, even when the was no PALETTE and number of scalar components =1. --- diff --git a/src/gdcmFile.cxx b/src/gdcmFile.cxx index 91a9f8c6..e108dfdb 100644 --- a/src/gdcmFile.cxx +++ b/src/gdcmFile.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmFile.cxx,v $ Language: C++ - Date: $Date: 2007/05/24 10:41:25 $ - Version: $Revision: 1.332 $ + Date: $Date: 2007/07/03 08:17:24 $ + Version: $Revision: 1.333 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -1423,6 +1423,9 @@ bool File::IsMonochrome() { gdcmWarningMacro( "Photometric Interpretation (0028,0004) supposed to be " << "mandatory"); + // to deal with old ACR-NEMA images + if (GetNumberOfScalarComponents() == 1) + return true; } return false; }