X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FvvImageReader.txx;h=551e42626ba7313a84bb687f2fe8322c78d93962;hb=3d3bfbf73cc928f66626434ad597dc6f32ea0a9d;hp=3ef04c6e0487f9b6bcec51e294e4f3075a6032e0;hpb=259619f9c388b34a9bbb22ace79e9320300f812f;p=clitk.git diff --git a/common/vvImageReader.txx b/common/vvImageReader.txx index 3ef04c6..551e426 100644 --- a/common/vvImageReader.txx +++ b/common/vvImageReader.txx @@ -60,7 +60,7 @@ void vvImageReader::UpdateWithDim(std::string InputPixelType) else std::cerr << "Error, input pixel type : " << InputPixelType << " unknown !" << std::endl; - if (CLITK_EXPERIMENTAL && mLastError.size()==0) { + if (mLastError.size()==0) { //ReadNkiImageTransform(); ReadMatImageTransform(); } @@ -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; @@ -120,11 +121,10 @@ void vvImageReader::UpdateWithDimAndInputPixelType() filter->SetExtractionRegion(extractedRegion); filter->SetInput(reader->GetOutput()); filter->ReleaseDataFlagOn(); -#if ITK_VERSION_MAJOR == 4 filter->SetDirectionCollapseToSubmatrix(); -#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;