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

Macros for registering MITK segmentation tools and tool GUIs via ITK object factories. More...

Go to the source code of this file.

Macros

#define MITK_TOOL_MACRO(EXPORT_SPEC, CLASS_NAME, DESCRIPTION)
 Register a mitk::Tool subclass with the ITK object factory system. More...
 
#define MITK_DERIVED_SM_TOOL_MACRO(EXPORT_SPEC, BASE_CLASS, CLASS_NAME, DESCRIPTION)
 Register a derived segmentation-method tool wrapping a segmentation generator. More...
 
#define MITK_TOOL_GUI_MACRO(EXPORT_SPEC, CLASS_NAME, DESCRIPTION)
 Register a tool GUI class with the ITK object factory system. More...
 
#define MITK_EXTERNAL_TOOL_GUI_HEADER_MACRO(EXPORT_SPEC, CLASS_NAME, DESCRIPTION)
 Header declaration for an externally loadable tool GUI factory. More...
 
#define MITK_EXTERNAL_TOOL_GUI_CPP_MACRO(EXPORT_SPEC, CLASS_NAME, DESCRIPTION)
 Implementation macro for an externally loadable tool GUI factory. More...
 

Detailed Description

Macros for registering MITK segmentation tools and tool GUIs via ITK object factories.

These macros generate the boilerplate ITK ObjectFactory and static registration code needed to make a mitk::Tool subclass discoverable by ToolManager at runtime.

See also
mitk::Tool, mitk::ToolManager

Definition in file mitkToolFactoryMacro.h.

Macro Definition Documentation

◆ MITK_DERIVED_SM_TOOL_MACRO

#define MITK_DERIVED_SM_TOOL_MACRO (   EXPORT_SPEC,
  BASE_CLASS,
  CLASS_NAME,
  DESCRIPTION 
)

Register a derived segmentation-method tool wrapping a segmentation generator.

Creates a tool class derived from BASE_CLASS that owns a CLASS_NAME segmentation generator and registers it with the ITK factory system.

Parameters
EXPORT_SPECDLL export macro for the module.
BASE_CLASSThe base tool class to derive from.
CLASS_NAMEThe segmentation generator class name.
DESCRIPTIONA human-readable description string.

Definition at line 104 of file mitkToolFactoryMacro.h.

◆ MITK_EXTERNAL_TOOL_GUI_CPP_MACRO

#define MITK_EXTERNAL_TOOL_GUI_CPP_MACRO (   EXPORT_SPEC,
  CLASS_NAME,
  DESCRIPTION 
)

Implementation macro for an externally loadable tool GUI factory.

Combines MITK_TOOL_GUI_MACRO with the itkLoad() entry point definition so that the tool GUI can be discovered and loaded by ITK at runtime.

Parameters
EXPORT_SPECDLL export macro.
CLASS_NAMEThe tool GUI class name.
DESCRIPTIONA human-readable description string.

Definition at line 239 of file mitkToolFactoryMacro.h.

◆ MITK_EXTERNAL_TOOL_GUI_HEADER_MACRO

#define MITK_EXTERNAL_TOOL_GUI_HEADER_MACRO (   EXPORT_SPEC,
  CLASS_NAME,
  DESCRIPTION 
)

Header declaration for an externally loadable tool GUI factory.

Declares the itkLoad() entry point that allows the tool GUI to be loaded as an external ITK factory plugin.

Parameters
EXPORT_SPECDLL export macro.
CLASS_NAMEThe tool GUI class name.
DESCRIPTIONA human-readable description string.

Definition at line 223 of file mitkToolFactoryMacro.h.

◆ MITK_TOOL_GUI_MACRO

#define MITK_TOOL_GUI_MACRO (   EXPORT_SPEC,
  CLASS_NAME,
  DESCRIPTION 
)

Register a tool GUI class with the ITK object factory system.

Similar to MITK_TOOL_MACRO but intended for tool GUI classes (QmitkToolGUI subclasses). The factory key is the class name itself.

Parameters
EXPORT_SPECDLL export macro for the module.
CLASS_NAMEThe tool GUI class name.
DESCRIPTIONA human-readable description string.

Definition at line 156 of file mitkToolFactoryMacro.h.

◆ MITK_TOOL_MACRO

#define MITK_TOOL_MACRO (   EXPORT_SPEC,
  CLASS_NAME,
  DESCRIPTION 
)

Register a mitk::Tool subclass with the ITK object factory system.

Creates a factory class and a static registration object so that ToolManager can discover and instantiate the tool at runtime.

Parameters
EXPORT_SPECDLL export macro for the module.
CLASS_NAMEThe tool class name (must derive from mitk::Tool).
DESCRIPTIONA human-readable description string.

Definition at line 36 of file mitkToolFactoryMacro.h.