]> Creatis software - creaCLI.git/blobdiff - bbtk_Slicer_PKG/src/bbSlicerOtsuThreshold.h
All Slicer modules succesfully compiled into BBTK boxes :P
[creaCLI.git] / bbtk_Slicer_PKG / src / bbSlicerOtsuThreshold.h
diff --git a/bbtk_Slicer_PKG/src/bbSlicerOtsuThreshold.h b/bbtk_Slicer_PKG/src/bbSlicerOtsuThreshold.h
new file mode 100644 (file)
index 0000000..d179f2d
--- /dev/null
@@ -0,0 +1,66 @@
+#ifndef __bbSlicerOtsuThreshold_h_INCLUDED__
+#define __bbSlicerOtsuThreshold_h_INCLUDED__
+
+#include "bbSlicer_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+
+#include <vector>
+#include <cstdlib>
+#include <dlfcn.h>
+#include <sstream>
+#include <fstream>
+#include <iostream>
+
+#include <ModuleDescriptionUtilities.h>
+#include <ModuleDescriptionParser.h>
+#include <ModuleParameterGroup.h>
+#include <ModuleDescription.h>
+#include <ModuleParameter.h>
+
+#include "CreationTool.h"
+
+namespace bbSlicer {
+
+    class bbSlicer_EXPORT OtsuThreshold
+    :
+    public bbtk::AtomicBlackBox {
+        BBTK_BLACK_BOX_INTERFACE ( OtsuThreshold , bbtk::AtomicBlackBox ) ;
+
+        // GENERATED ARGS        
+        
+BBTK_DECLARE_INPUT ( insideValue , int );
+BBTK_DECLARE_INPUT ( outsideValue , int );
+BBTK_DECLARE_INPUT ( numberOfBins , int );
+BBTK_DECLARE_INPUT ( inputVolume , std::string );
+BBTK_DECLARE_INPUT ( outputVolume , std::string );
+
+        // EO GENERATED ARGS
+
+        BBTK_PROCESS ( Process ) ;
+        void Process ( ) ;
+    private:
+        void execute ( std::string lib , int _argc , char * _argv[] ) ;
+    } ;
+
+    BBTK_BEGIN_DESCRIBE_BLACK_BOX ( OtsuThreshold , bbtk::AtomicBlackBox ) ;
+    BBTK_NAME ( "OtsuThreshold" ) ;
+    BBTK_AUTHOR ( "Bill Lorensen" ) ;
+    BBTK_DESCRIPTION ( "This filter creates a binary thresholded image that separates an image into foreground and background components. The filter calculates the optimum threshold separating those two classes so that their combined spread intra-class variance is minimal see http://en.wikipedia.org/wiki/Otsu%27s_method.  Then the filter applies that threshold to the input image using the itkBinaryThresholdImageFilter. The numberOfHistogram bins can be set for the Otsu Calculator. The insideValue and outsideValue can be set for the BinaryThresholdImageFilter.  The filter produces a labeled volume.The original reference is: N.Otsu, ‘‘A threshold selection method from gray level histograms,’’ IEEE Trans.Syst.ManCybern.SMC-9,62–66 1979." ) ;
+    BBTK_CATEGORY ( "Legacy.Filtering" ) ;
+
+    // GENERATED DESCRPTION
+    
+BBTK_INPUT(OtsuThreshold , insideValue , "insideValue" , int, "");
+BBTK_INPUT(OtsuThreshold , outsideValue , "outsideValue" , int, "");
+BBTK_INPUT(OtsuThreshold , numberOfBins , "numberOfBins" , int, "");
+BBTK_INPUT(OtsuThreshold , inputVolume , "inputVolume" , std::string, "");
+BBTK_INPUT(OtsuThreshold , outputVolume , "outputVolume" , std::string, "");
+
+    // EO GENERATED DESCRIPTION
+
+    BBTK_END_DESCRIBE_BLACK_BOX ( OtsuThreshold ) ;
+}
+
+#endif // __bbSlicerOtsuThreshold_h_INCLUDED__
+
+