13 #ifndef mitkAnatomicalStructureColorPresets_h
14 #define mitkAnatomicalStructureColorPresets_h
16 #include <vtkXMLParser.h>
42 Category(std::string value, std::string scheme, std::string name) : codeValue(value), codeScheme(scheme), codeName(name){}
55 Modifier(std::string value, std::string scheme, std::string name) : codeValue(value), codeScheme(scheme), codeName(name){}
62 Type(std::string value, std::string scheme, std::string name) : codeValue(value), codeScheme(scheme), codeName(name){}
117 void NewPresets(std::map<std::string, Category>& newCategory, std::map<std::string, Type>& newType, std::map<std::string, Color>& newColor);
127 void StartElement (
const char *elementName,
const char **atts)
override;
137 std::string ReadXMLStringAttribute(
const std::string& name,
const char **atts);
139 static const std::string PRESET;
140 static const std::string CATEGORY;
141 static const std::string TYPE;
142 static const std::string MODIFIER;
143 static const std::string COLOR;
144 static const std::string CODE_VALUE;
145 static const std::string CODE_SCHEME;
146 static const std::string CODE_NAME;
148 static const std::string COLOR_R;
149 static const std::string COLOR_G;
150 static const std::string COLOR_B;
152 std::string m_presetName;
153 std::map<std::string, Category> m_Category;
154 std::map<std::string, Type> m_Type;
155 std::map<std::string, Color> m_Color;
156 std::string m_XmlFileName;
Provides anatomical structure color presets loaded from XML.
vtkTypeMacro(AnatomicalStructureColorPresets, vtkXMLParser)
AnatomicalStructureColorPresets()=default
Default constructor.
Category GetCategory(const std::string &name)
Get the category for the given preset name.
Color GetColor(const std::string &name)
Get the color for the given preset name.
Type GetType(const std::string &name)
Get the type for the given preset name.
bool LoadPreset(const std::string &fileName)
Load presets from the specified XML file.
static AnatomicalStructureColorPresets * New()
~AnatomicalStructureColorPresets() override=default
Destructor.
std::map< std::string, Category > const GetCategoryPresets()
Get all category presets.
std::map< std::string, Color > const GetColorPresets()
Get all color presets.
bool LoadPreset()
Load the default presets from the module resource XML file.
std::map< std::string, Type > const GetTypePresets()
Get all type presets.
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.
Find image slices visible on a given plane.
itk::RGBPixel< float > Color
Standard RGB color typedef using float components.
Represents a DICOM coding scheme category entry.
Category(std::string value, std::string scheme, std::string name)
Represents a DICOM coding scheme modifier for a type.
Modifier(std::string value, std::string scheme, std::string name)
Represents a DICOM coding scheme type entry with an optional modifier.
Type(std::string value, std::string scheme, std::string name)