go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
Data Structures | Namespaces | Macros
elxPrepareImageTypeSupport.h File Reference
#include "elxElastixTemplate.h"
#include <itkImage.h>
#include <itkObject.h>
Include dependency graph for elxPrepareImageTypeSupport.h:

Go to the source code of this file.

Data Structures

class  elastix::ElastixTypedef< VIndex >
 

Namespaces

namespace  elastix
 

Macros

#define elxSupportedImageTypeMacro(_fPixelType, _fDim, _mPixelType, _mDim, _VIndex)
 

Macro Definition Documentation

◆ elxSupportedImageTypeMacro

#define elxSupportedImageTypeMacro (   _fPixelType,
  _fDim,
  _mPixelType,
  _mDim,
  _VIndex 
)
Value:
template <> \
class ElastixTypedef<_VIndex> \
{ \
public: \
using FixedImageType = ::itk::Image<_fPixelType, _fDim>; \
using MovingImageType = ::itk::Image<_mPixelType, _mDim>; \
using ElastixType = ::elx::ElastixTemplate<FixedImageType, MovingImageType>; \
constexpr static const char * FixedPixelTypeString{ #_fPixelType }; \
constexpr static const char * MovingPixelTypeString{ #_mPixelType }; \
constexpr static unsigned int FixedDimension{ _fDim }; \
constexpr static unsigned int MovingDimension{ _mDim }; \
constexpr static bool IsDefined{ true }; \
}

Macro for installing support for new ImageTypes. Used in elxSupportedImageTypes.cxx .

Example of usage:

namespace elastix { elxSupportedImageTypeMacro(unsigned short, 2, float, 3, 1); elxSupportedImageTypeMacro(unsigned short, 3, float, 3, 2); etc. } //end namespace elastix

The first line adds support for the following combination of ImageTypes: fixedImage: 2D unsigned short movingImage 3D float The Index (last argument) of this combination of ImageTypes is 1.

The Index should not be 0. This value is reserved for errormessages. Besides, duplicate indices are not allowed.

IMPORTANT: the macro must be invoked in namespace elastix!

Details: the macro adds a class template specialization for the class ElastixTypedef<VIndex>.

Definition at line 77 of file elxPrepareImageTypeSupport.h.



Generated on Wed 12 Apr 2023 for elastix by doxygen 1.9.6 elastix logo