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

Provides anatomical structure color presets loaded from XML. More...

#include <mitkAnatomicalStructureColorPresets.h>

Inheritance diagram for mitk::AnatomicalStructureColorPresets:
Collaboration diagram for mitk::AnatomicalStructureColorPresets:

Classes

struct  Category
 Represents a DICOM coding scheme category entry. More...
 
struct  Type
 Represents a DICOM coding scheme type entry with an optional modifier. More...
 

Public Member Functions

 vtkTypeMacro (AnatomicalStructureColorPresets, vtkXMLParser)
 
bool LoadPreset ()
 Load the default presets from the module resource XML file. More...
 
bool LoadPreset (const std::string &fileName)
 Load presets from the specified XML file. More...
 
Category GetCategory (const std::string &name)
 Get the category for the given preset name. More...
 
Type GetType (const std::string &name)
 Get the type for the given preset name. More...
 
Color GetColor (const std::string &name)
 Get the color for the given preset name. More...
 
std::map< std::string, Category > const GetCategoryPresets ()
 Get all category presets. More...
 
std::map< std::string, Type > const GetTypePresets ()
 Get all type presets. More...
 
std::map< std::string, Color > const GetColorPresets ()
 Get all color presets. More...
 
void NewPresets (std::map< std::string, Category > &newCategory, std::map< std::string, Type > &newType, std::map< std::string, Color > &newColor)
 Replace all presets with new ones and save. More...
 

Static Public Member Functions

static AnatomicalStructureColorPresets * New ()
 

Protected Member Functions

 AnatomicalStructureColorPresets ()=default
 Default constructor. More...
 
 ~AnatomicalStructureColorPresets () override=default
 Destructor. More...
 

Detailed Description

Provides anatomical structure color presets loaded from XML.

Parses an XML file containing color, category, and type information for anatomical structures as defined by DICOM coding schemes. Used to associate structures with standardized colors, categories, and types.

Definition at line 32 of file mitkAnatomicalStructureColorPresets.h.

Constructor & Destructor Documentation

◆ AnatomicalStructureColorPresets()

mitk::AnatomicalStructureColorPresets::AnatomicalStructureColorPresets ( )
protecteddefault

Default constructor.

◆ ~AnatomicalStructureColorPresets()

mitk::AnatomicalStructureColorPresets::~AnatomicalStructureColorPresets ( )
overrideprotecteddefault

Destructor.

Member Function Documentation

◆ GetCategory()

Category mitk::AnatomicalStructureColorPresets::GetCategory ( const std::string &  name)

Get the category for the given preset name.

Parameters
nameThe preset name.
Returns
The Category for the given name.

◆ GetCategoryPresets()

std::map<std::string, Category> const mitk::AnatomicalStructureColorPresets::GetCategoryPresets ( )

Get all category presets.

Returns
A map from preset names to Category objects.

◆ GetColor()

Color mitk::AnatomicalStructureColorPresets::GetColor ( const std::string &  name)

Get the color for the given preset name.

Parameters
nameThe preset name.
Returns
The Color for the given name.

◆ GetColorPresets()

std::map<std::string, Color> const mitk::AnatomicalStructureColorPresets::GetColorPresets ( )

Get all color presets.

Returns
A map from preset names to Color objects.

◆ GetType()

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

Get the type for the given preset name.

Parameters
nameThe preset name.
Returns
The Type for the given name.

◆ GetTypePresets()

std::map<std::string, Type> const mitk::AnatomicalStructureColorPresets::GetTypePresets ( )

Get all type presets.

Returns
A map from preset names to Type objects.

◆ LoadPreset() [1/2]

bool mitk::AnatomicalStructureColorPresets::LoadPreset ( )

Load the default presets from the module resource XML file.

Returns
True if the XML file was parsed successfully.

◆ LoadPreset() [2/2]

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

Load presets from the specified XML file.

Parameters
fileNamePath to the XML preset file.
Returns
True if the XML file was parsed successfully.

◆ New()

static AnatomicalStructureColorPresets* mitk::AnatomicalStructureColorPresets::New ( )
static

◆ NewPresets()

void mitk::AnatomicalStructureColorPresets::NewPresets ( std::map< std::string, Category > &  newCategory,
std::map< std::string, Type > &  newType,
std::map< std::string, Color > &  newColor 
)

Replace all presets with new ones and save.

Parameters
newCategoryThe new category presets map.
newTypeThe new type presets map.
newColorThe new color presets map.

◆ vtkTypeMacro()

mitk::AnatomicalStructureColorPresets::vtkTypeMacro ( AnatomicalStructureColorPresets  ,
vtkXMLParser   
)

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