Medical Imaging Interaction Toolkit  2025.12.02
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 mitkPointSetReader_h
14 #define mitkPointSetReader_h
15 
16 #include <MitkLegacyIOExports.h>
17 
18 #include <mitkFileReader.h>
19 #include <mitkPointSetSource.h>
20 #include <stack>
21 #include <string>
22 #include <vtkXMLParser.h>
23 
24 namespace tinyxml2
25 {
26  class XMLElement;
27 }
28 
29 namespace mitk
30 {
49  {
50  public:
52 
53  itkFactorylessNewMacro(Self);
54 
55  itkCloneMacro(Self);
56 
61  itkSetStringMacro(FileName);
62 
67  itkGetStringMacro(FileName);
68 
72  itkSetStringMacro(FilePrefix);
73 
77  itkGetStringMacro(FilePrefix);
78 
82  itkSetStringMacro(FilePattern);
83 
87  itkGetStringMacro(FilePattern);
88 
89  static bool CanReadFile(const std::string filename, const std::string filePrefix, const std::string filePattern);
90 
94  bool GetSuccess() const;
95 
96  protected:
101 
105  ~PointSetReader() override;
106 
110  void GenerateData() override;
111 
112  virtual mitk::PointSet::Pointer ReadPoint(mitk::PointSet::Pointer newPointSet,
113  const tinyxml2::XMLElement *currentTimeSeries,
114  unsigned int currentTimeStep);
115 
119  void GenerateOutputInformation() override;
120 
125  virtual void ResizeOutputs(const unsigned int &num);
126 
133  virtual int CanReadFile(const char *name);
134 
135  std::string m_FileName;
136 
137  std::string m_FilePrefix;
138 
139  std::string m_FilePattern;
140 
141  bool m_Success;
142  };
143 }
144 
145 #endif
#define MITKLEGACYIO_EXPORT
Interface class of readers that read from files.
reads xml representations of mitk::PointSets from a file
virtual mitk::PointSet::Pointer ReadPoint(mitk::PointSet::Pointer newPointSet, const tinyxml2::XMLElement *currentTimeSeries, unsigned int currentTimeStep)
virtual void ResizeOutputs(const unsigned int &num)
virtual int CanReadFile(const char *name)
void GenerateData() override
bool GetSuccess() const
static bool CanReadFile(const std::string filename, const std::string filePrefix, const std::string filePattern)
void GenerateOutputInformation() override
~PointSetReader() override
mitkClassMacro(PointSetReader, FileReader)
Superclass of all classes generating point sets (instances of class mitk::PointSet) as output.
Find image slices visible on a given plane.