Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef LEVELWINDOWPRESET_H_HEADER
00019 #define LEVELWINDOWPRESET_H_HEADER
00020
00021 #include <vtkXMLParser.h>
00022 #include <mitkCommon.h>
00023 #include <map>
00024 #include <string>
00025
00026 namespace mitk {
00027
00028 class MITK_CORE_EXPORT LevelWindowPreset : public vtkXMLParser
00029 {
00030 public:
00031 static LevelWindowPreset *New();
00032 vtkTypeMacro(LevelWindowPreset,vtkXMLParser);
00033
00034 bool LoadPreset();
00035 bool LoadPreset(std::string fileName);
00036 double getLevel(std::string name);
00037 double getWindow(std::string window);
00038 std::map<std::string, double>& getLevelPresets();
00039 std::map<std::string, double>& getWindowPresets();
00040 void newPresets(std::map<std::string, double> newLevel, std::map<std::string, double> newWindow);
00041 protected:
00042 LevelWindowPreset();
00043 ~LevelWindowPreset();
00044
00045 private:
00046
00047
00048 void StartElement (const char *elementName, const char **atts);
00049
00050
00051 void save();
00052
00053
00054
00055 std::string ReadXMLStringAttribut( std::string name, const char** atts);
00056
00057 static const std::string PRESET;
00058 std::map<std::string, double> m_Level;
00059 std::map<std::string, double> m_Window;
00060 std::string m_XmlFileName;
00061 };
00062 }
00063 #endif