Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkPointSetReader.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_POINT_SET_READER__H_
18 #define _MITK_POINT_SET_READER__H_
19 
20 #include <MitkLegacyIOExports.h>
21 
22 #include <mitkFileReader.h>
23 #include <mitkPointSetSource.h>
24 #include <stack>
25 #include <string>
26 #include <tinyxml.h>
27 #include <vtkXMLParser.h>
28 
29 namespace mitk
30 {
49  {
50  public:
52 
53  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
54 
55 
59  itkSetStringMacro(FileName);
60 
65  itkGetStringMacro(FileName);
66 
70  itkSetStringMacro(FilePrefix);
71 
75  itkGetStringMacro(FilePrefix);
76 
80  itkSetStringMacro(FilePattern);
81 
85  itkGetStringMacro(FilePattern);
86 
87  static bool CanReadFile(const std::string filename, const std::string filePrefix, const std::string filePattern);
88 
92  bool GetSuccess() const;
93 
94  protected:
99 
103  virtual ~PointSetReader();
104 
108  virtual void GenerateData() override;
109 
110  virtual mitk::PointSet::Pointer ReadPoint(mitk::PointSet::Pointer newPointSet,
111  TiXmlElement *currentTimeSeries,
112  unsigned int currentTimeStep);
113 
117  virtual void GenerateOutputInformation() override;
118 
123  virtual void ResizeOutputs(const unsigned int &num);
124 
131  virtual int CanReadFile(const char *name);
132 
133  std::string m_FileName;
134 
135  std::string m_FilePrefix;
136 
137  std::string m_FilePattern;
138 
139  bool m_Success;
140  };
141 }
142 
143 #endif
#define MITKLEGACYIO_EXPORT
reads xml representations of mitk::PointSets from a file
Superclass of all classes generating some kind of mitk::BaseData.
DataCollection - Class to facilitate loading/accessing structured data.
static const std::string filename
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
Interface class of readers that read from files.
Superclass of all classes generating point sets (instances of class mitk::PointSet) as output...