From 3d4b1e6cb67393a306cd670ce0527c4f96b13f4b Mon Sep 17 00:00:00 2001 From: David Sarrut Date: Fri, 3 Feb 2012 07:57:12 +0100 Subject: [PATCH] Allow region from a different image type --- itk/clitkCropLikeImageFilter.txx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); } -- 2.47.1