X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FvvImageReader.txx;h=3a38719c2d4a16eedaed620bccd77ebb3aa58510;hb=503bccefcb47422eb5f6383c4d507fdc56d77ea1;hp=aac9979fc330d265d9f14e7d7b346860cd6ffa5f;hpb=1ad7c9540f99e835a74b7108d9772c60e8bd574f;p=clitk.git diff --git a/common/vvImageReader.txx b/common/vvImageReader.txx index aac9979..3a38719 100644 --- a/common/vvImageReader.txx +++ b/common/vvImageReader.txx @@ -118,6 +118,9 @@ 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()); } catch ( itk::ExceptionObject & err ) { @@ -136,7 +139,12 @@ void vvImageReader::UpdateWithDimAndInputPixelType() try { if (mType == IMAGEWITHTIME) - mImage=vvImageFromITK(reader->GetOutput(),true); + { + std::cerr << "We should never come here:" << std::endl + << " Calling vvImageReader with multiple images and IMAGEWITHTIME is undefined." << std::endl + << " You are probably looking for MERGEDWITHTIME Type." << std::endl; + return; + } else mImage=vvImageFromITK(reader->GetOutput()); } catch ( itk::ExceptionObject & err ) {