From: David Sarrut Date: Fri, 3 Feb 2012 06:57:12 +0000 (+0100) Subject: Add border flag to auto crop X-Git-Tag: v1.4.0~263 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=1896e52ab20026702cf834ef229b9567aa43c659;p=clitk.git Add border flag to auto crop --- diff --git a/itk/clitkSegmentationUtils.h b/itk/clitkSegmentationUtils.h index 6389ad1..a63fd28 100644 --- a/itk/clitkSegmentationUtils.h +++ b/itk/clitkSegmentationUtils.h @@ -85,11 +85,13 @@ namespace clitk { template typename ImageType::Pointer AutoCrop(const ImageType * input, - typename ImageType::PixelType BG) { + typename ImageType::PixelType BG, + const bool useBorderFlag=false) { typedef clitk::AutoCropFilter AutoCropFilterType; typename AutoCropFilterType::Pointer autoCropFilter = AutoCropFilterType::New(); autoCropFilter->SetInput(input); autoCropFilter->SetBackgroundValue(BG); + autoCropFilter->SetUseBorder(useBorderFlag); autoCropFilter->Update(); return autoCropFilter->GetOutput(); }