Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
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:
100  PointSetReader();
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
mitkPointSetSource.h
mitkFileReader.h
itk::SmartPointer< Self >
MitkLegacyIOExports.h
mitk::PointSetReader
reads xml representations of mitk::PointSets from a file
Definition: mitkPointSetReader.h:48
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::BaseDataSource
Superclass of all classes generating some kind of mitk::BaseData.
Definition: mitkBaseDataSource.h:71
mitk::PointSetSource
Superclass of all classes generating point sets (instances of class mitk::PointSet) as output.
Definition: mitkPointSetSource.h:31
mitk::FileReader
Interface class of readers that read from files.
Definition: mitkFileReader.h:25
mitk::PointSetReader::m_FileName
std::string m_FileName
Definition: mitkPointSetReader.h:135
MITKLEGACYIO_EXPORT
#define MITKLEGACYIO_EXPORT
Definition: MitkLegacyIOExports.h:15
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
tinyxml2
Definition: mitkContourModelReader.h:25
mitk::PointSetReader::m_FilePrefix
std::string m_FilePrefix
Definition: mitkPointSetReader.h:137
mitk::PointSetReader::m_FilePattern
std::string m_FilePattern
Definition: mitkPointSetReader.h:139
mitk::PointSetReader::m_Success
bool m_Success
Definition: mitkPointSetReader.h:141