]> Creatis software - bbtk.git/blob - packages/vtk/src/bbvtkSegmentationConnectivity.h
*** empty log message ***
[bbtk.git] / packages / vtk / src / bbvtkSegmentationConnectivity.h
1
2 /*=========================================================================
3                                                                                 
4   Program:   bbtk
5   Module:    $RCSfile: bbvtkSegmentationConnectivity.h,v $
6   Language:  C++
7   Date:      $Date: 2008/04/24 14:11:31 $
8   Version:   $Revision: 1.2 $
9                                                                                 
10   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
11   l'Image). All rights reserved. See Doc/License.txt or
12   http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details.
13                                                                                 
14      This software is distributed WITHOUT ANY WARRANTY; without even
15      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16      PURPOSE.  See the above copyright notices for more information.
17                                                                                 
18 =========================================================================*//**
19  * \brief Short description in one line
20  * 
21  * Long description which 
22  * can span multiple lines
23  */
24 /**
25  * \file 
26  * \brief Pattern for the definition of a new type of Node (header)
27  */
28 /**
29  * \class bbtk::NodePatern 
30  * \brief Pattern for the definition of a new type of Node 
31  */
32
33
34 #ifdef _USE_VTK_
35
36 #ifndef __bbvtkSegmentationConnectivity_h_INCLUDED__
37 #define __bbvtkSegmentationConnectivity_h_INCLUDED__
38
39 #include "bbtkAtomicBlackBox.h"
40 #include <vtkImageData.h>
41 #include <vtkImageCast.h>
42 #include <vtkImageThreshold.h>
43 #include <vtkImageSeedConnectivity.h>
44
45 namespace bbvtk
46 {
47
48   class SegmentationConnectivity
49     : 
50     public bbtk::AtomicBlackBox
51   {
52     BBTK_BLACK_BOX_INTERFACE(SegmentationConnectivity,bbtk::AtomicBlackBox);
53     BBTK_DECLARE_INPUT(In,vtkImageData *);
54     BBTK_DECLARE_INPUT(PositionXYZ,std::vector<int>);
55     BBTK_DECLARE_INPUT(ThresholdMinMax,std::vector<int>);
56     BBTK_DECLARE_OUTPUT(Out,vtkImageData *);
57     BBTK_PROCESS(DoProcess);
58     void DoProcess();
59
60   protected:
61     virtual void bbUserConstructor();
62
63   private:
64         vtkImageCast                            *cast2;
65         vtkImageCast                            *cast4; // binary segmentation result
66         vtkImageThreshold                       *thresh2;
67         vtkImageSeedConnectivity        *connect2;
68
69
70
71   };
72
73   BBTK_BEGIN_DESCRIBE_BLACK_BOX(SegmentationConnectivity,bbtk::AtomicBlackBox);
74   BBTK_NAME("SegmentationConnectivity");
75   BBTK_AUTHOR("eduardo.davila [at] creatis.insa-lyon.fr");
76   BBTK_DESCRIPTION("Segmentation with min max threshold and connectivity");
77   BBTK_INPUT(SegmentationConnectivity,In,"Input image",vtkImageData *,"");
78   BBTK_INPUT(SegmentationConnectivity,PositionXYZ,"vector with the Position [x y z]" , std::vector<int>,"");
79   BBTK_INPUT(SegmentationConnectivity,ThresholdMinMax,"vector with the Threshold [min max]" , std::vector<int>,"");
80   BBTK_OUTPUT(SegmentationConnectivity,Out,"Result image",vtkImageData *,"");
81   BBTK_END_DESCRIBE_BLACK_BOX(SegmentationConnectivity);
82
83 } // EO namespace bbvtk
84
85 #endif //  __bbvtkSegmentationConnectivity_h_INCLUDED__
86
87
88 #endif //_USE_VTK_