Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::ParamapPresetsParser Class Reference

Parser for DICOM Parametric Map (PM) preset definitions stored in XML format. More...

#include <mitkParamapPresetsParser.h>

Inheritance diagram for mitk::ParamapPresetsParser:
Collaboration diagram for mitk::ParamapPresetsParser:

Classes

struct  Type
 Represents a single parametric map type preset with a coded value and coding scheme. More...
 

Public Types

using ParamapPrestsType = std::map< std::string, Type >
 Map type associating preset names to their Type definitions. More...
 

Public Member Functions

 vtkTypeMacro (ParamapPresetsParser, vtkXMLParser)
 
bool LoadPreset ()
 Load presets from the default module resource file. More...
 
bool LoadPreset (const std::string &fileName)
 Load presets from a custom XML file. More...
 
Type GetType (const std::string &name)
 Retrieve the type definition for a given preset name. More...
 
ParamapPrestsType const GetTypePresets ()
 Get all currently loaded type presets. More...
 
void NewPresets (ParamapPrestsType &newType)
 Replace all current presets with a new set. More...
 

Static Public Member Functions

static ParamapPresetsParser * New ()
 VTK-style factory method. More...
 

Protected Member Functions

 ParamapPresetsParser ()=default
 
 ~ParamapPresetsParser () override=default
 

Detailed Description

Parser for DICOM Parametric Map (PM) preset definitions stored in XML format.

This class reads XML files that define parametric map type presets, each consisting of a coded value and a coding scheme designator. These presets are used to populate DICOM parametric map objects with standardized coded entries.

The default preset file is loaded from the module resources (mitkParamapPresets.xml). Alternatively, a custom XML file can be specified.

See also
vtkXMLParser

Definition at line 38 of file mitkParamapPresetsParser.h.

Member Typedef Documentation

◆ ParamapPrestsType

using mitk::ParamapPresetsParser::ParamapPrestsType = std::map<std::string, Type>

Map type associating preset names to their Type definitions.

Definition at line 60 of file mitkParamapPresetsParser.h.

Constructor & Destructor Documentation

◆ ParamapPresetsParser()

mitk::ParamapPresetsParser::ParamapPresetsParser ( )
protecteddefault

◆ ~ParamapPresetsParser()

mitk::ParamapPresetsParser::~ParamapPresetsParser ( )
overrideprotecteddefault

Member Function Documentation

◆ GetType()

Type mitk::ParamapPresetsParser::GetType ( const std::string &  name)

Retrieve the type definition for a given preset name.

Parameters
[in]nameThe name of the preset to look up.
Returns
The Type associated with name. Returns a default-constructed Type if the name is not found.

◆ GetTypePresets()

ParamapPrestsType const mitk::ParamapPresetsParser::GetTypePresets ( )

Get all currently loaded type presets.

Returns
A copy of the map containing all preset name-to-Type associations.

◆ LoadPreset() [1/2]

bool mitk::ParamapPresetsParser::LoadPreset ( )

Load presets from the default module resource file.

Loads and parses the built-in mitkParamapPresets.xml from the module resources.

Returns
true if the presets were loaded and parsed successfully, false otherwise.

◆ LoadPreset() [2/2]

bool mitk::ParamapPresetsParser::LoadPreset ( const std::string &  fileName)

Load presets from a custom XML file.

Parameters
[in]fileNamePath to the XML file containing preset definitions.
Returns
true if the file was parsed successfully, false if the file name is empty or parsing failed.

◆ New()

static ParamapPresetsParser* mitk::ParamapPresetsParser::New ( )
static

VTK-style factory method.

◆ NewPresets()

void mitk::ParamapPresetsParser::NewPresets ( ParamapPrestsType &  newType)

Replace all current presets with a new set.

Parameters
[in]newTypeThe new map of preset name-to-Type associations to use.

◆ vtkTypeMacro()

mitk::ParamapPresetsParser::vtkTypeMacro ( ParamapPresetsParser  ,
vtkXMLParser   
)

The documentation for this class was generated from the following file: