1 // =========================================================================
2 // @author Leonardo Florez Valencia (florez-l@javeriana.edu.co)
3 // =========================================================================
4 #ifndef __CTBronchi__Process__h__
5 #define __CTBronchi__Process__h__
10 #include <fpa_ctbronchi_export.h>
16 class FPA_CTBRONCHI_EXPORT Process
21 // Some types and values
22 static const unsigned int Dim = 3;
24 typedef unsigned char TLabel;
25 typedef float TScalar;
26 typedef std::string TString;
29 typedef std::tuple< TString, TString, bool > TStrArg;
30 typedef std::tuple< TScalar, TString, bool > TDblArg;
31 typedef std::map< TString, TStrArg > TStrArgs;
32 typedef std::map< TString, TDblArg > TDblArgs;
35 typedef CTBronchi::Image< TPixel, Dim > TPixelImage;
36 typedef CTBronchi::Image< TLabel, Dim > TLabelImage;
37 typedef CTBronchi::Image< TScalar, Dim > TScalarImage;
40 typedef CTBronchi::Skeleton< Dim > TSkeleton;
43 typedef TPixelImage::TImage::PointType TPoint;
44 typedef TPixelImage::TImage::IndexType TIndex;
45 typedef std::pair< TIndex, TPoint > TSeed;
46 typedef std::pair< TIndex, unsigned int > TEndPoint;
47 struct TEndPointCompare
49 bool operator()( const TEndPoint& a, const TEndPoint& b ) const
51 return( cmp( a.first, b.first ) );
53 TIndex::LexicographicCompare cmp;
55 typedef std::set< TEndPoint, TEndPointCompare > TEndPoints;
61 void ParseArguments( int argc, char* argv[] );
65 template< class _TImage >
66 void _Input( _TImage& input );
68 template< class _TInput, class _TVesselness >
69 void _Vesselness( _TInput& input, _TVesselness& vesselness );
71 template< class _TInput, class _TMori, class _TSeed >
72 void _Mori( _TInput& input, _TMori& mori, _TSeed& seed );
74 template< class _TInput, class _TMori, class _TVesselness, class _TLabels >
76 _TInput& input, _TMori& mori, _TVesselness& vesselness, _TLabels& labels
79 template< class _TInput, class _TLabels, class _TFastRW >
80 void _FastRW( _TInput& input, _TLabels& labels, _TFastRW& fastrw );
82 template< class _TInput, class _TLabels, class _TVesselness, class _TSliceRW >
84 _TInput& input, _TLabels& labels, _TVesselness& vesselness, _TSliceRW& slicerw
87 template< class _TInput >
88 void _AndImages( _TInput& a, _TInput& b, _TInput& c );
90 template< class _TInput, class _TSkeleton, class _TIndices >
92 _TInput& a, _TSkeleton& s,
93 _TIndices& e, unsigned int id,
97 template< class _TIndices >
99 _TIndices& a, unsigned int ca,
100 _TIndices& b, unsigned int cb,
101 _TIndices& c, unsigned int cc,
110 TLabel m_UndefinedLabel;
111 TLabel m_InsideLabel;
112 TLabel m_OutsideLabel;
115 TScalarImage m_Vesselness;
117 TLabelImage m_Labels;
118 TLabelImage m_FastRW;
119 TLabelImage m_SliceRW;
122 TSkeleton m_FastRWSkeleton;
123 TSkeleton m_SliceRWSkeleton;
124 TSkeleton m_AndRWSkeleton;
126 TEndPoints m_FastRWPoints;
127 TEndPoints m_SliceRWPoints;
128 TEndPoints m_AndRWPoints;
133 #endif // __CTBronchi__Process__h__