X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmPixelReadConvert.cxx;h=4762980bfec4f9c847ba73116087da86f54556a1;hb=ef0e08814ac95a5412e8650112e23add221767d1;hp=a80e759c4ebf81c7fac2147e4510bb720933e4dd;hpb=fb1b24ca341425478ec012fbe5a0b908a89306a1;p=gdcm.git diff --git a/src/gdcmPixelReadConvert.cxx b/src/gdcmPixelReadConvert.cxx index a80e759c..4762980b 100644 --- a/src/gdcmPixelReadConvert.cxx +++ b/src/gdcmPixelReadConvert.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmPixelReadConvert.cxx,v $ Language: C++ - Date: $Date: 2006/08/29 15:17:51 $ - Version: $Revision: 1.113 $ + Date: $Date: 2007/07/25 10:35:20 $ + Version: $Revision: 1.116 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -32,7 +32,7 @@ #include // for memset #endif -namespace gdcm +namespace GDCM_NAME_SPACE { //bool ReadMPEGFile (std::ifstream *fp, char *inputdata, size_t lenght); @@ -97,11 +97,11 @@ void PixelReadConvert::GrabInformationsFromFile( File *file, { BitsAllocated = 16; } - else if (BitsAllocated > 8 && BitsAllocated < 16) + + else if (BitsAllocated > 8 && BitsAllocated < 16 && BitsAllocated != 12) { BitsAllocated = 16; } - // Number of "Bits Stored", defaulted to number of "Bits Allocated" // when absent from the file. BitsStored = file->GetBitsStored(); @@ -170,7 +170,7 @@ void PixelReadConvert::GrabInformationsFromFile( File *file, if( IsJPEG2000 = Global::GetTS()->IsJPEG2000(ts) ) break; if( IsMPEG = Global::GetTS()->IsMPEG(ts) ) break; if( IsJPEGLS = Global::GetTS()->IsJPEGLS(ts) ) break; - // DeflatedExplicitVRLittleEndian is considered as 'Unexpected' (we don't know yet haow to process !) + // DeflatedExplicitVRLittleEndian is considered as 'Unexpected' (we don't know yet how to process !) gdcmWarningMacro("Unexpected Transfer Syntax :[" << ts << "]"); break; } @@ -1351,7 +1351,10 @@ void PixelReadConvert::ComputeRawAndRGBSizes() else { RGBSize = RawSize; + } + RawSize += RawSize%2; + RGBSize += RGBSize%2; } /// Allocates room for RGB Pixels