X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmFile.cxx;h=8e84268df4ab764a684ab6c9ea1ae541e64ae416;hb=1a11accd11061d63d3c09db7b1445637207e81e4;hp=f802dcb86ae9a4515f136e6c9998d89a8ce73e19;hpb=be70f5cdc8ac472bff8ad8a36637457fe49778bd;p=gdcm.git diff --git a/src/gdcmFile.cxx b/src/gdcmFile.cxx index f802dcb8..8e84268d 100644 --- a/src/gdcmFile.cxx +++ b/src/gdcmFile.cxx @@ -79,7 +79,7 @@ gdcmFile::gdcmFile(std::string & filename) { /** * \ingroup gdcmFile * \brief canonical destructor - * \Note If the gdcmHeader is created by the gdcmFile, it is destroyed + * \note If the gdcmHeader is created by the gdcmFile, it is destroyed * by the gdcmFile */ gdcmFile::~gdcmFile(void) { @@ -196,6 +196,7 @@ void * gdcmFile::GetImageData (void) { PixelData = (void *) malloc(lgrTotale); if (PixelData) GetImageDataIntoVector(PixelData, lgrTotale); + PixelRead=0; // no PixelRaw return(PixelData); } @@ -332,7 +333,7 @@ size_t gdcmFile::GetImageDataIntoVectorRaw (void* destination, size_t MaxSize) { } (void)ReadPixelData(destination); - + // Number of Bits Allocated for storing a Pixel str_nb = Header->GetEntryByNumber(0x0028,0x0100); if (str_nb == GDCM_UNFOUND ) { @@ -378,7 +379,6 @@ size_t gdcmFile::GetImageDataIntoVectorRaw (void* destination, size_t MaxSize) { deb++; } } - // re arange bits inside the bytes if (nbu != nb){ int l = (int)lgrTotale / (nb/8); @@ -772,9 +772,10 @@ if(nb == 16) case 2143: case 4321: - for(i=0;i>8) | ((((unsigned short int*)im)[i])<<8); + } break; default: @@ -788,7 +789,7 @@ if( nb == 32 ) break; case 4321: - for(i=0;i>16; fort= (fort>>8) | (fort<<8); @@ -799,7 +800,7 @@ if( nb == 32 ) break; case 2143: - for(i=0;i>16; fort= (fort>>8) | (fort<<8); @@ -810,7 +811,7 @@ if( nb == 32 ) break; case 3412: - for(i=0;i>16; s32=faible;