From 6046bef473eb16b68831e23d3e014b49f42185c6 Mon Sep 17 00:00:00 2001 From: David Sarrut Date: Fri, 4 Nov 2011 10:24:59 +0100 Subject: [PATCH] To be consistant, crop strictly above (not above or equal) --- itk/clitkSegmentationUtils.txx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/itk/clitkSegmentationUtils.txx b/itk/clitkSegmentationUtils.txx index 8fe69a0..76572b5 100644 --- a/itk/clitkSegmentationUtils.txx +++ b/itk/clitkSegmentationUtils.txx @@ -288,7 +288,7 @@ namespace clitk { sliceRelPosFilter->SetDirection(direction); sliceRelPosFilter->SetFuzzyThreshold(threshold); // sliceRelPosFilter->AddOrientationTypeString(orientation); - sliceRelPosFilter->AddAngles(angle, 0.0); + sliceRelPosFilter->AddAnglesInRad(angle, 0.0); sliceRelPosFilter->SetIntermediateSpacingFlag((spacing != -1)); sliceRelPosFilter->SetIntermediateSpacing(spacing); sliceRelPosFilter->SetUniqueConnectedComponentBySliceFlag(uniqueConnectedComponent); @@ -385,7 +385,11 @@ namespace clitk { typename ImageType::PointType p; image->TransformIndexToPhysicalPoint(image->GetLargestPossibleRegion().GetIndex()+ image->GetLargestPossibleRegion().GetSize(), p); - return CropImageAlongOneAxis(image, dim, max, p[dim], autoCrop, BG); + // Add GetSpacing because remove Lower or equal than + // DD(max); + // DD(p); + // DD(max+image->GetSpacing()[dim]); + return CropImageAlongOneAxis(image, dim, max+image->GetSpacing()[dim], p[dim], autoCrop, BG); } //-------------------------------------------------------------------- -- 2.47.1