Medical Imaging Interaction Toolkit  2018.4.99-389bf124
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 class TiXmlElement;
20 
21 namespace mitk
22 {
23  class BaseProperty;
24  class LabelSetImage;
25  class Label;
26 
34  {
35  public:
43  static bool SaveLabelSetImagePreset(std::string &presetFilename,
45 
51  static void LoadLabelSetImagePreset(std::string &presetFilename,
53 
59  static itk::SmartPointer<mitk::Label> LoadLabelFromTiXmlDocument(TiXmlElement *labelElem);
60 
66  static TiXmlElement *GetLabelAsTiXmlElement(Label *label);
67 
75  static TiXmlElement *PropertyToXmlElem(const std::string &key, const BaseProperty *property);
76 
84  static bool PropertyFromXmlElem(std::string &key, itk::SmartPointer<mitk::BaseProperty> &prop, TiXmlElement *elem);
85 
86  private:
88  };
89 }
90 
91 #endif // __mitkLabelSetIOHelper_h
DataCollection - Class to facilitate loading/accessing structured data.
A data structure describing a label.
Definition: mitkLabel.h:31
#define MITKMULTILABEL_EXPORT
Abstract base class for properties.
The LabelSetIOHelper is a static helper class that supports serialization of mitk::LabelSetImage.