]> Creatis software - clitk.git/blobdiff - common/vvImageReader.txx
Merge branch 'master' of git.creatis.insa-lyon.fr:clitk into VTK6_Qt5
[clitk.git] / common / vvImageReader.txx
index 02b2193367dd2d7b3107e286dfccc3d32fc946ee..a797bf465bb9f0c9103aac948bbdab4586e5ba65 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;