X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vtk%2FvtkGdcmReader.cxx;h=ea4545a02a57c104cbe938be545d633b254083be;hb=d569212ce5d0577c01b30796b288aafc2ae4fd9d;hp=4b6685e097dba9bd99daca93e90e12845dca8479;hpb=fc845cfade351c5d9cf0aba8684e6a0ab93e9faa;p=gdcm.git diff --git a/vtk/vtkGdcmReader.cxx b/vtk/vtkGdcmReader.cxx index 4b6685e0..ea4545a0 100644 --- a/vtk/vtkGdcmReader.cxx +++ b/vtk/vtkGdcmReader.cxx @@ -63,6 +63,7 @@ vtkGdcmReader::vtkGdcmReader() { this->LookupTable = NULL; + this->AllowLookupTable = 0; } vtkGdcmReader::~vtkGdcmReader() @@ -123,7 +124,6 @@ void vtkGdcmReader::SetFileName(const char *name) // (see vtkGdcmReader::AddFileName), we additionaly need to purge // this list when we manually positionate the filename. vtkDebugMacro("Clearing all files given with AddFileName"); - this->SetFilePattern(""); this->FileNameList.clear(); this->Modified(); } @@ -530,8 +530,9 @@ int vtkGdcmReader::CheckFileCoherence() this->ImageType = type; this->PixelSize = GdcmHeader.GetPixelSize(); - if( GdcmHeader.HasLUT() ) + if( GdcmHeader.HasLUT() && this->AllowLookupTable ) { + // I could raise an error is AllowLookupTable is on and HasLUT() off this->NumComponents = GdcmHeader.GetNumberOfScalarComponentsRaw(); } else @@ -625,7 +626,7 @@ size_t vtkGdcmReader::LoadImageInMemory( unsigned char * Source; - if( GdcmFile.GetHeader()->HasLUT() ) + if( GdcmFile.GetHeader()->HasLUT() && this->AllowLookupTable ) { size = GdcmFile.GetImageDataSizeRaw(); Source = (unsigned char*) GdcmFile.GetImageDataRaw();