From: David Sarrut Date: Fri, 3 Feb 2012 06:57:12 +0000 (+0100) Subject: Allow region from a different image type X-Git-Tag: v1.4.0~303 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=3d4b1e6cb67393a306cd670ce0527c4f96b13f4b;p=clitk.git Allow region from a different image type --- diff --git a/itk/clitkCropLikeImageFilter.txx b/itk/clitkCropLikeImageFilter.txx index 519c5fd..6399ec6 100644 --- a/itk/clitkCropLikeImageFilter.txx +++ b/itk/clitkCropLikeImageFilter.txx @@ -269,7 +269,10 @@ clitk::ResizeImageLike(const ImageType * input, { typename ImageType::Pointer output = ImageType::New(); output->CopyInformation(input); - output->SetRegions(region); + typename ImageType::RegionType reg; + reg.SetIndex(region->GetIndex()); + reg.SetSize(region->GetSize()); + output->SetRegions(reg); output->Allocate(); return clitk::ResizeImageLike(input, output, backgroundValue); }