Medical Imaging Interaction Toolkit  2018.4.99-6ca56567
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 (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 MITKMESH_H_HEADER_INCLUDED
14 #define MITKMESH_H_HEADER_INCLUDED
15 
17 #include "mitkPointSet.h"
18 
19 #include <itkPolygonCell.h>
20 #include <vtkCellArray.h>
21 #include <vtkFloatArray.h>
22 #include <vtkPointData.h>
23 #include <vtkPolyData.h>
24 
25 #include <vtkPoints.h>
26 #include <vtkSystemIncludes.h>
27 
28 namespace mitk
29 {
51  {
52  public:
54 
55  itkFactorylessNewMacro(Self);
56 
57  itkCloneMacro(Self);
58 
59  typedef Superclass::DataType::CellType CellType;
60  typedef CellType::CellAutoPointer CellAutoPointer;
61  typedef Superclass::MeshTraits::CellTraits CellTraits;
62  typedef CellTraits::PointIdConstIterator PointIdConstIterator;
63  typedef CellTraits::PointIdIterator PointIdIterator;
64  typedef DataType::CellDataContainer CellDataContainer;
65  typedef DataType::CellDataContainerIterator CellDataIterator;
66  typedef Superclass::DataType::CellsContainer::Iterator CellIterator;
67  typedef Superclass::DataType::CellsContainer::ConstIterator ConstCellIterator;
68  typedef itk::PolygonCell<CellType> PolygonType;
69  typedef MeshType::CellType::MultiVisitor MeshMultiVisitor;
70 
72  virtual unsigned long GetNumberOfCells(int t = 0);
73 
75  virtual const DataType *GetMesh(int t = 0) const;
76 
78  virtual DataType *GetMesh(int t = 0);
79 
80  void SetMesh(DataType *mesh, int t = 0);
81 
85  virtual bool EvaluatePosition(Point3D point, unsigned long &cellId, float precision, int t = 0);
86 
88  unsigned long GetNewCellId(int t = 0);
89 
91  virtual int SearchFirstCell(unsigned long pointId, int t = 0);
92 
96  virtual bool SearchLine(Point3D point, float distance, unsigned long &lineId, unsigned long &cellId, int t = 0);
97 
102  virtual bool GetPointIds(unsigned long cellId, unsigned long lineId, int &idA, int &idB, int t = 0);
103 
107  virtual int SearchSelectedCell(int t = 0);
108 
114  virtual DataType::BoundingBoxPointer GetBoundingBoxFromCell(unsigned long cellId, int t = 0);
115 
117  void ExecuteOperation(Operation *operation) override;
118 
119  protected:
120  Mesh();
121  ~Mesh() override;
122  };
123 
124 } // namespace mitk
125 
126 #endif /* MITKMESH_H_HEADER_INCLUDED */
MeshType DataType
Definition: mitkPointSet.h:131
Base of all data objects.
Definition: mitkBaseData.h:42
#define MITKDATATYPESEXT_EXPORT
DataType::CellDataContainerIterator CellDataIterator
Definition: mitkMesh.h:65
Base class of all Operation-classes.
Definition: mitkOperation.h:29
CellTraits::PointIdConstIterator PointIdConstIterator
Definition: mitkMesh.h:62
DataCollection - Class to facilitate loading/accessing structured data.
CellType::CellAutoPointer CellAutoPointer
Definition: mitkMesh.h:60
Superclass::MeshTraits::CellTraits CellTraits
Definition: mitkMesh.h:61
Superclass::DataType::CellsContainer::Iterator CellIterator
Definition: mitkMesh.h:66
Data structure which stores a set of points. Superclass of mitk::Mesh.
Definition: mitkPointSet.h:75
DataStructure which stores a set of points (incl. pointdata) where each point can be associated to an...
Definition: mitkMesh.h:50
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
itk::PolygonCell< CellType > PolygonType
Definition: mitkMesh.h:68
DataType::CellDataContainer CellDataContainer
Definition: mitkMesh.h:64
Superclass::DataType::CellsContainer::ConstIterator ConstCellIterator
Definition: mitkMesh.h:67
CellTraits::PointIdIterator PointIdIterator
Definition: mitkMesh.h:63
BoundingBoxType::Pointer BoundingBoxPointer
Superclass::DataType::CellType CellType
Definition: mitkMesh.h:57
MeshType::CellType::MultiVisitor MeshMultiVisitor
Definition: mitkMesh.h:69