Program: gdcm
Module: $RCSfile: gdcmPixelReadConvert.cxx,v $
Language: C++
- Date: $Date: 2006/06/29 13:27:59 $
- Version: $Revision: 1.112 $
+ 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
#include <mem.h> // for memset
#endif
-namespace gdcm
+namespace GDCM_NAME_SPACE
{
//bool ReadMPEGFile (std::ifstream *fp, char *inputdata, size_t lenght);
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();
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;
}
unsigned int count = 0;
unsigned int frameSize;
unsigned int bitsAllocated = BitsAllocated;
- if(bitsAllocated == 12)
+ //if(bitsAllocated == 12)
+ if(bitsAllocated > 8 && bitsAllocated < 16)
bitsAllocated = 16;
frameSize = XSize*YSize*SamplesPerPixel*bitsAllocated/8;
else
{
RGBSize = RawSize;
+
}
+ RawSize += RawSize%2;
+ RGBSize += RGBSize%2;
}
/// Allocates room for RGB Pixels