Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkPlanarFigureReader.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 _MITK_PlanarFigureReader__H_
14 #define _MITK_PlanarFigureReader__H_
15 
16 #include "mitkFileReader.h"
17 #include "mitkPlanarFigureSource.h"
19 
20 #include <list>
21 
22 class TiXmlElement;
23 namespace mitk
24 {
34  {
35  public:
37 
38  itkFactorylessNewMacro(Self);
39 
40  itkCloneMacro(Self);
41 
46  itkSetStringMacro(FileName);
47 
52  itkGetStringMacro(FileName);
53 
57  itkSetStringMacro(FilePrefix);
58 
62  itkGetStringMacro(FilePrefix);
63 
67  itkSetStringMacro(FilePattern);
68 
72  itkGetStringMacro(FilePattern);
73 
74  static bool CanReadFile(const std::string filename, const std::string filePrefix, const std::string filePattern);
75 
79  itkGetConstMacro(Success, bool);
80 
81  protected:
82  typedef std::list<double> DoubleList;
83 
88 
92  ~PlanarFigureReader() override;
93 
97  void GenerateData() override;
98 
102  void GenerateOutputInformation() override;
103 
108  virtual void ResizeOutputs(const unsigned int &num);
109 
116  virtual int CanReadFile(const char *name);
117 
123  mitk::Vector3D GetVectorFromXMLNode(TiXmlElement *e);
124 
130  mitk::Point3D GetPointFromXMLNode(TiXmlElement *e);
131 
140  DoubleList GetDoubleAttributeListFromXMLNode(TiXmlElement *e, const char *attributeNameBase, unsigned int count);
141 
142  std::string m_FileName;
143  std::string m_FilePrefix;
144  std::string m_FilePattern;
145  bool m_Success;
146  };
147 }
148 #endif
std::list< double > DoubleList
Superclass of all classes generating some kind of mitk::BaseData.
DataCollection - Class to facilitate loading/accessing structured data.
reads xml representations of mitk::PlanarFigure from a file
Base class for all filters which have an object of type mitk::PlanarFigure as output.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
#define MITKPLANARFIGURE_EXPORT
Interface class of readers that read from files.