#ifndef __bbSlicerOtsuThresholdSegmentation_h_INCLUDED__ #define __bbSlicerOtsuThresholdSegmentation_h_INCLUDED__ #include "bbSlicer_EXPORT.h" #include "bbtkAtomicBlackBox.h" #include #include #include #include #include #include #include #include #include #include #include #include "CreationTool.h" namespace bbSlicer { class bbSlicer_EXPORT OtsuThresholdSegmentation : public bbtk::AtomicBlackBox { BBTK_BLACK_BOX_INTERFACE ( OtsuThresholdSegmentation , bbtk::AtomicBlackBox ) ; // GENERATED ARGS BBTK_DECLARE_INPUT ( brightObjects , bool ); BBTK_DECLARE_INPUT ( numberOfBins , int ); BBTK_DECLARE_INPUT ( faceConnected , bool ); BBTK_DECLARE_INPUT ( minimumObjectSize , 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 ( OtsuThresholdSegmentation , bbtk::AtomicBlackBox ) ; BBTK_NAME ( "OtsuThresholdSegmentation" ) ; BBTK_AUTHOR ( "Bill Lorensen" ) ; 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." ) ; BBTK_CATEGORY ( "Legacy.Segmentation" ) ; // GENERATED DESCRPTION BBTK_INPUT(OtsuThresholdSegmentation , brightObjects , "brightObjects" , bool, ""); BBTK_INPUT(OtsuThresholdSegmentation , numberOfBins , "numberOfBins" , int, ""); BBTK_INPUT(OtsuThresholdSegmentation , faceConnected , "faceConnected" , bool, ""); BBTK_INPUT(OtsuThresholdSegmentation , minimumObjectSize , "minimumObjectSize" , int, ""); BBTK_INPUT(OtsuThresholdSegmentation , inputVolume , "inputVolume" , std::string, ""); BBTK_INPUT(OtsuThresholdSegmentation , outputVolume , "outputVolume" , std::string, ""); // EO GENERATED DESCRIPTION BBTK_END_DESCRIBE_BLACK_BOX ( OtsuThresholdSegmentation ) ; } #endif // __bbSlicerOtsuThresholdSegmentation_h_INCLUDED__