NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
niftkMeditMeshParser.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef niftkMeditMeshParser_h
16 #define niftkMeditMeshParser_h
17 
18 #include <string>
19 #include <vector>
20 #include <vtkMultiBlockDataSet.h>
21 #include <vtkPoints.h>
22 #include <vtkSmartPointer.h>
23 
24 #include <niftkIOException.h>
25 
27 
28 namespace niftk {
37  private:
38  std::string m_InputFileName;
39 
40  public:
44  void SetInputFileName(const std::string &filename) { m_InputFileName = filename; }
51  private:
52  double m_Translation[3];
53 
54  private:
55  vtkSmartPointer<vtkPoints> _ReadVertices(std::ifstream &r_fin) const throw (niftk::IOException);
56  template <class t_vtkCellType>
57  vtkSmartPointer<vtkMultiBlockDataSet> _ReadAsVTKMesh(void) const throw (IOException);
58  template <class t_vtkCellType>
59  std::vector<int> _ReadCellLabelsAsVector(void) const throw (IOException);
60 
61  public:
69  vtkSmartPointer<vtkMultiBlockDataSet> ReadAsVTKSurfaceMeshes(void) const throw (IOException);
70 
78  vtkSmartPointer<vtkMultiBlockDataSet> ReadAsVTKVolumeMeshes(void) const throw (IOException);
79 
83  void SetTranslation(const double tVec[]);
86  public:
87  MeditMeshParser(void);
88  }; /* MeditMeshParser */
89 }
90 
91 #endif
void SetInputFileName(const std::string &filename)
Setter for input mesh file.
Definition: niftkMeditMeshParser.h:44
Definition: niftkMeshSmoother.cxx:19
#define NIFTKCOMMON_WINEXPORT
Definition: niftkCommonWin32ExportHeader.h:28
Parses a Medit mesh (.mesh) file.
Definition: niftkMeditMeshParser.h:32
Definition: niftkExceptionObject.h:21
GLsizei const GLcharARB ** string
Definition: glew.h:5194
Exceptions for Filesystem, Network, ... I/O.
Definition: niftkIOException.h:26