Medical Imaging Interaction Toolkit  2018.4.99-12ad79a3
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) itkCloneMacro(Self)
39 
40 
44  itkSetStringMacro(FileName);
45 
50  itkGetStringMacro(FileName);
51 
55  itkSetStringMacro(FilePrefix);
56 
60  itkGetStringMacro(FilePrefix);
61 
65  itkSetStringMacro(FilePattern);
66 
70  itkGetStringMacro(FilePattern);
71 
72  static bool CanReadFile(const std::string filename, const std::string filePrefix, const std::string filePattern);
73 
77  itkGetConstMacro(Success, bool);
78 
79  protected:
80  typedef std::list<double> DoubleList;
81 
86 
90  ~PlanarFigureReader() override;
91 
95  void GenerateData() override;
96 
100  void GenerateOutputInformation() override;
101 
106  virtual void ResizeOutputs(const unsigned int &num);
107 
114  virtual int CanReadFile(const char *name);
115 
121  mitk::Vector3D GetVectorFromXMLNode(TiXmlElement *e);
122 
128  mitk::Point3D GetPointFromXMLNode(TiXmlElement *e);
129 
138  DoubleList GetDoubleAttributeListFromXMLNode(TiXmlElement *e, const char *attributeNameBase, unsigned int count);
139 
140  std::string m_FileName;
141  std::string m_FilePrefix;
142  std::string m_FilePattern;
143  bool m_Success;
144  };
145 }
146 #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.