Medical Imaging Interaction Toolkit  2018.4.99-389bf124
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=nullptr, mitk::BaseGeometry *polyDataGeometryFrame=nullptr)
 
static MeshType::Pointer MeshFromSurface (mitk::Surface *surface, mitk::BaseGeometry *geometryFrame=nullptr)
 
static vtkUnstructuredGrid * MeshToUnstructuredGrid (MeshType *mesh, bool usePointScalarAccessor=false, bool useCellScalarAccessor=false, unsigned int pointDataType=0, mitk::BaseGeometry *geometryFrame=nullptr)
 
static vtkPolyData * MeshToPolyData (MeshType *mesh, bool onlyTriangles=false, bool useScalarAccessor=false, unsigned int pointDataType=0, mitk::BaseGeometry *geometryFrame=nullptr, vtkPolyData *polydata=nullptr)
 
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 161 of file mitkMeshUtil.h.

Member Typedef Documentation

◆ ITKTransformType

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

Definition at line 687 of file mitkMeshUtil.h.

◆ MITKTransformType

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

Definition at line 688 of file mitkMeshUtil.h.

Member Function Documentation

◆ ConvertTransformToItk()

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 694 of file mitkMeshUtil.h.

◆ CreateRegularSphereMesh()

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 1459 of file mitkMeshUtil.h.

◆ CreateRegularSphereMesh2()

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 1545 of file mitkMeshUtil.h.

◆ CreateSphereMesh()

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 1476 of file mitkMeshUtil.h.

◆ MeshFromPolyData()

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

create an itkMesh object from a vtkPolyData

Definition at line 718 of file mitkMeshUtil.h.

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

◆ MeshFromSurface()

template<typename MeshType , class ScalarAccessor = NullScalarAccessor<MeshType>>
static MeshType::Pointer MeshUtil< MeshType, ScalarAccessor >::MeshFromSurface ( mitk::Surface surface,
mitk::BaseGeometry geometryFrame = nullptr 
)
inlinestatic

create an itkMesh object from an mitk::Surface

Definition at line 985 of file mitkMeshUtil.h.

References mitk::BaseData::GetGeometry(), and mitk::Surface::GetVtkPolyData().

◆ MeshToPolyData()

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 = nullptr,
vtkPolyData *  polydata = nullptr 
)
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 1231 of file mitkMeshUtil.h.

References mitk::itk2vtk(), and MITK_ERROR.

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

◆ MeshToUnstructuredGrid()

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 = nullptr 
)
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 995 of file mitkMeshUtil.h.

References mitk::itk2vtk(), and MITK_FATAL.


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