X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vtk%2FvtkGdcmReader.cxx;h=5fb33b226fca53838fb756a767a7a003527c62a8;hb=1a11accd11061d63d3c09db7b1445637207e81e4;hp=139623d32626e1a09105180b35f8011271df8928;hpb=a70d6842239569070ae649d20e2db2beb7685bc2;p=gdcm.git diff --git a/vtk/vtkGdcmReader.cxx b/vtk/vtkGdcmReader.cxx index 139623d3..5fb33b22 100644 --- a/vtk/vtkGdcmReader.cxx +++ b/vtk/vtkGdcmReader.cxx @@ -581,7 +581,7 @@ size_t vtkGdcmReader::LoadImageInMemory( size_t size; // If the data structure of vtk for image/volume representation - // were straigthforwards the following would suffice: + // were straigthforwards the following would be enough: // GdcmFile.GetImageDataIntoVector((void*)Dest, size); // But vtk chooses to invert the lines of an image, that is the last // line comes first (for some axis related reasons?). Hence we need @@ -593,6 +593,7 @@ size_t vtkGdcmReader::LoadImageInMemory( int LineSize = NumComponents * NumColumns * GdcmFile.GetHeader()->GetPixelSize(); unsigned char * Source; + if( GdcmFile.GetHeader()->HasLUT() ) { size = GdcmFile.GetImageDataSizeRaw(); @@ -642,7 +643,6 @@ size_t vtkGdcmReader::LoadImageInMemory( } //GetImageData allocate a (void*)malloc, remove it: free(pSource); - return size; }