Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MITKMESH_H_HEADER_INCLUDED
00020 #define MITKMESH_H_HEADER_INCLUDED
00021
00022 #include "mitkPointSet.h"
00023 #include "MitkExtExports.h"
00024
00025 #include <vtkCellArray.h>
00026 #include <vtkFloatArray.h>
00027 #include <vtkPointData.h>
00028 #include <vtkPolyData.h>
00029 #include <itkPolygonCell.h>
00030
00031 #if (VTK_MAJOR_VERSION >= 5)
00032 #include <vtkSystemIncludes.h>
00033 #else
00034 #include <vtkIdType.h>
00035 #endif
00036 #include <vtkPoints.h>
00037
00038 namespace mitk {
00039
00060 class MitkExt_EXPORT Mesh : public PointSet
00061 {
00062 public:
00063 mitkClassMacro(Mesh, PointSet);
00064
00065 itkNewMacro(Self);
00066
00067 typedef Superclass::DataType::CellType CellType;
00068 typedef CellType::CellAutoPointer CellAutoPointer;
00069 typedef Superclass::MeshTraits::CellTraits CellTraits;
00070 typedef CellTraits::PointIdConstIterator PointIdConstIterator;
00071 typedef CellTraits::PointIdIterator PointIdIterator;
00072 typedef DataType::CellDataContainer CellDataContainer;
00073 typedef DataType::CellDataContainerIterator CellDataIterator;
00074 typedef Superclass::DataType::CellsContainer::Iterator CellIterator;
00075 typedef Superclass::DataType::CellsContainer::ConstIterator ConstCellIterator;
00076 typedef itk::PolygonCell< CellType > PolygonType;
00077 typedef MeshType::CellType::MultiVisitor MeshMultiVisitor;
00078
00080 virtual unsigned long GetNumberOfCells( int t = 0 );
00081
00083 virtual const DataType *GetMesh( int t = 0 ) const;
00084
00086 virtual DataType *GetMesh( int t = 0 );
00087
00088 void SetMesh( DataType *mesh, int t = 0 );
00089
00093 virtual bool EvaluatePosition( Point3D point, unsigned long &cellId,
00094 float precision, int t = 0 );
00095
00097 unsigned long GetNewCellId( int t = 0 );
00098
00100 virtual int SearchFirstCell( unsigned long pointId, int t = 0 );
00101
00105 virtual bool SearchLine( Point3D point, float distance,
00106 unsigned long &lineId, unsigned long &cellId, int t = 0 );
00107
00112 virtual bool GetPointIds( unsigned long cellId, unsigned long lineId,
00113 int &idA, int &idB, int t = 0 );
00114
00118 virtual int SearchSelectedCell( int t = 0 );
00119
00125 virtual DataType::BoundingBoxPointer GetBoundingBoxFromCell(
00126 unsigned long cellId, int t = 0 );
00127
00129 virtual void ExecuteOperation(Operation* operation);
00130
00131 protected:
00132 Mesh();
00133 virtual ~Mesh();
00134
00135 };
00136
00137 }
00138
00139
00140
00141 #endif