X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=bbtk_Slicer_PKG%2Fsrc%2FbbSlicerOtsuThresholdSegmentation.h;fp=bbtk_Slicer_PKG%2Fsrc%2FbbSlicerOtsuThresholdSegmentation.h;h=f05b8f9e258f733ef762be4706fb47e0bfcbaf1f;hb=cd590ce5fff20d69c7060340235a35e9c2a9ef86;hp=0000000000000000000000000000000000000000;hpb=b7a0497a4afc48d5230c279aeab20eb756e4427b;p=creaCLI.git diff --git a/bbtk_Slicer_PKG/src/bbSlicerOtsuThresholdSegmentation.h b/bbtk_Slicer_PKG/src/bbSlicerOtsuThresholdSegmentation.h new file mode 100644 index 0000000..f05b8f9 --- /dev/null +++ b/bbtk_Slicer_PKG/src/bbSlicerOtsuThresholdSegmentation.h @@ -0,0 +1,68 @@ +#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__ + +