1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
5 #ifndef __fpa__Config__h__
6 #define __fpa__Config__h__
10 #define VTK_FOUND @VTK_FOUND@
17 // -------------------------------------------------------------------------
18 #define fpaTraitsMacro( __p__, __t__ ) \
19 typedef __p__ __t__::TFilter TFilter; \
20 typedef __p__ __t__::TMarksInterface TMarksInterface; \
21 typedef __p__ __t__::TSeedsInterface TSeedsInterface; \
22 typedef __p__ __t__::TInternalTraits::TInputValue TInputValue; \
23 typedef __p__ __t__::TInternalTraits::TMark TMark; \
24 typedef __p__ __t__::TInternalTraits::TNeighborhood TNeighborhood; \
25 typedef __p__ __t__::TInternalTraits::TNode TNode; \
26 typedef __p__ __t__::TInternalTraits::TNodes TNodes; \
27 typedef __p__ __t__::TInternalTraits::TOutputValue TOutputValue; \
28 typedef __p__ __t__::TInternalTraits::TPoint TPoint; \
29 typedef __p__ __t__::TInternalTraits::TSeed TSeed; \
30 typedef __p__ __t__::TInternalTraits::TSeeds TSeeds; \
31 typedef __p__ __t__::TInternalTraits::TVertex TVertex; \
32 itkStaticConstMacro( \
33 Dimension, unsigned int, __t__::TInternalTraits::Dimension \
36 // -------------------------------------------------------------------------
37 #define fpaInternalTraitsMacro( __p__, __t__ ) \
38 typedef __p__ __t__::TInputValue TInputValue; \
39 typedef __p__ __t__::TMark TMark; \
40 typedef __p__ __t__::TNeighborhood TNeighborhood; \
41 typedef __p__ __t__::TNode TNode; \
42 typedef __p__ __t__::TNodes TNodes; \
43 typedef __p__ __t__::TOutputValue TOutputValue; \
44 typedef __p__ __t__::TPoint TPoint; \
45 typedef __p__ __t__::TSeed TSeed; \
46 typedef __p__ __t__::TSeeds TSeeds; \
47 typedef __p__ __t__::TVertex TVertex; \
48 itkStaticConstMacro( Dimension, unsigned int, __t__::Dimension )
50 // -------------------------------------------------------------------------
51 #define fpaFilterInputMacro( __n__, __t__ ) \
52 __t__* Get##__n__( ) \
55 dynamic_cast< __t__* >( \
56 this->itk::ProcessObject::GetInput( \
57 this->m_##__n__##Idx \
60 const __t__* Get##__n__( ) const \
63 dynamic_cast< const __t__* >( \
64 this->itk::ProcessObject::GetInput( \
65 this->m_##__n__##Idx \
68 void Set##__n__( __t__* i ) \
70 this->itk::ProcessObject::SetNthInput( this->m_##__n__##Idx, i ); \
73 // -------------------------------------------------------------------------
74 #define fpaFilterInputConfigureMacro( __n__, __t__ ) \
75 this->m_##__n__##Idx = this->GetNumberOfRequiredInputs( ); \
76 this->itk::ProcessObject::SetNumberOfRequiredInputs( \
77 this->m_##__n__##Idx + 1 \
80 // -------------------------------------------------------------------------
81 #define fpaFilterOutputMacro( __n__, __t__ ) \
82 __t__* Get##__n__( ) \
85 dynamic_cast< __t__* >( \
86 this->itk::ProcessObject::GetOutput( \
87 this->m_##__n__##Idx \
90 const __t__* Get##__n__( ) const \
93 dynamic_cast< const __t__* >( \
94 this->itk::ProcessObject::GetOutput( \
95 this->m_##__n__##Idx \
99 // -------------------------------------------------------------------------
100 #define fpaFilterOutputConfigureMacro( __n__, __t__ ) \
101 this->m_##__n__##Idx = this->GetNumberOfRequiredOutputs( ); \
102 this->itk::ProcessObject::SetNumberOfRequiredOutputs( \
103 this->m_##__n__##Idx + 1 \
105 this->SetNthOutput( this->m_##__n__##Idx, __t__::New( ) )
107 #endif // __fpa__Config__h__