1 #ifndef __bbSlicerOtsuThresholdSegmentation_h_INCLUDED__
2 #define __bbSlicerOtsuThresholdSegmentation_h_INCLUDED__
4 #include "bbSlicer_EXPORT.h"
5 #include "bbtkAtomicBlackBox.h"
14 #include <ModuleDescriptionUtilities.h>
15 #include <ModuleDescriptionParser.h>
16 #include <ModuleParameterGroup.h>
17 #include <ModuleDescription.h>
18 #include <ModuleParameter.h>
20 #include "CreationTool.h"
24 class bbSlicer_EXPORT OtsuThresholdSegmentation
26 public bbtk::AtomicBlackBox {
27 BBTK_BLACK_BOX_INTERFACE ( OtsuThresholdSegmentation , bbtk::AtomicBlackBox ) ;
31 BBTK_DECLARE_INPUT ( brightObjects , bool );
32 BBTK_DECLARE_INPUT ( numberOfBins , int );
33 BBTK_DECLARE_INPUT ( faceConnected , bool );
34 BBTK_DECLARE_INPUT ( minimumObjectSize , int );
35 BBTK_DECLARE_INPUT ( inputVolume , std::string );
36 BBTK_DECLARE_INPUT ( outputVolume , std::string );
40 BBTK_PROCESS ( Process ) ;
43 void execute ( std::string lib , int _argc , char * _argv[] ) ;
46 BBTK_BEGIN_DESCRIBE_BLACK_BOX ( OtsuThresholdSegmentation , bbtk::AtomicBlackBox ) ;
47 BBTK_NAME ( "OtsuThresholdSegmentation" ) ;
48 BBTK_AUTHOR ( "Bill Lorensen" ) ;
49 BBTK_DESCRIPTION ( "This filter creates a labeled image from a grayscale image. First, it calculates an optimal threshold that separates the image into foreground and background. This threshold separates those two classes so that their intra-class variance is minimal (see http://en.wikipedia.org/wiki/Otsu%27s_method). Then the filter runs a connected component algorithm to generate unique labels for each connected region of the foreground. Finally, the resulting image is relabeled to provide consecutive numbering." ) ;
50 BBTK_CATEGORY ( "Legacy.Segmentation" ) ;
52 // GENERATED DESCRPTION
54 BBTK_INPUT(OtsuThresholdSegmentation , brightObjects , "brightObjects" , bool, "");
55 BBTK_INPUT(OtsuThresholdSegmentation , numberOfBins , "numberOfBins" , int, "");
56 BBTK_INPUT(OtsuThresholdSegmentation , faceConnected , "faceConnected" , bool, "");
57 BBTK_INPUT(OtsuThresholdSegmentation , minimumObjectSize , "minimumObjectSize" , int, "");
58 BBTK_INPUT(OtsuThresholdSegmentation , inputVolume , "inputVolume" , std::string, "");
59 BBTK_INPUT(OtsuThresholdSegmentation , outputVolume , "outputVolume" , std::string, "");
61 // EO GENERATED DESCRIPTION
63 BBTK_END_DESCRIBE_BLACK_BOX ( OtsuThresholdSegmentation ) ;
66 #endif // __bbSlicerOtsuThresholdSegmentation_h_INCLUDED__