Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkMesh.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 MITKMESH_H_HEADER_INCLUDED
18 #define MITKMESH_H_HEADER_INCLUDED
19 
21 #include "mitkPointSet.h"
22 
23 #include <itkPolygonCell.h>
24 #include <vtkCellArray.h>
25 #include <vtkFloatArray.h>
26 #include <vtkPointData.h>
27 #include <vtkPolyData.h>
28 
29 #include <vtkPoints.h>
30 #include <vtkSystemIncludes.h>
31 
32 namespace mitk
33 {
55  {
56  public:
58 
59  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
60 
62  typedef CellType::CellAutoPointer CellAutoPointer;
65  typedef CellTraits::PointIdIterator PointIdIterator;
67  typedef DataType::CellDataContainerIterator CellDataIterator;
68  typedef Superclass::DataType::CellsContainer::Iterator CellIterator;
69  typedef Superclass::DataType::CellsContainer::ConstIterator ConstCellIterator;
70  typedef itk::PolygonCell<CellType> PolygonType;
71  typedef MeshType::CellType::MultiVisitor MeshMultiVisitor;
72 
74  virtual unsigned long GetNumberOfCells(int t = 0);
75 
77  virtual const DataType *GetMesh(int t = 0) const;
78 
80  virtual DataType *GetMesh(int t = 0);
81 
82  void SetMesh(DataType *mesh, int t = 0);
83 
87  virtual bool EvaluatePosition(Point3D point, unsigned long &cellId, float precision, int t = 0);
88 
90  unsigned long GetNewCellId(int t = 0);
91 
93  virtual int SearchFirstCell(unsigned long pointId, int t = 0);
94 
98  virtual bool SearchLine(Point3D point, float distance, unsigned long &lineId, unsigned long &cellId, int t = 0);
99 
104  virtual bool GetPointIds(unsigned long cellId, unsigned long lineId, int &idA, int &idB, int t = 0);
105 
109  virtual int SearchSelectedCell(int t = 0);
110 
116  virtual DataType::BoundingBoxPointer GetBoundingBoxFromCell(unsigned long cellId, int t = 0);
117 
119  virtual void ExecuteOperation(Operation *operation) override;
120 
121  protected:
122  Mesh();
123  virtual ~Mesh();
124  };
125 
126 } // namespace mitk
127 
128 #endif /* MITKMESH_H_HEADER_INCLUDED */
MeshType DataType
Definition: mitkPointSet.h:133
Base of all data objects.
Definition: mitkBaseData.h:39
#define MITKDATATYPESEXT_EXPORT
DataType::CellDataContainerIterator CellDataIterator
Definition: mitkMesh.h:67
Base class of all Operation-classes.
Definition: mitkOperation.h:33
CellTraits::PointIdConstIterator PointIdConstIterator
Definition: mitkMesh.h:64
DataCollection - Class to facilitate loading/accessing structured data.
itk::Mesh< PointDataType, PointDimension, MeshTraits > MeshType
Definition: mitkPointSet.h:131
CellType::CellAutoPointer CellAutoPointer
Definition: mitkMesh.h:62
itk::DataObject Superclass
Definition: mitkBaseData.h:42
Superclass::MeshTraits::CellTraits CellTraits
Definition: mitkMesh.h:63
Superclass::DataType::CellsContainer::Iterator CellIterator
Definition: mitkMesh.h:68
Data structure which stores a set of points. Superclass of mitk::Mesh.
Definition: mitkPointSet.h:79
DataStructure which stores a set of points (incl. pointdata) where each point can be associated to an...
Definition: mitkMesh.h:54
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
itk::PolygonCell< CellType > PolygonType
Definition: mitkMesh.h:70
DataType::CellDataContainer CellDataContainer
Definition: mitkMesh.h:66
Superclass::DataType::CellsContainer::ConstIterator ConstCellIterator
Definition: mitkMesh.h:69
itk::DefaultDynamicMeshTraits< PointDataType, PointDimension, MaxTopologicalDimension, CoordinateType, InterpolationWeightType, CellDataType > MeshTraits
Definition: mitkPointSet.h:130
CellTraits::PointIdIterator PointIdIterator
Definition: mitkMesh.h:65
BoundingBoxType::Pointer BoundingBoxPointer
Superclass::DataType::CellType CellType
Definition: mitkMesh.h:61
MeshType::CellType::MultiVisitor MeshMultiVisitor
Definition: mitkMesh.h:71