Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkPixelTypeMultiplex.h File Reference

Preprocessor macros that dispatch a templated function call based on an image's pixel component type at run time. More...

Go to the source code of this file.

Macros

#define mitkPixelTypeMultiplex0(function, ptype)
 Dispatch a templated function with zero extra parameters based on pixel component type. More...
 
#define mitkPixelTypeMultiplex1(function, ptype, param1)
 Dispatch a templated function with one extra parameter based on pixel component type. More...
 
#define mitkPixelTypeMultiplex2(function, ptype, param1, param2)
 Dispatch a templated function with two extra parameters based on pixel component type. More...
 
#define mitkPixelTypeMultiplex3(function, ptype, param1, param2, param3)
 Dispatch a templated function with three extra parameters based on pixel component type. More...
 
#define mitkPixelTypeMultiplex4(function, ptype, param1, param2, param3, param4)
 Dispatch a templated function with four extra parameters based on pixel component type. More...
 
#define mitkPixelTypeMultiplex5(function, ptype, param1, param2, param3, param4, param5)
 Dispatch a templated function with five extra parameters based on pixel component type. More...
 

Detailed Description

Preprocessor macros that dispatch a templated function call based on an image's pixel component type at run time.

Each macro checks the component type of a mitk::PixelType and instantiates the given templated function with the matching C++ scalar type (char, unsigned char, short, unsigned short, int, unsigned int, long int, unsigned long int, float, double).

Variants are provided for zero to five additional parameters beyond the PixelType:

Note
For mitkPixelTypeMultiplex4 and mitkPixelTypeMultiplex5, if no component type matches, the function is called with double as a fallback to avoid compiler warnings.

Definition in file mitkPixelTypeMultiplex.h.

Macro Definition Documentation

◆ mitkPixelTypeMultiplex0

#define mitkPixelTypeMultiplex0 (   function,
  ptype 
)

Dispatch a templated function with zero extra parameters based on pixel component type.

Parameters
functionThe templated function to call (instantiated with the matching scalar type).
ptypeA mitk::PixelType whose component type drives the dispatch.

Definition at line 44 of file mitkPixelTypeMultiplex.h.

◆ mitkPixelTypeMultiplex1

#define mitkPixelTypeMultiplex1 (   function,
  ptype,
  param1 
)

Dispatch a templated function with one extra parameter based on pixel component type.

Parameters
functionThe templated function to call.
ptypeA mitk::PixelType whose component type drives the dispatch.
param1First additional parameter forwarded to function.

Definition at line 76 of file mitkPixelTypeMultiplex.h.

◆ mitkPixelTypeMultiplex2

#define mitkPixelTypeMultiplex2 (   function,
  ptype,
  param1,
  param2 
)

Dispatch a templated function with two extra parameters based on pixel component type.

Parameters
functionThe templated function to call.
ptypeA mitk::PixelType whose component type drives the dispatch.
param1First additional parameter forwarded to function.
param2Second additional parameter forwarded to function.

Definition at line 109 of file mitkPixelTypeMultiplex.h.

◆ mitkPixelTypeMultiplex3

#define mitkPixelTypeMultiplex3 (   function,
  ptype,
  param1,
  param2,
  param3 
)

Dispatch a templated function with three extra parameters based on pixel component type.

Parameters
functionThe templated function to call.
ptypeA mitk::PixelType whose component type drives the dispatch.
param1First additional parameter forwarded to function.
param2Second additional parameter forwarded to function.
param3Third additional parameter forwarded to function.

Definition at line 143 of file mitkPixelTypeMultiplex.h.

◆ mitkPixelTypeMultiplex4

#define mitkPixelTypeMultiplex4 (   function,
  ptype,
  param1,
  param2,
  param3,
  param4 
)

Dispatch a templated function with four extra parameters based on pixel component type.

If no component type matches, falls back to double to avoid Clang compiler warnings.

Parameters
functionThe templated function to call.
ptypeA mitk::PixelType whose component type drives the dispatch.
param1First additional parameter forwarded to function.
param2Second additional parameter forwarded to function.
param3Third additional parameter forwarded to function.
param4Fourth additional parameter forwarded to function.

Definition at line 182 of file mitkPixelTypeMultiplex.h.

◆ mitkPixelTypeMultiplex5

#define mitkPixelTypeMultiplex5 (   function,
  ptype,
  param1,
  param2,
  param3,
  param4,
  param5 
)

Dispatch a templated function with five extra parameters based on pixel component type.

If no component type matches, falls back to double to avoid Clang compiler warnings.

Parameters
functionThe templated function to call.
ptypeA mitk::PixelType whose component type drives the dispatch.
param1First additional parameter forwarded to function.
param2Second additional parameter forwarded to function.
param3Third additional parameter forwarded to function.
param4Fourth additional parameter forwarded to function.
param5Fifth additional parameter forwarded to function.

Definition at line 224 of file mitkPixelTypeMultiplex.h.