Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
mitkContourModelWriter.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 _MITK_CONTOURMODEL_WRITER__H_
18 #define _MITK_CONTOURMODEL_WRITER__H_
19 
20 #include <mitkAbstractFileWriter.h>
21 #include <mitkContourModel.h>
22 
23 // DEPRECATED
24 #include <mitkTimeGeometry.h>
25 
26 namespace mitk
27 {
58  class TimeSlicedGeometry;
59 
61  {
62  public:
64  virtual ~ContourModelWriter();
65 
67  virtual void Write() override;
68 
69  protected:
71 
72  virtual mitk::ContourModelWriter *Clone() const override;
73 
81  template <typename T>
82  std::string ConvertToString(T value);
83 
90  void WriteXML(const mitk::ContourModel *contourModel, std::ostream &out);
91 
98  void WriteGeometryInformation(const mitk::TimeGeometry *geometry, std::ostream &out);
99 
109  DEPRECATED(void WriteGeometryInformation(const mitk::TimeSlicedGeometry *geometry, std::ostream &out));
110 
115  void WriteXMLHeader(std::ostream &file);
116 
118  void WriteStartElement(const char *const tag, std::ostream &file);
119 
120  void WriteStartElementWithAttribut(const char *const tag,
121  std::vector<std::string> attributes,
122  std::vector<std::string> values,
123  std::ostream &file);
124 
129  void WriteEndElement(const char *const tag, std::ostream &file, const bool &indent = true);
130 
132  void WriteCharacterData(const char *const data, std::ostream &file);
133 
135  void WriteStartElement(std::string &tag, std::ostream &file);
136 
138  void WriteEndElement(std::string &tag, std::ostream &file, const bool &indent = true);
139 
141  void WriteCharacterData(std::string &data, std::ostream &file);
142 
144  void WriteIndent(std::ostream &file);
145 
146  unsigned int m_IndentDepth;
147 
148  unsigned int m_Indent;
149 
150  public:
151  static const char *XML_CONTOURMODEL;
152 
153  static const char *XML_HEAD;
154 
155  static const char *XML_GEOMETRY_INFO;
156 
157  static const char *XML_DATA;
158 
159  static const char *XML_TIME_STEP;
160 
161  static const char *XML_CONTROL_POINTS;
162 
163  static const char *XML_POINT;
164 
165  static const char *XML_X;
166 
167  static const char *XML_Y;
168 
169  static const char *XML_Z;
170  };
171 }
172 
173 #endif
ContourModel is a structure of linked vertices defining a contour in 3D space. The vertices are store...
void WriteIndent(std::ostream &file)
void WriteGeometryInformation(const mitk::TimeGeometry *geometry, std::ostream &out)
void WriteStartElementWithAttribut(const char *const tag, std::vector< std::string > attributes, std::vector< std::string > values, std::ostream &file)
DataCollection - Class to facilitate loading/accessing structured data.
static const char * XML_GEOMETRY_INFO
void WriteXMLHeader(std::ostream &file)
#define DEPRECATED(func)
Definition: mitkCommon.h:183
static const char * XML_CONTROL_POINTS
static const char * XML_TIME_STEP
void WriteStartElement(const char *const tag, std::ostream &file)
virtual void Write() override
Write the base data to the specified location or output stream.
void WriteEndElement(const char *const tag, std::ostream &file, const bool &indent=true)
virtual void Write() override=0
Write the base data to the specified location or output stream.
void WriteCharacterData(const char *const data, std::ostream &file)
std::string ConvertToString(T value)
static const char * XML_CONTOURMODEL
void WriteXML(const mitk::ContourModel *contourModel, std::ostream &out)
virtual mitk::ContourModelWriter * Clone() const override
Base class for writing mitk::BaseData objects to files or streams.