Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
mirtk::SurfaceRemeshing Class Reference

#include <SurfaceRemeshing.h>

Inheritance diagram for mirtk::SurfaceRemeshing:
Inheritance graph
Collaboration diagram for mirtk::SurfaceRemeshing:
Collaboration graph

Public Types

enum  Order { INDEX, AREA, SHORTEST_EDGE }
 Enumeration of cell order in which melting is performed. More...
 

Public Member Functions

 mirtkOnOffMacro (MeltNodes)
 Enable/disable melting of nodes with connectivity three.
 
 mirtkOnOffMacro (MeltTriangles)
 Enable/disable melting of triangles when all edges are too short.
 
 mirtkOnOffMacro (InvertTrianglesSharingOneLongEdge)
 Enable/disable inversion of triangles which share one long edge.
 
 mirtkOnOffMacro (InvertTrianglesToIncreaseMinHeight)
 Enable/disable inversion of triangles when it increases minimum height.
 
 mirtkOnOffMacro (BisectBoundaryEdges)
 Enable/disable bisection of boundary edges.
 
int NumberOfChanges () const
 Number of local remeshing operations.
 
int NumberOfMeltings () const
 Number of melting operations.
 
int NumberOfSubdivisions () const
 Number of subdivision operations.
 
SurfaceRemeshingoperator= (const SurfaceRemeshing &)
 Assignment operator.
 
 SurfaceRemeshing ()
 Default constructor.
 
 SurfaceRemeshing (const SurfaceRemeshing &)
 Copy constructor.
 
virtual ~SurfaceRemeshing ()
 Destructor.
 
- Public Member Functions inherited from mirtk::MeshFilter
vtkPolyData * GetOutput ()
 Get output surface mesh.
 
 mirtkOnOffMacro (DoublePrecision)
 Enable/disable double precision output.
 
virtual void Run ()
 Run filter.
 
void SetInput (vtkPolyData *)
 Set input surface mesh.
 
void SetInputData (vtkPolyData *)
 Set input surface mesh.
 
void Update ()
 Run filter.
 
- Public Member Functions inherited from mirtk::Object
virtual const char * NameOfClass () const =0
 Get name of class, which this object is an instance of.
 
virtual ParameterList Parameter () const
 Get parameter name/value pairs.
 
bool Parameter (const ParameterList &)
 Set parameters from name/value pairs.
 
virtual bool Set (const char *name, const char *value)
 
virtual ~Object ()
 Destructor.
 

Static Public Attributes

static MIRTK_PointSet_EXPORT const char *const MAX_EDGE_LENGTH
 Name of maximum edge length point data array.
 
static MIRTK_PointSet_EXPORT const char *const MIN_EDGE_LENGTH
 Name of minimum edge length point data array.
 

Protected Member Functions

void Bisect (vtkIdType, vtkIdType, vtkIdType, vtkIdType, vtkPolyData *)
 Bisect triangle.
 
void CopyAttributes (const SurfaceRemeshing &)
 Copy attributes of this class from another instance.
 
virtual void Execute ()
 Perform local remeshing passes.
 
virtual void Finalize ()
 Finalize filter execution.
 
virtual void Initialize ()
 Initialize filter after input and parameters are set.
 
void InitializeEdgeLengthRange ()
 Initialize edge length range for each node.
 
void InitializeMask ()
 Initialize point mask.
 
void Inversion ()
 Perform second pass: inversion of triangles sharing a long edge.
 
void InversionOfTrianglesSharingOneLongEdge ()
 Invert triangles which share one too long edge.
 
void InversionOfTrianglesToIncreaseMinHeight ()
 Invert triangles when minimum height over this edge increases.
 
bool MeltEdge (vtkIdType, vtkIdType, vtkIdType, vtkIdList *)
 Collapse single short edge of two adjacent triangles.
 
void Melting ()
 Perform first pass: melt edges or triangles if one or more edges are too short.
 
void MeltingOfCells ()
 Melt edges or triangle if one or more edge is too short.
 
void MeltingOfNodes ()
 Replace triangles adjacent to node with connectivity three by single triangle.
 
bool MeltTriangle (vtkIdType, vtkIdList *)
 Collapse entire triangle with more than one too short edges.
 
 mirtkAttributeMacro (vtkSmartPointer< vtkPolyData >, Surface)
 Shallow copy of input surface with additional internal point data.
 
 mirtkAttributeMacro (vtkSmartPointer< vtkDataArray >, Mask)
 Combined surface point mask.
 
 mirtkAttributeMacro (OrderedSet< int >, CategoricalPointDataIndices)
 
 mirtkAttributeMacro (vtkSmartPointer< vtkDataArray >, MinEdgeLengthArray)
 Per-node minimum edge length.
 
 mirtkAttributeMacro (vtkSmartPointer< vtkDataArray >, MaxEdgeLengthArray)
 Per-node maximum edge length.
 
 mirtkAttributeMacro (vtkSmartPointer< vtkPriorityQueue >, MeltingQueue)
 Priority queue used by melting pass.
 
 mirtkPublicAggregateMacro (const class Transformation, Transformation)
 Optional input transformation used to determine edge length and triangle area.
 
 mirtkPublicAttributeMacro (vtkSmartPointer< vtkDataArray >, PointMask)
 
 mirtkPublicAttributeMacro (vtkSmartPointer< vtkDataArray >, CellMask)
 
 mirtkPublicAttributeMacro (double, MinFeatureAngle)
 
 mirtkPublicAttributeMacro (double, MaxFeatureAngle)
 
 mirtkPublicAttributeMacro (double, MinEdgeLength)
 Minimum edge length.
 
 mirtkPublicAttributeMacro (double, MaxEdgeLength)
 Maximum edge length.
 
 mirtkPublicAttributeMacro (vtkSmartPointer< vtkDataArray >, AdaptiveEdgeLengthArray)
 
 mirtkPublicAttributeMacro (vtkSmartPointer< vtkDataArray >, MinCellEdgeLengthArray)
 Per-cell minimum edge length.
 
 mirtkPublicAttributeMacro (vtkSmartPointer< vtkDataArray >, MaxCellEdgeLengthArray)
 Per-cell maximum edge length.
 
 mirtkPublicAttributeMacro (Order, MeltingOrder)
 Define in which order to process the cells in the melting pass.
 
 mirtkPublicAttributeMacro (bool, MeltNodes)
 Whether to melt nodes with connectivity three by merging the adjacent triangles.
 
 mirtkPublicAttributeMacro (bool, MeltTriangles)
 Whether to melt entire triangles if all three edges are below threshold.
 
 mirtkPublicAttributeMacro (bool, InvertTrianglesSharingOneLongEdge)
 Invert pairs of triangles which share an edge that is longer than the maximum.
 
 mirtkPublicAttributeMacro (bool, InvertTrianglesToIncreaseMinHeight)
 Invert edge of two triangles when it increases the minimum height.
 
 mirtkPublicAttributeMacro (bool, BisectBoundaryEdges)
 Whether to allow bisection of boundary edges.
 
 mirtkReadOnlyAttributeMacro (int, NumberOfMeltedNodes)
 Number of melted nodes with connectivity 3.
 
 mirtkReadOnlyAttributeMacro (int, NumberOfMeltedEdges)
 Number of melted edges.
 
 mirtkReadOnlyAttributeMacro (int, NumberOfMeltedCells)
 Number of melted triangles.
 
 mirtkReadOnlyAttributeMacro (int, NumberOfInversions)
 Number of edge inversions.
 
 mirtkReadOnlyAttributeMacro (int, NumberOfBisections)
 Number of bisections.
 
 mirtkReadOnlyAttributeMacro (int, NumberOfTrisections)
 Number of trisections.
 
 mirtkReadOnlyAttributeMacro (int, NumberOfQuadsections)
 Number of quadsections.
 
void Quadsect (vtkIdType, vtkIdType, vtkIdType, vtkIdType, vtkPolyData *)
 Quadsect triangle.
 
void Subdivision ()
 Perform third pass: subdivide triangles with remaining long edges.
 
void Trisect (vtkIdType, vtkIdType, vtkIdType, vtkIdType, vtkPolyData *)
 Trisect triangle.
 
- Protected Member Functions inherited from mirtk::SurfaceFilter
SurfaceFilteroperator= (const SurfaceFilter &)
 Assignment operator.
 
 SurfaceFilter ()
 Default constructor.
 
 SurfaceFilter (const SurfaceFilter &)
 Copy constructor.
 
virtual ~SurfaceFilter ()
 Destructor.
 
- Protected Member Functions inherited from mirtk::MeshFilter
virtual void InitializeEdgeTable ()
 To be called by subclass in Initialize when _EdgeTable is needed.
 
 MeshFilter ()
 Default constructor.
 
 MeshFilter (const MeshFilter &)
 Copy constructor.
 
vtkSmartPointer< vtkDataArray > NewArray (const char *name, vtkIdType n, int c, int type=VTK_VOID) const
 
vtkSmartPointer< vtkDataArray > NewArray (const char *name, int c=1, int type=VTK_VOID) const
 
vtkSmartPointer< vtkDataArray > NewCellArray (const char *name, int c=1, int type=VTK_VOID) const
 
vtkSmartPointer< vtkDataArray > NewPointArray (const char *name, int c=1, int type=VTK_VOID) const
 
MeshFilteroperator= (const MeshFilter &)
 Assignment operator.
 
virtual ~MeshFilter ()
 Destructor.
 
- Protected Member Functions inherited from mirtk::Object
template<typename... Args>
void Throw (ErrorType err, const char *func, Args... args) const
 

Protected Attributes

double _MaxFeatureAngleCos
 1 - cos(_MaxFeatureAngle)
 
double _MinFeatureAngleCos
 1 - cos(_MinFeatureAngle)
 

Additional Inherited Members

- Static Public Member Functions inherited from mirtk::Object
static const char * NameOfType ()
 Get name of this class type.
 
- Static Protected Member Functions inherited from mirtk::Object
template<typename... Args>
static void ThrowStatic (ErrorType err, const char *cls, const char *func, Args... args)
 

Detailed Description

Adaptive local remeshing of triangulated surface mesh

Park et al., A non-self-intersecting adaptive deformable surface for complex boundary extraction from volumetric images, 25, 421–440 (2001).

Todo:
Interpolate cell data during remeshing. The current implementation only preserves and interpolates point data arrays. Cell attributes are discarded.

Definition at line 51 of file SurfaceRemeshing.h.

Member Enumeration Documentation

§ Order

Enumeration of cell order in which melting is performed.

Enumerator
INDEX 

Cell index.

AREA 

Cell area.

SHORTEST_EDGE 

Length of shortest edge.

Definition at line 61 of file SurfaceRemeshing.h.

Member Function Documentation

§ mirtkAttributeMacro()

mirtk::SurfaceRemeshing::mirtkAttributeMacro ( OrderedSet< int >  ,
CategoricalPointDataIndices   
)
protected

Indices of point data arrays with categorical data that requires a voting scheme instead of arithmetic averaging of data values

§ mirtkPublicAttributeMacro() [1/5]

mirtk::SurfaceRemeshing::mirtkPublicAttributeMacro ( vtkSmartPointer< vtkDataArray >  ,
PointMask   
)
protected

Surface point mask, only melting operations which do not modify points or edges connecting two such points that have a zero mask value are allowed when this mask is specified

§ mirtkPublicAttributeMacro() [2/5]

mirtk::SurfaceRemeshing::mirtkPublicAttributeMacro ( vtkSmartPointer< vtkDataArray >  ,
CellMask   
)
protected

Surface cell mask, only melting operations which do not modify cells that have a zero mask value are allowed when this mask is specified

§ mirtkPublicAttributeMacro() [3/5]

mirtk::SurfaceRemeshing::mirtkPublicAttributeMacro ( double  ,
MinFeatureAngle   
)
protected

Minimum angle between edge end point normals to consider the edge as an important feature edge which is excluded from any melting operation.

§ mirtkPublicAttributeMacro() [4/5]

mirtk::SurfaceRemeshing::mirtkPublicAttributeMacro ( double  ,
MaxFeatureAngle   
)
protected

If edge end point normals make up an angle greater than this maximum feature angle, the respective edge is subdivided even if the edge is shorter than the _MaxEdgeLength if both edges resulting from splitting the edge in half are at least _MinEdgeLength long.

§ mirtkPublicAttributeMacro() [5/5]

mirtk::SurfaceRemeshing::mirtkPublicAttributeMacro ( vtkSmartPointer< vtkDataArray >  ,
AdaptiveEdgeLengthArray   
)
protected

Point data array used to adapt the edge length range for each node

The scalar point data values are rescaled linearly to [0, 1] after clamping the point data range to the 5th and 95th percentile range. The rescaled value is then plugged into a logistic function which determines the linear interpolation weights of the global _MinEdgeLength and _MaxEdgeLength range. This obtains an individual edge length range for each point. The desired edge length range of a given edge is then the mean of the minimum/maximum edge length of the two end points of the edge.


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