go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
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>; \
static constexpr const char * FixedPixelTypeString{ #_fPixelType }; \
static constexpr const char * MovingPixelTypeString{ #_mPixelType }; \
static constexpr unsigned int FixedDimension{ _fDim }; \
static constexpr unsigned int MovingDimension{ _mDim }; \
static constexpr 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 2024-07-17 for elastix by doxygen 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) elastix logo