13 #ifndef mitkLevelWindowPreset_h
14 #define mitkLevelWindowPreset_h
19 #include <vtkXMLParser.h>
72 void newPresets(std::map<std::string, double> newLevel, std::map<std::string, double> newWindow);
80 void StartElement(
const char *elementName,
const char **atts)
override;
90 std::string ReadXMLStringAttribut(std::string name,
const char **atts);
92 static const std::string PRESET;
93 std::map<std::string, double> m_Level;
94 std::map<std::string, double> m_Window;
95 std::string m_XmlFileName;
Manages level/window presets loaded from an XML file.
vtkTypeMacro(LevelWindowPreset, vtkXMLParser)
bool LoadPreset(std::string fileName)
Load presets from a specified XML file.
double getLevel(std::string name)
Get the level value for a named preset.
double getWindow(std::string window)
Get the window value for a named preset.
void newPresets(std::map< std::string, double > newLevel, std::map< std::string, double > newWindow)
Replace all presets with new level and window maps and save.
static LevelWindowPreset * New()
std::map< std::string, double > & getWindowPresets()
Get a reference to the map of all window presets.
bool LoadPreset()
Load presets from the default module resource file.
~LevelWindowPreset() override
std::map< std::string, double > & getLevelPresets()
Get a reference to the map of all level presets.
Find image slices visible on a given plane.