]> Creatis software - clitk.git/blobdiff - itk/clitkSegmentationUtils.h
Compatibility
[clitk.git] / itk / clitkSegmentationUtils.h
index cd1612aa8f513ba371ced207fbd270d6f9f38b92..a63fd284650b9770810c5632be68d826722294ae 100644 (file)
@@ -28,6 +28,7 @@
 // itk
 #include <itkBoundingBox.h>
 #include <itkJoinSeriesImageFilter.h>
+#include <itkChangeInformationImageFilter.h>
 
 /*
   According to 
@@ -84,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();
   }
@@ -130,6 +133,18 @@ namespace clitk {
                                double spacing=-1, 
                                bool autocropflag=true, 
                                bool singleObjectCCL=true);
+  template<class MaskImageType>
+  typename MaskImageType::Pointer
+  SliceBySliceRelativePosition(const MaskImageType * input,
+                              const MaskImageType * object,
+                              int direction, 
+                              double threshold, 
+                              double angle, 
+                               bool inverseflag,
+                               bool uniqueConnectedComponent=false, 
+                               double spacing=-1, 
+                               bool autocropflag=true, 
+                               bool singleObjectCCL=true);
 
   //--------------------------------------------------------------------
   // In a binary image, search for the point belonging to the FG that
@@ -474,7 +489,12 @@ namespace clitk {
                       typename ImageType::PixelType & BG);
   //--------------------------------------------------------------------
   
-
+  //--------------------------------------------------------------------
+  template<class ImageType>
+  typename ImageType::Pointer
+  RemoveNegativeIndexFromRegion(ImageType * input);
+  //--------------------------------------------------------------------
+  
 
 } // end clitk namespace