Medical Imaging Interaction Toolkit  2018.4.99-389bf124
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 (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_POINT_SET_READER__H_
14 #define _MITK_POINT_SET_READER__H_
15 
16 #include <MitkLegacyIOExports.h>
17 
18 #include <mitkFileReader.h>
19 #include <mitkPointSetSource.h>
20 #include <stack>
21 #include <string>
22 #include <tinyxml.h>
23 #include <vtkXMLParser.h>
24 
25 namespace mitk
26 {
45  {
46  public:
48 
49  itkFactorylessNewMacro(Self);
50 
51  itkCloneMacro(Self);
52 
57  itkSetStringMacro(FileName);
58 
63  itkGetStringMacro(FileName);
64 
68  itkSetStringMacro(FilePrefix);
69 
73  itkGetStringMacro(FilePrefix);
74 
78  itkSetStringMacro(FilePattern);
79 
83  itkGetStringMacro(FilePattern);
84 
85  static bool CanReadFile(const std::string filename, const std::string filePrefix, const std::string filePattern);
86 
90  bool GetSuccess() const;
91 
92  protected:
97 
101  ~PointSetReader() override;
102 
106  void GenerateData() override;
107 
108  virtual mitk::PointSet::Pointer ReadPoint(mitk::PointSet::Pointer newPointSet,
109  TiXmlElement *currentTimeSeries,
110  unsigned int currentTimeStep);
111 
115  void GenerateOutputInformation() override;
116 
121  virtual void ResizeOutputs(const unsigned int &num);
122 
129  virtual int CanReadFile(const char *name);
130 
131  std::string m_FileName;
132 
133  std::string m_FilePrefix;
134 
135  std::string m_FilePattern;
136 
137  bool m_Success;
138  };
139 }
140 
141 #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.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
Interface class of readers that read from files.
Superclass of all classes generating point sets (instances of class mitk::PointSet) as output...