]> Creatis software - clitk.git/blobdiff - itk/clitkSegmentationUtils.h
Merge branch 'master' into PacsConnection
[clitk.git] / itk / clitkSegmentationUtils.h
index 6389ad135c4c3202701b3eaed5c50729d082d365..5ac8c4c51e86c2d7b5345fcefda25ea8ba8b3ec0 100644 (file)
@@ -85,11 +85,13 @@ namespace clitk {
   template<class ImageType>
   typename ImageType::Pointer
   AutoCrop(const ImageType * input, 
-           typename ImageType::PixelType BG) {
+           typename ImageType::PixelType BG, 
+           const bool useBorderFlag=false) {
     typedef clitk::AutoCropFilter<ImageType> 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<typename ImageType::PointType> & lB, 
                                               typename ImageType::PixelType BG, 
                                               int mainDirection, 
-                                              double offsetToKeep);
+                                              double offsetToKeep, 
+                                              bool keepIfEqual=false);
+  template<class ImageType>
+  void 
+  SliceBySliceSetBackgroundFromLineSeparation_pt(ImageType * input, 
+                                              std::vector<typename ImageType::PointType> & lA, 
+                                              std::vector<typename ImageType::PointType> & lB, 
+                                              typename ImageType::PixelType BG, 
+                                              typename ImageType::PointType offsetToKeep, 
+                                              bool keepIfEqual=false);
   //--------------------------------------------------------------------