]> Creatis software - clitk.git/blobdiff - itk/clitkSliceBySliceRelativePositionFilter.h
Debug RTStruct conversion with empty struc
[clitk.git] / itk / clitkSliceBySliceRelativePositionFilter.h
index e17a759b52fb810095fcc8ef3ee494c590e0ad82..42633a929daf2286a92ff4741308eb5061d699df 100644 (file)
@@ -53,6 +53,7 @@ namespace clitk {
     /** ImageDimension constants */
     itkStaticConstMacro(ImageDimension, unsigned int, ImageType::ImageDimension);
     typedef itk::Image<float, ImageDimension> FloatImageType;
+    typedef itk::Image<float, ImageDimension-1> FloatSliceType;
 
     /** Some convenient typedefs. */
     typedef typename ImageType::ConstPointer ImageConstPointer;
@@ -66,74 +67,62 @@ namespace clitk {
     typedef typename RelPosFilterType::OrientationTypeEnumeration OrientationTypeEnumeration;
     
     /** Input : initial image and object */
-    void SetInput(const ImageType * image);
+    virtual void SetInput(const ImageType * image) ITK_OVERRIDE;
     void SetInputObject(const ImageType * image);
 
     // Options
-    void PrintOptions();
+    void PrintOptions(std::ostream & os = std::cout);
     itkGetConstMacro(Direction, int);
     itkSetMacro(Direction, int);
-    // itkGetConstMacro(ObjectBackgroundValue, PixelType);
-    // itkSetMacro(ObjectBackgroundValue, PixelType);
 
-    // itkSetMacro(OrientationTypeString, std::string);
-    // itkGetConstMacro(OrientationTypeString, std::string);
-
-    // itkGetConstMacro(ResampleBeforeRelativePositionFilter, bool);
-    // itkSetMacro(ResampleBeforeRelativePositionFilter, bool);
-    // itkBooleanMacro(ResampleBeforeRelativePositionFilter);
-
-    // itkGetConstMacro(IntermediateSpacing, double);
-    // itkSetMacro(IntermediateSpacing, double);
-
-    // itkGetConstMacro(FuzzyThreshold, double);
-    // itkSetMacro(FuzzyThreshold, double);
-
-    itkGetConstMacro(UniqueConnectedComponentBySlice, bool);
-    itkSetMacro(UniqueConnectedComponentBySlice, bool);
-    itkBooleanMacro(UniqueConnectedComponentBySlice);
-
-    // itkGetConstMacro(AutoCropFlag, bool);
-    // itkSetMacro(AutoCropFlag, bool);
-    // itkBooleanMacro(AutoCropFlag);
-
-    // itkGetConstMacro(InverseOrientationFlag, bool);
-    // itkSetMacro(InverseOrientationFlag, bool);
-    // itkBooleanMacro(InverseOrientationFlag);
-
-    // itkGetConstMacro(RemoveObjectFlag, bool);
-    // itkSetMacro(RemoveObjectFlag, bool);
-    // itkBooleanMacro(RemoveObjectFlag);
-
-    // itkGetConstMacro(CombineWithOrFlag, bool);
-    // itkSetMacro(CombineWithOrFlag, bool);
-    // itkBooleanMacro(CombineWithOrFlag);
+    itkGetConstMacro(UniqueConnectedComponentBySliceFlag, bool);
+    itkSetMacro(UniqueConnectedComponentBySliceFlag, bool);
+    itkBooleanMacro(UniqueConnectedComponentBySliceFlag);
+
+    itkGetConstMacro(IgnoreEmptySliceObjectFlag, bool);
+    itkSetMacro(IgnoreEmptySliceObjectFlag, bool);
+    itkBooleanMacro(IgnoreEmptySliceObjectFlag);
+
+    itkGetConstMacro(UseTheLargestObjectCCLFlag, bool);
+    itkSetMacro(UseTheLargestObjectCCLFlag, bool);
+    itkBooleanMacro(UseTheLargestObjectCCLFlag);
+
+    itkGetConstMacro(ObjectCCLSelectionFlag, bool);
+    itkSetMacro(ObjectCCLSelectionFlag, bool);
+    itkBooleanMacro(ObjectCCLSelectionFlag);
+    itkGetConstMacro(ObjectCCLSelectionDimension, int);
+    itkSetMacro(ObjectCCLSelectionDimension, int);
+    itkGetConstMacro(ObjectCCLSelectionDirection, int);
+    itkSetMacro(ObjectCCLSelectionDirection, int);
+    itkGetConstMacro(ObjectCCLSelectionIgnoreSingleCCLFlag, bool);
+    itkSetMacro(ObjectCCLSelectionIgnoreSingleCCLFlag, bool);
+    itkBooleanMacro(ObjectCCLSelectionIgnoreSingleCCLFlag);
+
+    itkGetConstMacro(VerboseSlicesFlag, bool);
+    itkSetMacro(VerboseSlicesFlag, bool);
+    itkBooleanMacro(VerboseSlicesFlag);
 
   protected:
     SliceBySliceRelativePositionFilter();
     virtual ~SliceBySliceRelativePositionFilter() {}
     
-    // PixelType m_ObjectBackgroundValue;
-    // OrientationTypeEnumeration m_OrientationType;
-    // std::string m_OrientationTypeString;
-    // double m_IntermediateSpacing;
-    // double m_FuzzyThreshold;
-    // bool m_ResampleBeforeRelativePositionFilter;
-
-    virtual void GenerateOutputInformation();
-    virtual void GenerateInputRequestedRegion();
-    virtual void GenerateData();
+    virtual void GenerateOutputInformation() ITK_OVERRIDE;
+    virtual void GenerateInputRequestedRegion() ITK_OVERRIDE;
+    virtual void GenerateData() ITK_OVERRIDE;
 
     ImagePointer input;
     ImagePointer object;
     ImagePointer m_working_input;
     ImagePointer m_working_object;
-    bool         m_UniqueConnectedComponentBySlice;
+    bool         m_UniqueConnectedComponentBySliceFlag;
     int          m_Direction;
-    // bool m_InverseOrientationFlag;
-    // bool m_RemoveObjectFlag;
-    // bool m_AutoCropFlag;
-    // bool m_CombineWithOrFlag;
+    bool         m_IgnoreEmptySliceObjectFlag;
+    bool         m_UseTheLargestObjectCCLFlag;
+    bool         m_ObjectCCLSelectionFlag;
+    int          m_ObjectCCLSelectionDimension;
+    int          m_ObjectCCLSelectionDirection;
+    bool         m_ObjectCCLSelectionIgnoreSingleCCLFlag;
+    bool         m_VerboseSlicesFlag;
 
   private:
     SliceBySliceRelativePositionFilter(const Self&); //purposely not implemented
@@ -148,5 +137,4 @@ namespace clitk {
 #ifndef ITK_MANUAL_INSTANTIATION
 #include "clitkSliceBySliceRelativePositionFilter.txx"
 #endif
-
 #endif