]> Creatis software - clitk.git/blobdiff - tools/clitkBinarizeImageGenericFilter.h
Add comment to precise the functionality of the inputs
[clitk.git] / tools / clitkBinarizeImageGenericFilter.h
index 7f6ba4c7c4ecb5b129c6056b00182cb7e9f1f7c8..4a919f5e7f80f51018358d74430159a551806210 100644 (file)
@@ -3,7 +3,7 @@
 
   Authors belong to: 
   - University of LYON              http://www.universite-lyon.fr/
-  - Léon Bérard cancer center       http://oncora1.lyon.fnclcc.fr
+  - Léon Bérard cancer center       http://www.centreleonberard.fr
   - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
 
   This software is distributed WITHOUT ANY WARRANTY; without even
 
   - BSD        See included LICENSE.txt file
   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-======================================================================-====*/
+===========================================================================**/
 
-#ifndef CLITKBINARIZEIMAGEGENERICFILTER_H
-#define CLITKBINARIZEIMAGEGENERICFILTER_H
+#ifndef clitkBinarizeImageGenericFilter_h
+#define clitkBinarizeImageGenericFilter_h
 
 #include "clitkIO.h"
 #include "clitkImageToImageGenericFilter.h"
+#include "clitkBinarizeImage_ggo.h"
 
 //--------------------------------------------------------------------
 namespace clitk 
 {
   
-  template<class args_info_type>
   class ITK_EXPORT BinarizeImageGenericFilter: 
-    public ImageToImageGenericFilter<BinarizeImageGenericFilter<args_info_type> >
+    public ImageToImageGenericFilter<BinarizeImageGenericFilter>
   {
     
   public:
-
-    //--------------------------------------------------------------------
-    BinarizeImageGenericFilter();
-
     //--------------------------------------------------------------------
     typedef BinarizeImageGenericFilter         Self;
     typedef itk::SmartPointer<Self>            Pointer;
     typedef itk::SmartPointer<const Self>      ConstPointer;
+    typedef args_info_clitkBinarizeImage       args_info_type;
    
     //--------------------------------------------------------------------
     // Method for creation through the object factory
@@ -49,26 +46,29 @@ namespace clitk
 
     //--------------------------------------------------------------------
     void SetArgsInfo(const args_info_type & a);
+    void SetPercentage(double p) { mPercentage = p; }
+    double GetPercentage() const { return mPercentage; }
 
     //--------------------------------------------------------------------
     // Main function called each time the filter is updated
     template<class InputImageType>  
     void UpdateWithInputImageType();
 
+    template<class InputImageType>
+    void MaskOfIntegratedIntensity();
+
   protected:
+    BinarizeImageGenericFilter();
     template<unsigned int Dim> void InitializeImageType();
     args_info_type mArgsInfo;
+    double mPercentage;
     
   }; // end class
   //--------------------------------------------------------------------
     
+//Implementation of the pair comparative function
+template <typename T> bool comparator ( const std::pair<T, size_t>& l, const std::pair<T, size_t>& r);
 } // end namespace clitk
 //--------------------------------------------------------------------
 
-//--------------------------------------------------------------------
-#ifndef ITK_MANUAL_INSTANTIATION
-#include "clitkBinarizeImageGenericFilter.txx"
-#endif
-//--------------------------------------------------------------------
-
 #endif // #define clitkBinarizeImageGenericFilter_h