From: srit Date: Thu, 16 Sep 2010 10:45:45 +0000 (+0000) Subject: Modified padding for empire X-Git-Tag: v1.2.0~390 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=66bd2423675397defe90b79586d04cbe30dfd282;p=clitk.git Modified padding for empire --- 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;