]> Creatis software - clitk.git/blobdiff - common/vvImageReader.txx
Merge branch 'VTK6_Qt5' into VTK6_Qt5_LineProfile
[clitk.git] / common / vvImageReader.txx
index 3ef04c6e0487f9b6bcec51e294e4f3075a6032e0..551f1139691d31eb944a721741a740a18644a3dd 100644 (file)
@@ -86,6 +86,7 @@ void vvImageReader::UpdateWithDimAndInputPixelType()
       reader->SetFileName(*i);
       try {
         mImage->AddItkImage<InputImageType>(reader->GetOutput());
+        mImage->ComputeScalarRangeBase<InputPixelType, VImageDimension-1>(reader->GetOutput());
       } catch ( itk::ExceptionObject & err ) {
         std::cerr << "Error while reading " << mInputFilenames[0].c_str()
                   << " " << err << std::endl;
@@ -125,6 +126,7 @@ void vvImageReader::UpdateWithDimAndInputPixelType()
 #endif
     try {
       mImage->AddItkImage<SlicedImageType>(filter->GetOutput());
+      mImage->ComputeScalarRangeBase<InputPixelType, VImageDimension-1>(filter->GetOutput());
     } catch ( itk::ExceptionObject & err ) {
       std::cerr << "Error while slicing " << mInputFilenames[0].c_str()
                 << "(slice #" << mSlice << ") " << err << std::endl;