From 66bd2423675397defe90b79586d04cbe30dfd282 Mon Sep 17 00:00:00 2001 From: srit Date: Thu, 16 Sep 2010 10:45:45 +0000 Subject: [PATCH] Modified padding for empire --- segmentation/clitkMotionMaskGenericFilter.txx | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/segmentation/clitkMotionMaskGenericFilter.txx b/segmentation/clitkMotionMaskGenericFilter.txx index d2de0d4..0edf047 100755 --- a/segmentation/clitkMotionMaskGenericFilter.txx +++ b/segmentation/clitkMotionMaskGenericFilter.txx @@ -107,10 +107,13 @@ MotionMaskGenericFilter::GetAirImage(typename itk::Image:: typename InternalImageType::IndexType index; while(!it.IsAtEnd()) { index=it.GetIndex(); + + //Pad borders of all dimensions but 2 (cranio-caudal) for (unsigned int i=0; iGetLargestPossibleRegion().GetIndex()[i] - || index[i]==(unsigned int)air->GetLargestPossibleRegion().GetIndex()[i]+ (unsigned int) air->GetLargestPossibleRegion().GetSize()[i]-1)) + if(i==2) + continue; + if(index[i]==air->GetLargestPossibleRegion().GetIndex()[i] + || index[i]==(unsigned int)air->GetLargestPossibleRegion().GetIndex()[i]+ (unsigned int) air->GetLargestPossibleRegion().GetSize()[i]-1) it.Set(1); } ++it; @@ -139,10 +142,13 @@ MotionMaskGenericFilter::GetAirImage(typename itk::Image:: typename InternalImageType::IndexType index; while(!it.IsAtEnd()) { index=it.GetIndex(); + + //Pad borders of all dimensions but 2 (cranio-caudal) for (unsigned int i=0; iGetLargestPossibleRegion().GetIndex()[i] - || index[i]==(unsigned int)air->GetLargestPossibleRegion().GetIndex()[i]+ (unsigned int) air->GetLargestPossibleRegion().GetSize()[i]-1)) + if(i==2) + continue; + if(index[i]==air->GetLargestPossibleRegion().GetIndex()[i] + || index[i]==(unsigned int)air->GetLargestPossibleRegion().GetIndex()[i]+ (unsigned int) air->GetLargestPossibleRegion().GetSize()[i]-1) it.Set(binarizeFilter->GetInsideValue()); } ++it; -- 2.47.1