#ifndef __bbUtilitiesSegmentationConnectivity_h_INCLUDED__ #define __bbUtilitiesSegmentationConnectivity_h_INCLUDED__ #include "bbtkAtomicBlackBox.h" #include "iostream" #include #include #include #include namespace bbUtilities { class /*BBTK_EXPORT*/ SegmentationConnectivity : public bbtk::AtomicBlackBox { //BBTK_USER_BLACK_BOX_INTERFACE(SegmentationConnectivity,bbtk::AtomicBlackBox); BBTK_BLACK_BOX_INTERFACE(SegmentationConnectivity,bbtk::AtomicBlackBox); //================================================================== BBTK_DECLARE_INPUT(In,vtkImageData *); BBTK_DECLARE_INPUT(PositionXYZ,std::vector); BBTK_DECLARE_INPUT(ThresholdMin,int); BBTK_DECLARE_INPUT(ThresholdMax,int); BBTK_DECLARE_OUTPUT(Out,vtkImageData*); BBTK_PROCESS(Process); void Process(); private: vtkImageCast *cast2; vtkImageCast *cast4; // binary segmentation result vtkImageThreshold *thresh2; vtkImageSeedConnectivity *connect2; }; BBTK_BEGIN_DESCRIBE_BLACK_BOX(SegmentationConnectivity,bbtk::AtomicBlackBox); BBTK_NAME("SegmentationConnectivity"); BBTK_AUTHOR("Juan Carlos Prieto"); BBTK_DESCRIPTION("Segmentation of an image given a seed point (Region Growing)"); BBTK_CATEGORY("__CATEGORY__"); BBTK_INPUT(SegmentationConnectivity,In,"Input image",vtkImageData *, ""); BBTK_INPUT(SegmentationConnectivity,PositionXYZ,"vector with the Position [x y z]" , std::vector , ""); BBTK_INPUT(SegmentationConnectivity,ThresholdMin,"Value min" , int, "" ); BBTK_INPUT(SegmentationConnectivity,ThresholdMax,"Value max" , int, "" ); BBTK_OUTPUT(SegmentationConnectivity,Out,"Result image",vtkImageData *, ""); BBTK_END_DESCRIBE_BLACK_BOX(SegmentationConnectivity); } // EO namespace bbUtilities #endif // __bbUtilitiesSegmentationConnectivity_h_INCLUDED__