Medical Imaging Interaction Toolkit  2018.04.99-aba3194f
Medical Imaging Interaction Toolkit
mitkLabelSetIOHelper.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef __mitkLabelSetIOHelper_h
14 #define __mitkLabelSetIOHelper_h
15 
16 #include <MitkMultilabelExports.h>
17 #include <itkSmartPointer.h>
18 
19 namespace tinyxml2
20 {
21  class XMLDocument;
22  class XMLElement;
23 }
24 
25 namespace mitk
26 {
27  class BaseProperty;
28  class LabelSetImage;
29  class Label;
30 
38  {
39  public:
47  static bool SaveLabelSetImagePreset(const std::string &presetFilename,
49 
55  static void LoadLabelSetImagePreset(const std::string &presetFilename,
57 
63  static itk::SmartPointer<mitk::Label> LoadLabelFromXMLDocument(const tinyxml2::XMLElement *labelElem);
64 
71  static tinyxml2::XMLElement *GetLabelAsXMLElement(tinyxml2::XMLDocument &doc, Label *label);
72 
81  static tinyxml2::XMLElement *PropertyToXMLElement(tinyxml2::XMLDocument& doc, const std::string &key, const BaseProperty *property);
82 
90  static bool PropertyFromXMLElement(std::string &key, itk::SmartPointer<mitk::BaseProperty> &prop, const tinyxml2::XMLElement *elem);
91 
92  private:
94  };
95 }
96 
97 #endif // __mitkLabelSetIOHelper_h
DataCollection - Class to facilitate loading/accessing structured data.
A data structure describing a label.
Definition: mitkLabel.h:28
#define MITKMULTILABEL_EXPORT
Abstract base class for properties.
The LabelSetIOHelper is a static helper class that supports serialization of mitk::LabelSetImage.