Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef __mitkLabelSetIOHelper_h
18 #define __mitkLabelSetIOHelper_h
19 
20 #include <MitkMultilabelExports.h>
21 #include <itkSmartPointer.h>
22 
23 class TiXmlElement;
24 
25 namespace mitk
26 {
27  class BaseProperty;
28  class LabelSetImage;
29  class Label;
30 
38  {
39  public:
47  static bool SaveLabelSetImagePreset(std::string &presetFilename,
49 
55  static void LoadLabelSetImagePreset(std::string &presetFilename,
57 
63  static itk::SmartPointer<mitk::Label> LoadLabelFromTiXmlDocument(TiXmlElement *labelElem);
64 
70  static TiXmlElement *GetLabelAsTiXmlElement(Label *label);
71 
79  static TiXmlElement *PropertyToXmlElem(const std::string &key, const BaseProperty *property);
80 
88  static bool PropertyFromXmlElem(std::string &key, itk::SmartPointer<mitk::BaseProperty> &prop, TiXmlElement *elem);
89 
90  private:
92  };
93 }
94 
95 #endif // __mitkLabelSetIOHelper_h
DataCollection - Class to facilitate loading/accessing structured data.
A data structure describing a label.
Definition: mitkLabel.h:35
#define MITKMULTILABEL_EXPORT
Abstract base class for properties.
The LabelSetIOHelper is a static helper class that supports serialization of mitk::LabelSetImage.