X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FvvImageReader.txx;h=551f1139691d31eb944a721741a740a18644a3dd;hb=3c408355c0ce7a9927b16e9bd98764c995d10a72;hp=3ef04c6e0487f9b6bcec51e294e4f3075a6032e0;hpb=3f1a99051165ef065b28fdf25b9fdecefdaca4af;p=clitk.git diff --git a/common/vvImageReader.txx b/common/vvImageReader.txx index 3ef04c6..551f113 100644 --- a/common/vvImageReader.txx +++ b/common/vvImageReader.txx @@ -86,6 +86,7 @@ void vvImageReader::UpdateWithDimAndInputPixelType() reader->SetFileName(*i); try { mImage->AddItkImage(reader->GetOutput()); + mImage->ComputeScalarRangeBase(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(filter->GetOutput()); + mImage->ComputeScalarRangeBase(filter->GetOutput()); } catch ( itk::ExceptionObject & err ) { std::cerr << "Error while slicing " << mInputFilenames[0].c_str() << "(slice #" << mSlice << ") " << err << std::endl;