]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Config.h.in
...
[FrontAlgorithms.git] / lib / fpa / Config.h.in
index 1050a244fec50816e064be850f54b9cbb08b398e..4ecc222653750b7405ee77a7096b025379457fcb 100644 (file)
+// =========================================================================
+// @author Leonardo Florez Valencia
+// @email florez-l@javeriana.edu.co
+// =========================================================================
 #ifndef __fpa__Config__h__
 #define __fpa__Config__h__
 
-#include <fpa_Export.h>
-
-/*
- * =========================================================================
- * Version numbers and strings
- * =========================================================================
- */
-#define fpa_MAJOR_VERSION   @prj_MAJ_VER@
-#define fpa_MINOR_VERSION   @prj_MIN_VER@
-#define fpa_RELEASE_VERSION @prj_REL_VER@
-#define fpa_VERSION         "@prj_VERSION@"
-#define fpa_SHORT_VERSION   "@prj_SHORT_VERSION@"
-
-/*
- * =========================================================================
- * Language related macros
- * =========================================================================
- */
-
-#if __cplusplus >= 201103L
-#  define fpa_OVERRIDE override
-#  define fpa_DELETE_FUNCTION =delete
-#  define fpa_NULLPTR  nullptr
-#  define fpa_NOEXCEPT noexcept
-#  define fpa_HAS_CXX11_STATIC_ASSERT
-#  define fpa_HAS_CXX11_RVREF
+#include <itkMacro.h>
+
+#define VTK_FOUND @VTK_FOUND@
+#if VTK_FOUND == 1
+#  define USE_VTK
 #else
-#  define fpa_OVERRIDE
-#  define fpa_DELETE_FUNCTION
-#  define fpa_NULLPTR  NULL
-#  define fpa_NOEXCEPT throw()
+#  undef USE_VTK
 #endif
 
-#endif // __fpa__Config__h__
+// -------------------------------------------------------------------------
+#define fpaTraitsMacro( __p__, __t__ )                                  \
+  typedef __p__ __t__::TFilter         TFilter;                         \
+  typedef __p__ __t__::TMarksInterface TMarksInterface;                 \
+  typedef __p__ __t__::TSeedsInterface TSeedsInterface;                 \
+  typedef __p__ __t__::TInternalTraits::TInputValue   TInputValue;      \
+  typedef __p__ __t__::TInternalTraits::TMark         TMark;            \
+  typedef __p__ __t__::TInternalTraits::TNeighborhood TNeighborhood;    \
+  typedef __p__ __t__::TInternalTraits::TNode         TNode;            \
+  typedef __p__ __t__::TInternalTraits::TNodes        TNodes;           \
+  typedef __p__ __t__::TInternalTraits::TOutputValue  TOutputValue;     \
+  typedef __p__ __t__::TInternalTraits::TPoint        TPoint;           \
+  typedef __p__ __t__::TInternalTraits::TSeed         TSeed;            \
+  typedef __p__ __t__::TInternalTraits::TSeeds        TSeeds;           \
+  typedef __p__ __t__::TInternalTraits::TVertex       TVertex;          \
+  itkStaticConstMacro(                                                  \
+    Dimension, unsigned int, __t__::TInternalTraits::Dimension          \
+    )
+
+// -------------------------------------------------------------------------
+#define fpaInternalTraitsMacro( __p__, __t__ )                          \
+  typedef __p__ __t__::TInputValue   TInputValue;                       \
+  typedef __p__ __t__::TMark         TMark;                             \
+  typedef __p__ __t__::TNeighborhood TNeighborhood;                     \
+  typedef __p__ __t__::TNode         TNode;                             \
+  typedef __p__ __t__::TNodes        TNodes;                            \
+  typedef __p__ __t__::TOutputValue  TOutputValue;                      \
+  typedef __p__ __t__::TPoint        TPoint;                            \
+  typedef __p__ __t__::TSeed         TSeed;                             \
+  typedef __p__ __t__::TSeeds        TSeeds;                            \
+  typedef __p__ __t__::TVertex       TVertex;                           \
+  itkStaticConstMacro( Dimension, unsigned int, __t__::Dimension )
+
+// -------------------------------------------------------------------------
+#define fpaFilterInputMacro( __n__, __t__ )                             \
+  __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 );   \
+  }
 
+// -------------------------------------------------------------------------
+#define fpaFilterInputConfigureMacro( __n__, __t__ )            \
+  this->m_##__n__##Idx = this->GetNumberOfRequiredInputs( );    \
+  this->itk::ProcessObject::SetNumberOfRequiredInputs(          \
+    this->m_##__n__##Idx + 1                                    \
+    )
+
+// -------------------------------------------------------------------------
+#define fpaFilterOutputMacro( __n__, __t__ )    \
+  __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$