Program: bbtk
Module: $RCSfile: bbtkAtomicBlackBoxMacros.h,v $
Language: C++
- Date: $Date: 2008/05/06 07:36:42 $
- Version: $Revision: 1.8 $
+ Date: $Date: 2008/05/07 06:31:37 $
+ Version: $Revision: 1.9 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
-//===========================================================================
-//============================================================================
-// ITK Specific macros
-//===========================================================================
-//===========================================================================
-
-
-//===========================================================================
-/// Declares an itk-inherited AtomicBlackBox input
-#define BBTK_DECLARE_ITK_INPUT(PARENT,NAME,TYPE) \
- public: \
- TYPE bbGetInput##NAME () \
- { return PARENT::GetInput(); } \
- void bbSetInput##NAME (TYPE d) \
- { PARENT::SetInput(d); \
- /*bbSetModifiedStatus();*/ }
-//===========================================================================
-
-//===========================================================================
-#define BBTK_DECLARE_ITK_OUTPUT(PARENT,NAME,TYPE) \
- public: \
- TYPE bbGetOutput##NAME () \
- { return PARENT::GetOutput(); } \
- void bbSetOutput##NAME (TYPE d) \
- { /*PARENT::GetOutput() = d;*/ }
-//===========================================================================
-
-//===========================================================================
-/// Declares an AtomicBlackBox input corresponding to an inherited itk parameter
-/// which was declared by itkSetMacro/itkGetMacro
-/// The NAME **MUST** be the same than the itk parameter name
-#define BBTK_DECLARE_ITK_PARAM(PARENT,NAME,TYPE) \
- public: \
- TYPE bbGetInput##NAME () \
- { return PARENT::Get##NAME(); } \
- void bbSetInput##NAME (TYPE d) \
- { PARENT::Set##NAME(d); \
- /*bbSetModifiedStatus();*/ }
-//===========================================================================
-
-//===========================================================================
-//============================================================================
-// VTK Specific macros
-//===========================================================================
-//===========================================================================
-
-
-//===========================================================================
-
-// EED sept 04 \
-// { return GetInput(); /*PARENT::GetInput();*/ } \
-// { PARENT::SetInput( /*(vtkDataObject*)*/ d); \
-
-
-
-/// Declares a vtkImageAlgorithm-inherited AtomicBlackBox input
-#define BBTK_DECLARE_VTK_IMAGE_ALGORITHM_INPUT(PARENT,NAME,TYPE) \
- public: \
- TYPE bbGetInput##NAME () \
- { return GetImageDataInput(0); /*PARENT::GetInput();*/ } \
- void bbSetInput##NAME (TYPE d) \
- { PARENT::SetInput( (vtkDataObject*) d); \
- /*bbSetModifiedStatus();*/ }
-//===========================================================================
-/// Declares a vtkPolyDataAlgorithm-inherited AtomicBlackBox input
-#define BBTK_DECLARE_VTK_POLY_DATA_ALGORITHM_INPUT(PARENT,NAME,TYPE) \
- public: \
- TYPE bbGetInput##NAME () \
- { return GetPolyDataInput(0); /*PARENT::GetInput();*/ } \
- void bbSetInput##NAME (TYPE d) \
- { PARENT::SetInput( (vtkDataObject*) d); \
- /*bbSetModifiedStatus();*/ }
-//===========================================================================
-
-//===========================================================================
-/// Declares a vtkImageAlgorithm-inherited AtomicBlackBox output
-#define BBTK_DECLARE_VTK_OUTPUT(PARENT,NAME,TYPE) \
- public: \
- TYPE bbGetOutput##NAME () \
- { return PARENT::GetOutput(); } \
- void bbSetOutput##NAME (TYPE d) \
- { /*PARENT::GetOutput() = d;*/ }
-//===========================================================================
-
-//===========================================================================
-/// Declares a vtkAlgorithm-inherited AtomicBlackBox input
-#define BBTK_DECLARE_VTK_INPUT(PARENT,NAME,TYPE) \
- public: \
- TYPE bbGetInput##NAME () \
- { return dynamic_cast<TYPE>(PARENT::GetInput()); } \
- void bbSetInput##NAME (TYPE d) \
- { PARENT::SetInput( (vtkDataObject*) d); /*PARENT::GetOutput() = d;*/ }
-
-//===========================================================================
-
-//===========================================================================
-/// Declares an AtomicBlackBox input corresponding to an inherited vtk parameter
-/// which was declared by vtkSetMacro/vtkGetMacro
-/// The NAME **MUST** be the same than the vtk parameter name
-#define BBTK_DECLARE_VTK_PARAM(PARENT,NAME,TYPE) \
- public: \
- TYPE bbGetInput##NAME () \
- { return PARENT::Get##NAME(); } \
- void bbSetInput##NAME (TYPE d) \
- { PARENT::Set##NAME(d); \
- /*bbSetModifiedStatus();*/ }
-//===========================================================================
-
-#define BBTK_VTK_DELETE(VTKPARENT) \
- void bbDelete() { VTKPARENT::Delete(); }
//===========================================================================
/// EOF