From b269aed055d3376ab940f59c574bceb1487d2e5b Mon Sep 17 00:00:00 2001 From: jpr Date: Tue, 3 Jul 2007 08:17:24 +0000 Subject: [PATCH] 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. --- src/gdcmFile.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; } -- 2.46.1