X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=itk%2FclitkSegmentationUtils.h;h=5ac8c4c51e86c2d7b5345fcefda25ea8ba8b3ec0;hb=299afce0c4c4cc3524dccecf4ecffd46d7a66328;hp=6389ad135c4c3202701b3eaed5c50729d082d365;hpb=7cd9c2d3cbce8c6b4f8847c1553248c7d411a766;p=clitk.git diff --git a/itk/clitkSegmentationUtils.h b/itk/clitkSegmentationUtils.h index 6389ad1..5ac8c4c 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(); } @@ -337,7 +339,16 @@ namespace clitk { std::vector & lB, typename ImageType::PixelType BG, int mainDirection, - double offsetToKeep); + double offsetToKeep, + bool keepIfEqual=false); + template + void + SliceBySliceSetBackgroundFromLineSeparation_pt(ImageType * input, + std::vector & lA, + std::vector & lB, + typename ImageType::PixelType BG, + typename ImageType::PointType offsetToKeep, + bool keepIfEqual=false); //--------------------------------------------------------------------