Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
mitkPropertyListsXmlFileReaderAndWriter.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 mitkPropertyListsXmlFileReaderAndWriter_h
14 #define mitkPropertyListsXmlFileReaderAndWriter_h
15 
16 #include "mitkDataStorage.h"
17 
18 namespace tinyxml2
19 {
20  class XMLElement;
21 }
22 
23 namespace mitk
24 {
25  class PropertyListsXmlFileReaderAndWriter;
26 
27  class PropertyListsXmlFileReaderAndWriter : public itk::Object
28  {
29  public:
30  static const char *GetPropertyListIdElementName();
31 
33  itkFactorylessNewMacro(Self);
34  itkCloneMacro(Self);
35 
36  bool WriteLists(const std::string &fileName,
37  const std::map<std::string, mitk::PropertyList::Pointer> &_PropertyLists) const;
38  bool ReadLists(const std::string &fileName,
39  std::map<std::string, mitk::PropertyList::Pointer> &_PropertyLists) const;
40 
41  protected:
44 
45  bool PropertyFromXmlElem(std::string &name, mitk::BaseProperty::Pointer &prop, const tinyxml2::XMLElement *elem) const;
46  bool PropertyToXmlElem(const std::string &name, const mitk::BaseProperty *prop, tinyxml2::XMLElement *elem) const;
47  };
48 }
49 
50 #endif
Abstract base class for properties.
mitkClassMacroItkParent(PropertyListsXmlFileReaderAndWriter, itk::Object)
bool PropertyFromXmlElem(std::string &name, mitk::BaseProperty::Pointer &prop, const tinyxml2::XMLElement *elem) const
static const char * GetPropertyListIdElementName()
bool WriteLists(const std::string &fileName, const std::map< std::string, mitk::PropertyList::Pointer > &_PropertyLists) const
bool ReadLists(const std::string &fileName, std::map< std::string, mitk::PropertyList::Pointer > &_PropertyLists) const
bool PropertyToXmlElem(const std::string &name, const mitk::BaseProperty *prop, tinyxml2::XMLElement *elem) const
Find image slices visible on a given plane.