mds::seg::CTetraMesh Class Reference

#include <mdsTetraMesh.h>

Inheritance diagram for mds::seg::CTetraMesh:

Inheritance graph
[legend]
List of all members.

Detailed Description

If this macro is defined, various informations are logged.

Class representing adaptive tetrahedral mesh.


Public Types

enum  { MARKED = 1 << 10, DOMAIN_BOUNDARY = 1 << 11 }
 Custom flags used to mark vertices in the mesh. More...
typedef std::vector< CTetraFeaturestSegments
 Vector of image features.
typedef mds::base::CSharedPtr<
CTetraMesh
tSmartPtr
 Smart pointer type.

Public Member Functions

bool approachEdges (bool bCheckIsotropicMinEdgeLength=false)
 Introduces new points lying on image edges to the mesh.
virtual bool attractVertex (vctl::MCPoint3D *pPoint)
 Modifies position of a given vertex.
void changeRegion (int iMinIndex, int iMaxIndex=-1, int iFinalRegion=-1)
 Overrides classification of all tetrahedron in a specified region.
bool checkBoundaryEdge (vctl::MCEdge *pEdge, vctl::MCVector3D *pNormal, double dThreshold=DEFAULT_DISTANCE_THRESHOLD)
 Checks if a given edge is a boundary edge.
bool checkBoundaryTriangle (vctl::MCPoint3D *p0, vctl::MCPoint3D *p1, vctl::MCPoint3D *p2, double dThreshold=DEFAULT_DISTANCE_THRESHOLD)
 Checks if a given triangle forms boundary between two regions.
bool checkTetrahedronVolume (vctl::MCTetra *pTetra)
 Checks a tetrahedron volume.
bool classifyAdjacent (double dBThreshold=DEFAULT_DISTANCE_THRESHOLD)
 Classify all non-classified tetrahedra with respect to the neighbours.
void clearTriangles ()
 Clears the helper list of triangles.
void createTriangles (double dQuality, int iRegion=-1)
 Creates the helper list of triangles.
void createTriangles (double a, double b, double c, double d, int iRegion=-1)
 Creates the helper list of triangles.
void createTriangles (int iRegion=-1, bool bBoundary=false)
 Creates the helper list of triangles.
 CTetraMesh ()
 Default constructor.
template<class S>
void deserialize (mds::mod::CChannelSerializer< S > &Reader)
 Deserializes all class members the tetrahedron mesh.
bool edgeSplitting (double dOrientThreshold=DEFAULT_SPLITTING_THRESHOLD)
 Adaptation of the triangular mesh to the underlying volume.
int evalEdgeDistancePoint (vctl::MCPoint3D *pPoint, mds::img::CPoint3D &Normal, int iMaxDistance)
bool evaluateFeatures (bool bSkipSmall=true)
 Evaluates features of all tetrahedra in the mesh.
bool evaluateSegmentFeatures (bool bSkipSmall=true)
 Evaluates features of all segments in the mesh.
void findIsolatedRegions ()
 Identifies individual isolated regions of tetrahedra in the pre-classified mesh.
double getControlSpaceLength (vctl::MCPoint3D &p1, vctl::MCPoint3D &p2)
 Returns length of the edge in the control space.
mds::img::CDensityVolume * getControlSpacePtr ()
 Returns pointer to the underlying control space volume.
double getControlSpaceValue (const mds::img::CPoint3D &Point)
 Returns subpixel control space value.
double getCornerMinEdgeLength ()
 Returns the minimal edge length near corners.
mds::img::CDensityVolume * getEdgeVolumePtr ()
 Returns pointer to the underlying edge volume.
vctl::MCTri * getFirstTriangle ()
 Returns pointer to the first triangle in the helper list.
int getNumOfSegments () const
 Returns number of regions.
int getNumOfTriangles ()
 Returns the number of triangles in the helper list.
tSegmentsgetSegments ()
 Returns vector of image features.
vctl::MCTriS * getTriangles ()
 Returns pointer to the helper list of triangles.
double getVertexNeighbourhood ()
 Return size of a neighbourhood used to attract new vertex to an image edge.
mds::img::CDensityVolume * getVolumePtr ()
 Returns pointer to the underlying volume.
bool init (double dThreshold=DEFAULT_INIT_THRESHOLD, tSize CellSize=DEFAULT_CELL, tSize NumOfNodes=DEFAULT_NUMBER_OF_NODES)
 Initializes the Delaunay triangulation.
bool isBoundaryTriangle (vctl::MCVertex *p0, vctl::MCVertex *p1, vctl::MCVertex *p2)
 Basic test if a given triangle forms boundary between two regions.
bool isotropicAttractVertex (vctl::MCPoint3D *pPoint)
 Modifies position of a given vertex.
bool isotropicEdgeSplitting (double dThreshold, bool bBoundaryEdges=false)
 Helper vertex position accumulator structure used by variational meshing.
bool isotropicSplitEdge (vctl::MCVertex *pV0, vctl::MCVertex *pV1, double dThreshold, tPoints &EdgePoints, tPoints &Points, bool bBoundary=false)
 Anisotropic splitting of a given edge.
bool isotropicSplitSubEdge (vctl::MCPoint3D &p1, vctl::MCPoint3D &p2, double dThreshold, double dRestrictedZone, tPoints &Points)
 Anisotropic splitting of a given edge.
bool isotropicVertexMoving ()
 Adaptation of the mesh by means of a vertex moving.
bool markBoundaryVertices ()
 Finds all vertices lying close to an image edge.
 MDS_ENTITY_BLOCK_SIZE (4096)
 Standard method getEntityBlockSize().
 MDS_ENTITY_COMPRESSION (mds::mod::CC_RAW)
 Standard method getEntityCompression().
 MDS_ENTITY_NAME ("TetraMesh")
 Standard method getEntityName().
bool noiseReduction ()
 Removes noisy (wrong classified) tetrahedra in the mesh.
bool optimizeByVertexMoving (double dMinQuality)
 Optimization of the mesh by means of a vertex moving.
bool prepareControlSpace (double dK=DEFAULT_K, double dAvgTetrahedronSize=DEFAULT_AVG_TETRA_SIZE)
 Makes the control space necessary for anisotropic meshing.
void reassignRegions ()
 Eliminates unused indexes of regions shaking down all currently assigned indexes.
bool regionGrowing (CTetraSimilarityMeasure &Measure, double dBThreshold=DEFAULT_DISTANCE_THRESHOLD)
 Simple region growing segmentation.
bool regionMerging (CTetraSimilarityMeasure &Measure, double dBThreshold=DEFAULT_DISTANCE_THRESHOLD, double dDeltaThreshold=DEFAULT_DELTA_THRESHOLD, tSize NumOfRegions=-1, bool bMergeAdjacent=true)
 Aglomerative merging of regions in the mesh.
bool saveSTL (mds::mod::CChannel &Channel)
 Writes the helper list of triangles to a given output channel in STL format.
bool saveVRML (mds::mod::CChannel &Channel)
 Writes the helper list of triangles to a given output channel in VRML format.
template<class S>
void serialize (mds::mod::CChannelSerializer< S > &Writer)
 Serializes the tetrahedron mesh.
void setControlSpace (mds::img::CDensityVolume *pControlSpace)
 Selection of the volume for segmentation.
void setCornerMinEdgeLength (double dValue=DEFAULT_CORNER_MIN_EDGE_LENGTH)
 Sets minimal allowed edge length in the triangulation near corners.
void setEdgeVolume (mds::img::CDensityVolume *pEdgeVolume)
 Selection of the volume for segmentation.
void setNumOfSegments (int i)
 Sets the number of regions.
void setVertexNeighbourhood (tSize Value=DEFAULT_VERTEX_NEIGHBOURHOOD)
 Sets size of a neighbourhood used to attract new vertex to an image edge.
void setVolume (mds::img::CDensityVolume *pVolume)
 Selection of the volume for segmentation.
bool splitEdge (vctl::MCEdge *pEdge, double dThreshold, tPoints &Points)
 Splits a given edge.
bool splitTetrahedron (vctl::MCTetra *pTetrahedron)
 Splits a given tetrahedron.
bool subpixelAttractVertex (vctl::MCPoint3D *pPoint)
 Modifies position of a given vertex.
bool subpixelVertexMoving ()
 Adaptation of the mesh by means of a vertex moving.
bool tetrahedronSplitting (CTetraHomogeneityMeasure &Measure)
 Adaptation of the triangular mesh to the underlying volume.
bool variationalMeshing (bool bCheckIsotropicMinEdgeLength=false)
 Variational approach to tetrahedral isotropic meshing.
void visualize (mds::img::CDVolume *pVolume)
 Visualizes the triangular mesh.
virtual ~CTetraMesh ()
 Virtual destructor.

Static Public Member Functions

static bool checkBoundaryFacetFunc (vctl::MCPoint3D *p1, vctl::MCPoint3D *p2, vctl::MCPoint3D *p3, CDelaunayTetra *pMesh)
 Checks if a given facet forms boundary between two image regions.
static bool checkIsotropicMinEdgeLengthFunc (vctl::MCPoint3D *p1, vctl::MCPoint3D *p2, CDelaunayTetra *pMesh)
 Checks minimal edge length in the cavity.
static bool checkIsotropicMinEdgeLengthFunc2 (vctl::MCPoint3D *p1, vctl::MCPoint3D *p2, CDelaunayTetra *pMesh)
static bool checkNoImageEdgeIntersectionFunc (vctl::MCPoint3D *p1, vctl::MCPoint3D *p2, CDelaunayTetra *pMesh)
 Checks if edge intersects any image edge.
static void edgeSplittingInsertFunc (vctl::MCTetra *pTetrahedron, CDelaunayTetra *pMesh)
 Inserts tetrahedron edges to the list of edges.
static void edgeSplittingRemoveFunc (vctl::MCTetra *pTetrahedron, CDelaunayTetra *pMesh)
 Inserts tetrahedron edges to the list of edges.
static void isotropicEdgeSplittingInsertFunc (vctl::MCTetra *pTetrahedron, CDelaunayTetra *pMesh)
 Inserts tetrahedron edges to the list of edges.
static void isotropicEdgeSplittingRemoveFunc (vctl::MCTetra *pTetrahedron, CDelaunayTetra *pMesh)
 Inserts tetrahedron edges to the list of edges.
static void tetrahedronSplittingInsertFunc (vctl::MCTetra *pTetrahedron, CDelaunayTetra *pMesh)
 Evaluates tetrahedron homogeneity and inserts tetrahedron to the sorted queue.
static void tetrahedronSplittingRemoveFunc (vctl::MCTetra *pTetrahedron, CDelaunayTetra *pMesh)
 Unsorts tetrahedron from the queue.

Static Public Attributes

static const double DEFAULT_AVG_TETRA_SIZE = 30.0
static const tSize DEFAULT_CELL = 3
 Default parameters.
static const tSize DEFAULT_CELL_MARGIN = 5
static const double DEFAULT_CORNER_MIN_EDGE_LENGTH = 0.5
static const double DEFAULT_DELTA_THRESHOLD = 1.5
static const double DEFAULT_DISTANCE_THRESHOLD = 1.5
static const double DEFAULT_INIT_THRESHOLD = 0.5
static const double DEFAULT_K = 1.0
static const double DEFAULT_SPLITTING_THRESHOLD = 0.5
static const tSize DEFAULT_VERTEX_NEIGHBOURHOOD = 3
static const double MIN_TETRAHEDRON_VOLUME = 2.0

Protected Types

typedef std::vector< vctl::MCPoint3D > tPoints
 Vector of points.

Protected Attributes

double m_dCornerMinEdgeLength
 ! Minimal edge length near corners.
int m_iNumOfSegments
 Number of segments in the mesh.
CTetraHomogeneityMeasurem_pHomogeneityMeasure
 Currently used homogeneity measure.
tSegments m_Segments
 Vector of image features extracted for every region.
mds::img::CDensityVolumePtr m_spControlSpace
 Pointer to the control space.
mds::img::CDensityVolumePtr m_spEdgeVolume
 Pointer to the underlying edge volume.
mds::img::CDensityVolumePtr m_spVolume
 Pointer to the underlying volume.
mds::tSize m_VertexNeighbourhood
 Size of a neighbourhood used to attract new vertex to an image edge.

Friends

class mds::base::CSharedPtr< CTetraMesh >


Member Typedef Documentation

typedef std::vector<vctl::MCPoint3D> mds::seg::CTetraMesh::tPoints [protected]
 

Vector of points.

typedef std::vector<CTetraFeatures> mds::seg::CTetraMesh::tSegments
 

Vector of image features.

typedef mds::base::CSharedPtr< CTetraMesh > mds::seg::CTetraMesh::tSmartPtr
 

Smart pointer type.

  • Declares type tSmartPtr.

Reimplemented from mds::seg::CDelaunayTetra.


Member Enumeration Documentation

anonymous enum
 

Custom flags used to mark vertices in the mesh.

Enumerator:
MARKED  Flag used to mark vertices during splitting.
DOMAIN_BOUNDARY  Flag used to mark boundary vertices during the variational meshing.

Reimplemented from mds::seg::CDelaunayTetra.


Constructor & Destructor Documentation

mds::seg::CTetraMesh::CTetraMesh  ) 
 

Default constructor.

mds::seg::CTetraMesh::~CTetraMesh  )  [virtual]
 

Virtual destructor.


Member Function Documentation

bool mds::seg::CTetraMesh::approachEdges bool  bCheckIsotropicMinEdgeLength = false  ) 
 

Introduces new points lying on image edges to the mesh.

  • Edge volume must be set!

bool mds::seg::CTetraMesh::attractVertex vctl::MCPoint3D *  pPoint  )  [virtual]
 

Modifies position of a given vertex.

  • Attracts vertex to the closest image edge.
  • Edge volume must be set!

Reimplemented from mds::seg::CDelaunayTetra.

void mds::seg::CTetraMesh::changeRegion int  iMinIndex,
int  iMaxIndex = -1,
int  iFinalRegion = -1
 

Overrides classification of all tetrahedron in a specified region.

bool mds::seg::CTetraMesh::checkBoundaryEdge vctl::MCEdge *  pEdge,
vctl::MCVector3D *  pNormal,
double  dThreshold = DEFAULT_DISTANCE_THRESHOLD
 

Checks if a given edge is a boundary edge.

  • Returns true if the edge and some image edge are parallel.

bool mds::seg::CTetraMesh::checkBoundaryFacetFunc vctl::MCPoint3D *  p1,
vctl::MCPoint3D *  p2,
vctl::MCPoint3D *  p3,
CDelaunayTetra pMesh
[static]
 

Checks if a given facet forms boundary between two image regions.

  • Returns true if the facet is parallel with some image edge.

bool mds::seg::CTetraMesh::checkBoundaryTriangle vctl::MCPoint3D *  p0,
vctl::MCPoint3D *  p1,
vctl::MCPoint3D *  p2,
double  dThreshold = DEFAULT_DISTANCE_THRESHOLD
 

Checks if a given triangle forms boundary between two regions.

  • Returns true if the triangle and some image edge are parallel.

bool mds::seg::CTetraMesh::checkIsotropicMinEdgeLengthFunc vctl::MCPoint3D *  p1,
vctl::MCPoint3D *  p2,
CDelaunayTetra pMesh
[static]
 

Checks minimal edge length in the cavity.

bool mds::seg::CTetraMesh::checkIsotropicMinEdgeLengthFunc2 vctl::MCPoint3D *  p1,
vctl::MCPoint3D *  p2,
CDelaunayTetra pMesh
[static]
 

bool mds::seg::CTetraMesh::checkNoImageEdgeIntersectionFunc vctl::MCPoint3D *  p1,
vctl::MCPoint3D *  p2,
CDelaunayTetra pMesh
[static]
 

Checks if edge intersects any image edge.

bool mds::seg::CTetraMesh::checkTetrahedronVolume vctl::MCTetra *  pTetra  ) 
 

Checks a tetrahedron volume.

bool mds::seg::CTetraMesh::classifyAdjacent double  dBThreshold = DEFAULT_DISTANCE_THRESHOLD  ) 
 

Classify all non-classified tetrahedra with respect to the neighbours.

  • This method doesn't use image features for classification!
  • Both images must be set!

void mds::seg::CTetraMesh::clearTriangles  ) 
 

Clears the helper list of triangles.

void mds::seg::CTetraMesh::createTriangles double  dQuality,
int  iRegion = -1
 

Creates the helper list of triangles.

  • Faces of all slivers.

void mds::seg::CTetraMesh::createTriangles double  a,
double  b,
double  c,
double  d,
int  iRegion = -1
 

Creates the helper list of triangles.

  • Faces of all tetrahedra on the positive side of a given plane are generated.

void mds::seg::CTetraMesh::createTriangles int  iRegion = -1,
bool  bBoundary = false
 

Creates the helper list of triangles.

  • If index of the tetrahedron segment is equal to -1, the list of all triangles in the mesh is going to be created.

template<class S>
void mds::seg::CTetraMesh::deserialize mds::mod::CChannelSerializer< S > &  Reader  )  [inline]
 

Deserializes all class members the tetrahedron mesh.

Reimplemented from mds::seg::CDelaunayTetra.

bool mds::seg::CTetraMesh::edgeSplitting double  dOrientThreshold = DEFAULT_SPLITTING_THRESHOLD  ) 
 

Adaptation of the triangular mesh to the underlying volume.

  • Edge splitting algorithm.
  • Both volumes must be set!

void mds::seg::CTetraMesh::edgeSplittingInsertFunc vctl::MCTetra *  pTetrahedron,
CDelaunayTetra pMesh
[static]
 

Inserts tetrahedron edges to the list of edges.

void mds::seg::CTetraMesh::edgeSplittingRemoveFunc vctl::MCTetra *  pTetrahedron,
CDelaunayTetra pMesh
[static]
 

Inserts tetrahedron edges to the list of edges.

int mds::seg::CTetraMesh::evalEdgeDistancePoint vctl::MCPoint3D *  pPoint,
mds::img::CPoint3D &  Normal,
int  iMaxDistance
 

bool mds::seg::CTetraMesh::evaluateFeatures bool  bSkipSmall = true  ) 
 

Evaluates features of all tetrahedra in the mesh.

  • Underlying volume must be set!

bool mds::seg::CTetraMesh::evaluateSegmentFeatures bool  bSkipSmall = true  ) 
 

Evaluates features of all segments in the mesh.

  • Underlying image must be set!
  • Tetrahedra in the mesh must be classified to regions!

void mds::seg::CTetraMesh::findIsolatedRegions  ) 
 

Identifies individual isolated regions of tetrahedra in the pre-classified mesh.

double mds::seg::CTetraMesh::getControlSpaceLength vctl::MCPoint3D &  p1,
vctl::MCPoint3D &  p2
 

Returns length of the edge in the control space.

mds::img::CDensityVolume* mds::seg::CTetraMesh::getControlSpacePtr  )  [inline]
 

Returns pointer to the underlying control space volume.

double mds::seg::CTetraMesh::getControlSpaceValue const mds::img::CPoint3D &  Point  ) 
 

Returns subpixel control space value.

double mds::seg::CTetraMesh::getCornerMinEdgeLength  )  [inline]
 

Returns the minimal edge length near corners.

mds::img::CDensityVolume* mds::seg::CTetraMesh::getEdgeVolumePtr  )  [inline]
 

Returns pointer to the underlying edge volume.

vctl::MCTri* mds::seg::CTetraMesh::getFirstTriangle  )  [inline]
 

Returns pointer to the first triangle in the helper list.

  • Returns NULL if there is no triangle in the list.

int mds::seg::CTetraMesh::getNumOfSegments  )  const [inline]
 

Returns number of regions.

int mds::seg::CTetraMesh::getNumOfTriangles  )  [inline]
 

Returns the number of triangles in the helper list.

tSegments& mds::seg::CTetraMesh::getSegments  )  [inline]
 

Returns vector of image features.

vctl::MCTriS* mds::seg::CTetraMesh::getTriangles  )  [inline]
 

Returns pointer to the helper list of triangles.

double mds::seg::CTetraMesh::getVertexNeighbourhood  )  [inline]
 

Return size of a neighbourhood used to attract new vertex to an image edge.

mds::img::CDensityVolume* mds::seg::CTetraMesh::getVolumePtr  )  [inline]
 

Returns pointer to the underlying volume.

bool mds::seg::CTetraMesh::init double  dThreshold = DEFAULT_INIT_THRESHOLD,
tSize  CellSize = DEFAULT_CELL,
tSize  NumOfNodes = DEFAULT_NUMBER_OF_NODES
 

Initializes the Delaunay triangulation.

  • Uses vertex detector to initialize the list of vertices.
  • Removes all tetrahedra.
  • Underlying edge volume must be set!

bool mds::seg::CTetraMesh::isBoundaryTriangle vctl::MCVertex *  p0,
vctl::MCVertex *  p1,
vctl::MCVertex *  p2
 

Basic test if a given triangle forms boundary between two regions.

  • Returns true if all triangle vertices are marked with the DOMAIN_BOUNDARY flag.
  • The method markBoundaryVertices() must be called first!

bool mds::seg::CTetraMesh::isotropicAttractVertex vctl::MCPoint3D *  pPoint  ) 
 

Modifies position of a given vertex.

  • Attracts vertex to the closest local minima of the control space.
  • Simple gradient descent method is used to find the minima.
  • Control space and edge volume must be set!

bool mds::seg::CTetraMesh::isotropicEdgeSplitting double  dThreshold,
bool  bBoundaryEdges = false
 

Helper vertex position accumulator structure used by variational meshing.

  • Isotropic edge splitting algorithm based on the control space.
  • Control space and edge volume must be set!

void mds::seg::CTetraMesh::isotropicEdgeSplittingInsertFunc vctl::MCTetra *  pTetrahedron,
CDelaunayTetra pMesh
[static]
 

Inserts tetrahedron edges to the list of edges.

void mds::seg::CTetraMesh::isotropicEdgeSplittingRemoveFunc vctl::MCTetra *  pTetrahedron,
CDelaunayTetra pMesh
[static]
 

Inserts tetrahedron edges to the list of edges.

bool mds::seg::CTetraMesh::isotropicSplitEdge vctl::MCVertex *  pV0,
vctl::MCVertex *  pV1,
double  dThreshold,
tPoints EdgePoints,
tPoints Points,
bool  bBoundary = false
 

Anisotropic splitting of a given edge.

  • Returns true if the edge was divided.

bool mds::seg::CTetraMesh::isotropicSplitSubEdge vctl::MCPoint3D &  p1,
vctl::MCPoint3D &  p2,
double  dThreshold,
double  dRestrictedZone,
tPoints Points
 

Anisotropic splitting of a given edge.

  • Returns true if the edge was divided.

bool mds::seg::CTetraMesh::isotropicVertexMoving  ) 
 

Adaptation of the mesh by means of a vertex moving.

  • Attracts vertices to the closest local minima of the control space.
  • Simple gradient descent method is used to find the minima.
  • Control space and edge volume must be set!

bool mds::seg::CTetraMesh::markBoundaryVertices  ) 
 

Finds all vertices lying close to an image edge.

These vertices are expected to form boundary/surface between regions.

  • Marks all found vertices using the DOMAIN_BOUDNARY flag.
  • Edge volume must be set!

mds::seg::CTetraMesh::MDS_ENTITY_BLOCK_SIZE 4096   ) 
 

Standard method getEntityBlockSize().

Reimplemented from mds::seg::CDelaunayTetra.

mds::seg::CTetraMesh::MDS_ENTITY_COMPRESSION mds::mod::CC_RAW   ) 
 

Standard method getEntityCompression().

Reimplemented from mds::seg::CDelaunayTetra.

mds::seg::CTetraMesh::MDS_ENTITY_NAME "TetraMesh"   ) 
 

Standard method getEntityName().

bool mds::seg::CTetraMesh::noiseReduction  ) 
 

Removes noisy (wrong classified) tetrahedra in the mesh.

  • Principle of the noise removal algorithm is similar to the median filtering approach which is well known in image processing.

bool mds::seg::CTetraMesh::optimizeByVertexMoving double  dMinQuality  ) 
 

Optimization of the mesh by means of a vertex moving.

  • Used to eliminate thin tetrahedra and slivers.
  • Finally, the Delaunay triangulation is reconstructed using a set of unchanged and moved vertices.
  • Edge volume must be set!
  • Parameter specifies a minimal required tetrahedron quality, the best value (= equilateral tetrahedron) is equal to one.

bool mds::seg::CTetraMesh::prepareControlSpace double  dK = DEFAULT_K,
double  dAvgTetrahedronSize = DEFAULT_AVG_TETRA_SIZE
 

Makes the control space necessary for anisotropic meshing.

  • Original volume and edge volume must be set!

void mds::seg::CTetraMesh::reassignRegions  ) 
 

Eliminates unused indexes of regions shaking down all currently assigned indexes.

bool mds::seg::CTetraMesh::regionGrowing CTetraSimilarityMeasure Measure,
double  dBThreshold = DEFAULT_DISTANCE_THRESHOLD
 

Simple region growing segmentation.

Every region grows while a given similarity predicate holds and boundary edge is not touched.

  • Image features must be evaluated!
  • Both images must be set!

bool mds::seg::CTetraMesh::regionMerging CTetraSimilarityMeasure Measure,
double  dBThreshold = DEFAULT_DISTANCE_THRESHOLD,
double  dDeltaThreshold = DEFAULT_DELTA_THRESHOLD,
tSize  NumOfRegions = -1,
bool  bMergeAdjacent = true
 

Aglomerative merging of regions in the mesh.

  • Evaluates image features.
  • Both images must be set!

bool mds::seg::CTetraMesh::saveSTL mds::mod::CChannel &  Channel  ) 
 

Writes the helper list of triangles to a given output channel in STL format.

  • Returns false on failure.

bool mds::seg::CTetraMesh::saveVRML mds::mod::CChannel &  Channel  ) 
 

Writes the helper list of triangles to a given output channel in VRML format.

  • Returns false on failure.
  • Modified Premek Krsek's original code.

template<class S>
void mds::seg::CTetraMesh::serialize mds::mod::CChannelSerializer< S > &  Writer  )  [inline]
 

Serializes the tetrahedron mesh.

Reimplemented from mds::seg::CDelaunayTetra.

void mds::seg::CTetraMesh::setControlSpace mds::img::CDensityVolume *  pControlSpace  ) 
 

Selection of the volume for segmentation.

void mds::seg::CTetraMesh::setCornerMinEdgeLength double  dValue = DEFAULT_CORNER_MIN_EDGE_LENGTH  )  [inline]
 

Sets minimal allowed edge length in the triangulation near corners.

void mds::seg::CTetraMesh::setEdgeVolume mds::img::CDensityVolume *  pEdgeVolume  ) 
 

Selection of the volume for segmentation.

void mds::seg::CTetraMesh::setNumOfSegments int  i  )  [inline]
 

Sets the number of regions.

void mds::seg::CTetraMesh::setVertexNeighbourhood tSize  Value = DEFAULT_VERTEX_NEIGHBOURHOOD  )  [inline]
 

Sets size of a neighbourhood used to attract new vertex to an image edge.

void mds::seg::CTetraMesh::setVolume mds::img::CDensityVolume *  pVolume  ) 
 

Selection of the volume for segmentation.

bool mds::seg::CTetraMesh::splitEdge vctl::MCEdge *  pEdge,
double  dThreshold,
tPoints Points
 

Splits a given edge.

  • Returns true if the edge was divided.

bool mds::seg::CTetraMesh::splitTetrahedron vctl::MCTetra *  pTetrahedron  ) 
 

Splits a given tetrahedron.

  • Returns true if the tetrahedron was divided.

bool mds::seg::CTetraMesh::subpixelAttractVertex vctl::MCPoint3D *  pPoint  ) 
 

Modifies position of a given vertex.

  • Attracts vertex to the closest image edge.
  • Data volume and edge volume must be set!

bool mds::seg::CTetraMesh::subpixelVertexMoving  ) 
 

Adaptation of the mesh by means of a vertex moving.

  • Attracts vertices to the center of image edges.
  • Both volumes must be set!

bool mds::seg::CTetraMesh::tetrahedronSplitting CTetraHomogeneityMeasure Measure  ) 
 

Adaptation of the triangular mesh to the underlying volume.

  • Tetrahedron splitting algorithm.
  • Both volumes must be set!

void mds::seg::CTetraMesh::tetrahedronSplittingInsertFunc vctl::MCTetra *  pTetrahedron,
CDelaunayTetra pMesh
[static]
 

Evaluates tetrahedron homogeneity and inserts tetrahedron to the sorted queue.

void mds::seg::CTetraMesh::tetrahedronSplittingRemoveFunc vctl::MCTetra *  pTetrahedron,
CDelaunayTetra pMesh
[static]
 

Unsorts tetrahedron from the queue.

bool mds::seg::CTetraMesh::variationalMeshing bool  bCheckIsotropicMinEdgeLength = false  ) 
 

Variational approach to tetrahedral isotropic meshing.

  • Optimizes vertex positions so that a global energy is minimal.
  • Control space must be set!

void mds::seg::CTetraMesh::visualize mds::img::CDVolume *  pVolume  ) 
 

Visualizes the triangular mesh.

  • Draws all tetrahedra as simple lines to a given volume.


Friends And Related Function Documentation

friend class mds::base::CSharedPtr< CTetraMesh > [friend]
 


Member Data Documentation

const double mds::seg::CTetraMesh::DEFAULT_AVG_TETRA_SIZE = 30.0 [static]
 

const tSize mds::seg::CTetraMesh::DEFAULT_CELL = 3 [static]
 

Default parameters.

const tSize mds::seg::CTetraMesh::DEFAULT_CELL_MARGIN = 5 [static]
 

const double mds::seg::CTetraMesh::DEFAULT_CORNER_MIN_EDGE_LENGTH = 0.5 [static]
 

const double mds::seg::CTetraMesh::DEFAULT_DELTA_THRESHOLD = 1.5 [static]
 

const double mds::seg::CTetraMesh::DEFAULT_DISTANCE_THRESHOLD = 1.5 [static]
 

const double mds::seg::CTetraMesh::DEFAULT_INIT_THRESHOLD = 0.5 [static]
 

const double mds::seg::CTetraMesh::DEFAULT_K = 1.0 [static]
 

const double mds::seg::CTetraMesh::DEFAULT_SPLITTING_THRESHOLD = 0.5 [static]
 

const tSize mds::seg::CTetraMesh::DEFAULT_VERTEX_NEIGHBOURHOOD = 3 [static]
 

double mds::seg::CTetraMesh::m_dCornerMinEdgeLength [protected]
 

! Minimal edge length near corners.

int mds::seg::CTetraMesh::m_iNumOfSegments [protected]
 

Number of segments in the mesh.

CTetraHomogeneityMeasure* mds::seg::CTetraMesh::m_pHomogeneityMeasure [protected]
 

Currently used homogeneity measure.

tSegments mds::seg::CTetraMesh::m_Segments [protected]
 

Vector of image features extracted for every region.

mds::img::CDensityVolumePtr mds::seg::CTetraMesh::m_spControlSpace [protected]
 

Pointer to the control space.

mds::img::CDensityVolumePtr mds::seg::CTetraMesh::m_spEdgeVolume [protected]
 

Pointer to the underlying edge volume.

mds::img::CDensityVolumePtr mds::seg::CTetraMesh::m_spVolume [protected]
 

Pointer to the underlying volume.

mds::tSize mds::seg::CTetraMesh::m_VertexNeighbourhood [protected]
 

Size of a neighbourhood used to attract new vertex to an image edge.

const double mds::seg::CTetraMesh::MIN_TETRAHEDRON_VOLUME = 2.0 [static]
 


The documentation for this class was generated from the following files:
Generated on Thu Mar 11 10:36:12 2010 for MDSTk Extension Libraries by  doxygen 1.4.6-NO