Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
MeshUtil< MeshType, ScalarAccessor > Class Template Reference

The class provides mehtods for ITK - VTK mesh conversion. More...

#include <mitkMeshUtil.h>

Public Types

typedef itk::MatrixOffsetTransformBase< typename MeshType::CoordRepType, 3, 3 > ITKTransformType
 
typedef itk::MatrixOffsetTransformBase< mitk::ScalarType, 3, 3 > MITKTransformType
 

Static Public Member Functions

static void ConvertTransformToItk (const MITKTransformType *mitkTransform, ITKTransformType *itkTransform)
 
static MeshType::Pointer MeshFromPolyData (vtkPolyData *poly, mitk::BaseGeometry *geometryFrame=NULL, mitk::BaseGeometry *polyDataGeometryFrame=NULL)
 
static MeshType::Pointer MeshFromSurface (mitk::Surface *surface, mitk::BaseGeometry *geometryFrame=NULL)
 
static vtkUnstructuredGrid * MeshToUnstructuredGrid (MeshType *mesh, bool usePointScalarAccessor=false, bool useCellScalarAccessor=false, unsigned int pointDataType=0, mitk::BaseGeometry *geometryFrame=NULL)
 
static vtkPolyData * MeshToPolyData (MeshType *mesh, bool onlyTriangles=false, bool useScalarAccessor=false, unsigned int pointDataType=0, mitk::BaseGeometry *geometryFrame=NULL, vtkPolyData *polydata=NULL)
 
static MeshType::Pointer CreateRegularSphereMesh (typename MeshType::PointType center, typename MeshType::PointType::VectorType scale, int resolution)
 
static MeshType::Pointer CreateSphereMesh (typename MeshType::PointType center, typename MeshType::PointType scale, int *resolution)
 
static MeshType::Pointer CreateRegularSphereMesh2 (typename MeshType::PointType center, typename MeshType::PointType scale, int resolution)
 

Detailed Description

template<typename MeshType, class ScalarAccessor = NullScalarAccessor<MeshType>>
class MeshUtil< MeshType, ScalarAccessor >

The class provides mehtods for ITK - VTK mesh conversion.

Definition at line 165 of file mitkMeshUtil.h.

Member Typedef Documentation

template<typename MeshType , class ScalarAccessor = NullScalarAccessor<MeshType>>
typedef itk::MatrixOffsetTransformBase<typename MeshType::CoordRepType, 3, 3> MeshUtil< MeshType, ScalarAccessor >::ITKTransformType

Definition at line 691 of file mitkMeshUtil.h.

template<typename MeshType , class ScalarAccessor = NullScalarAccessor<MeshType>>
typedef itk::MatrixOffsetTransformBase<mitk::ScalarType, 3, 3> MeshUtil< MeshType, ScalarAccessor >::MITKTransformType

Definition at line 692 of file mitkMeshUtil.h.

Member Function Documentation

template<typename MeshType , class ScalarAccessor = NullScalarAccessor<MeshType>>
static void MeshUtil< MeshType, ScalarAccessor >::ConvertTransformToItk ( const MITKTransformType mitkTransform,
ITKTransformType itkTransform 
)
inlinestatic

Convert a MITK transformation to an ITK transformation Necessary because ITK uses double and MITK uses float values

Definition at line 698 of file mitkMeshUtil.h.

template<typename MeshType , class ScalarAccessor = NullScalarAccessor<MeshType>>
static MeshType::Pointer MeshUtil< MeshType, ScalarAccessor >::CreateRegularSphereMesh ( typename MeshType::PointType  center,
typename MeshType::PointType::VectorType  scale,
int  resolution 
)
inlinestatic

Definition at line 1463 of file mitkMeshUtil.h.

References mitk::New().

template<typename MeshType , class ScalarAccessor = NullScalarAccessor<MeshType>>
static MeshType::Pointer MeshUtil< MeshType, ScalarAccessor >::CreateRegularSphereMesh2 ( typename MeshType::PointType  center,
typename MeshType::PointType  scale,
int  resolution 
)
inlinestatic

Definition at line 1549 of file mitkMeshUtil.h.

References mitk::New().

template<typename MeshType , class ScalarAccessor = NullScalarAccessor<MeshType>>
static MeshType::Pointer MeshUtil< MeshType, ScalarAccessor >::CreateSphereMesh ( typename MeshType::PointType  center,
typename MeshType::PointType  scale,
int *  resolution 
)
inlinestatic

Definition at line 1480 of file mitkMeshUtil.h.

References mitk::New().

template<typename MeshType , class ScalarAccessor = NullScalarAccessor<MeshType>>
static MeshType::Pointer MeshUtil< MeshType, ScalarAccessor >::MeshFromPolyData ( vtkPolyData *  poly,
mitk::BaseGeometry geometryFrame = NULL,
mitk::BaseGeometry polyDataGeometryFrame = NULL 
)
inlinestatic

create an itkMesh object from a vtkPolyData

Definition at line 722 of file mitkMeshUtil.h.

References MITK_ERROR, MITK_WARN, mitk::New(), and mitk::vtk2itk().

Referenced by MeshUtil< MeshType, ScalarAccessor >::MeshFromSurface().

template<typename MeshType , class ScalarAccessor = NullScalarAccessor<MeshType>>
static MeshType::Pointer MeshUtil< MeshType, ScalarAccessor >::MeshFromSurface ( mitk::Surface surface,
mitk::BaseGeometry geometryFrame = NULL 
)
inlinestatic
template<typename MeshType , class ScalarAccessor = NullScalarAccessor<MeshType>>
static vtkPolyData* MeshUtil< MeshType, ScalarAccessor >::MeshToPolyData ( MeshType *  mesh,
bool  onlyTriangles = false,
bool  useScalarAccessor = false,
unsigned int  pointDataType = 0,
mitk::BaseGeometry geometryFrame = NULL,
vtkPolyData *  polydata = NULL 
)
inlinestatic

create a vtkPolyData object from an itkMesh

default Distribute line cell visitior definition

default Distribute polygon cell visitior definition

default Distribute triangle cell visitior definition

default Distribute quad cell visitior definition

default Distribute triangle cell visitior definition

Definition at line 1235 of file mitkMeshUtil.h.

References mitk::itk2vtk(), MITK_ERROR, and mitk::New().

Referenced by mitk::MeshVtkMapper3D::GenerateDataForRenderer().

template<typename MeshType , class ScalarAccessor = NullScalarAccessor<MeshType>>
static vtkUnstructuredGrid* MeshUtil< MeshType, ScalarAccessor >::MeshToUnstructuredGrid ( MeshType *  mesh,
bool  usePointScalarAccessor = false,
bool  useCellScalarAccessor = false,
unsigned int  pointDataType = 0,
mitk::BaseGeometry geometryFrame = NULL 
)
inlinestatic

create an vtkUnstructuredGrid object from an itkMesh

default SingleCellArray line cell visitior definition

default SingleCellArray polygon cell visitior definition

default SingleCellArray triangle cell visitior definition

default SingleCellArray quad cell visitior definition

default SingleCellArray tetra cell visitior definition

default SingleCellArray hex cell visitior definition

Definition at line 999 of file mitkMeshUtil.h.

References mitk::itk2vtk(), MITK_FATAL, and mitk::New().


The documentation for this class was generated from the following file: