X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmFileHelper.cxx;h=50183d7004aa0ab93119013bf7a83d99fd9e1a7d;hb=e51bf0565bbe4c0e269dd941cb4071ebde6012e4;hp=2e84dd276dceef68f0f90b247e6d832c6c4bb3e3;hpb=8faf6abccbd689749fe6ff43676c7850d15312b9;p=gdcm.git diff --git a/src/gdcmFileHelper.cxx b/src/gdcmFileHelper.cxx index 2e84dd27..50183d70 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/11 11:22:59 $ + Version: $Revision: 1.16 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -675,7 +675,7 @@ void FileHelper::SetWriteToRaw() } else { - photInt->SetValue("MONOCHROME1 "); + photInt->SetValue("MONOCHROME2 "); } PixelWriteConverter->SetReadData(PixelReadConverter->GetRaw(), @@ -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); @@ -930,10 +934,12 @@ ValEntry *FileHelper::CopyValEntry(uint16_t group,uint16_t elem) * when it exists. Create it with the given value when unexistant. * @param group Group number of the Entry * @param elem Element number of the Entry + * @param vr Value Representation of the Entry * \return pointer to the modified/created Bin Entry (NULL when creation * failed). */ -BinEntry *FileHelper::CopyBinEntry(uint16_t group,uint16_t elem,const std::string &vr) +BinEntry *FileHelper::CopyBinEntry(uint16_t group,uint16_t elem, + const std::string &vr) { DocEntry *oldE = FileInternal->GetDocEntry(group, elem); BinEntry *newE;