X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2Ffpa%2FConfig.h.in;h=831fb7217ce967e9f698fd48254deb60800ba23a;hb=34f4ff5d31c70f1127d43865c61e9f57a7071190;hp=e1cd318189a6a2678e41bb305157a98434b5ae0e;hpb=c9542e420b94b0bfc1f285599f7816eab1191519;p=FrontAlgorithms.git diff --git a/lib/fpa/Config.h.in b/lib/fpa/Config.h.in index e1cd318..831fb72 100644 --- a/lib/fpa/Config.h.in +++ b/lib/fpa/Config.h.in @@ -2,35 +2,86 @@ // @author Leonardo Florez Valencia // @email florez-l@javeriana.edu.co // ========================================================================= - #ifndef __fpa__Config__h__ #define __fpa__Config__h__ -#define VTK_FOUND @VTK_FOUND@ -#if VTK_FOUND == 1 -# define USE_VTK -#else -# undef USE_VTK -#endif +#include -#define ivq_FOUND @ivq_FOUND@ -#if ivq_FOUND == 1 -# define USE_ivq -#else -# undef USE_ivq -#endif +// ------------------------------------------------------------------------- +#define fpaTraitsMacro( __t__ ) \ + typedef __t__::TInternalTraits::TInputValue TInputValue; \ + typedef __t__::TInternalTraits::TNeighborhood TNeighborhood; \ + typedef __t__::TInternalTraits::TMark TMark; \ + typedef __t__::TInternalTraits::TNode TNode; \ + typedef __t__::TInternalTraits::TNodes TNodes; \ + typedef __t__::TInternalTraits::TOutputValue TOutputValue; \ + typedef __t__::TInternalTraits::TPoint TPoint; \ + typedef __t__::TInternalTraits::TSeed TSeed; \ + typedef __t__::TInternalTraits::TSeeds TSeeds; \ + typedef __t__::TInternalTraits::TVertex TVertex // ------------------------------------------------------------------------- -#define fpa_Base_TraitTypes( _traits_ ) \ - typedef _traits_::TInputValue TInputValue; \ - typedef _traits_::TOutputValue TOutputValue; \ - typedef _traits_::TNeighborhood TNeighborhood; \ - typedef _traits_::TNode TNode; \ - typedef _traits_::TNodes TNodes; \ - typedef _traits_::TSeeds TSeeds; \ - typedef _traits_::TVertex TVertex; \ - typedef _traits_::TEvent TEvent +#define fpaFilterInputMacro( __n__, __t__ ) \ + private: \ + unsigned int m_##__n__##Idx; \ + public: \ + __t__* Get##__n__( ) \ + { \ + return( \ + dynamic_cast< __t__* >( \ + this->itk::ProcessObject::GetInput( \ + this->m_##__n__##Idx \ + ) ) ); \ + } \ + const __t__* Get##__n__( ) const \ + { \ + return( \ + dynamic_cast< const __t__* >( \ + this->itk::ProcessObject::GetInput( \ + this->m_##__n__##Idx \ + ) ) ); \ + } \ + void Set##__n__( __t__* i ) \ + { \ + this->itk::ProcessObject::SetNthInput( this->m_##__n__##Idx, i ); \ + } -#endif // __fpa__Config__h__ +// ------------------------------------------------------------------------- +#define fpaFilterInputConfigureMacro( __n__, __t__ ) \ + this->m_##__n__##Idx = this->GetNumberOfRequiredInputs( ); \ + this->itk::ProcessObject::SetNumberOfRequiredInputs( \ + this->m_##__n__##Idx + 1 \ + ) +// ------------------------------------------------------------------------- +#define fpaFilterOutputMacro( __n__, __t__ ) \ + private: \ + unsigned int m_##__n__##Idx; \ + public: \ + __t__* Get##__n__( ) \ + { \ + return( \ + dynamic_cast< __t__* >( \ + this->itk::ProcessObject::GetOutput( \ + this->m_##__n__##Idx \ + ) ) ); \ + } \ + const __t__* Get##__n__( ) const \ + { \ + return( \ + dynamic_cast< const __t__* >( \ + this->itk::ProcessObject::GetOutput( \ + this->m_##__n__##Idx \ + ) ) ); \ + } + +// ------------------------------------------------------------------------- +#define fpaFilterOutputConfigureMacro( __n__, __t__ ) \ + this->m_##__n__##Idx = this->GetNumberOfRequiredOutputs( ); \ + this->itk::ProcessObject::SetNumberOfRequiredOutputs( \ + this->m_##__n__##Idx + 1 \ + ); \ + this->SetNthOutput( this->m_##__n__##Idx, __t__::New( ) ) + +#endif // __fpa__Config__h__ // eof - $RCSfile$