From: regrain Date: Wed, 9 Feb 2005 18:35:30 +0000 (+0000) Subject: * src/gdcmFileHelper.cxx : bug fix when having RGB ACR files... there is X-Git-Tag: Version1.0.bp~48 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=c3d9f58d0e2e537cf5359873b188c1fc9c8b9720;p=gdcm.git * src/gdcmFileHelper.cxx : bug fix when having RGB ACR files... there is 24 bits allocated -- BeNours --- diff --git a/src/gdcmFileHelper.cxx b/src/gdcmFileHelper.cxx index 2e84dd27..789ca752 100644 --- a/src/gdcmFileHelper.cxx +++ b/src/gdcmFileHelper.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmFileHelper.cxx,v $ Language: C++ - Date: $Date: 2005/02/09 16:28:41 $ - Version: $Revision: 1.14 $ + Date: $Date: 2005/02/09 18:35:30 $ + Version: $Revision: 1.15 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -684,6 +684,8 @@ void FileHelper::SetWriteToRaw() std::string vr = "OB"; if( FileInternal->GetBitsAllocated()>8 ) vr = "OW"; + if( FileInternal->GetBitsAllocated()==24 ) // For RGB ACR files + vr = "OB"; BinEntry *pixel = CopyBinEntry(GetFile()->GetGrPixel(),GetFile()->GetNumPixel(),vr); pixel->SetValue(GDCM_BINLOADED); @@ -727,6 +729,8 @@ void FileHelper::SetWriteToRGB() std::string vr = "OB"; if( FileInternal->GetBitsAllocated()>8 ) vr = "OW"; + if( FileInternal->GetBitsAllocated()==24 ) // For RGB ACR files + vr = "OB"; BinEntry *pixel = CopyBinEntry(GetFile()->GetGrPixel(),GetFile()->GetNumPixel(),vr); pixel->SetValue(GDCM_BINLOADED);