VectorEntity  1.1.0
Medical Data Segmentation Toolkit
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
vctl::MCTetra Class Reference

Class representing a tetrahedron. More...

#include <mctetra.h>

Inheritance diagram for vctl::MCTetra:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void ChangeVertex (MCVertex *old_uzel, MCVertex *new_uzel)
 Exchanges a specified vertex with a new one.
void DeRegistration ()
 Deregisteres the tetrahedron from its vertices.
template<class S >
void DeserializeEntity (mds::mod::CChannelSerializer< S > &Reader, std::vector< MCVertex * > &index_array)
 Reads the tetra data.
double GetArea ()
 Returns tetrahedron surface area.
void GetCenter (MCPoint3D &_center)
 Returns coordinates of tetrahedron center.
unsigned int GetHashCode () const
 Returns the tetrahedron hash code.
void GetMaxEdge (MCVertex **_u0, MCVertex **_u1)
 Returns the longest edge.
double GetMaxEdgeLength ()
 Returns langth of the longest edge.
void GetMinEdge (MCVertex **_u0, MCVertex **_u1)
 Returns the shortest edge.
double GetMinEdgeLength ()
 Returns langth of the shortest edge.
MCTetraGetNeighbour (int _index)
 Returns a specified neighbouring tetrahedron.
MCTetraGetNeighbourByVertices (int _index)
 Returns a specified neighbouring tetrahedron.
void GetNeighbours (MCTetra *_n[4])
 Returns neighbouring tetrahedra.
const MCTetra ** GetNeighbours () const
 Returns pointers to neighbouring tetrahedra.
void GetNeighboursByVertices (MCTetra *_pole[4])
 Returns neighbouring tetrahedra.
MCVector3D GetNormal (int index) const
 Returns normal of a specified tetrahedron face.
void GetNormal (int index, MCVector3D &normal) const
 Returns normal of a specified tetrahedron face.
MCVector3D GetNormal2 (int index) const
 Returns normal of a specified tetrahedron face.
void GetNormal2 (int index, MCVector3D &normal) const
 Returns normal of a specified tetrahedron face.
void GetRestTri (int index, MCVertex **_u0, MCVertex **_u1, MCVertex **_u2) const
 Returns pointers to vertices opposing a specified vertex.
void GetRestTri (int index, MCVertex *_u[3]) const
 Returns pointers to vertices opposing a specified vertex.
MCVertexGetRestVertex (MCVertex *_u0, MCVertex *_u1, MCVertex *_u2)
 Returns pointer to the remaining vertex.
MCVertexGetRestVertex (int index)
 Returns pointer to the vertex opposing a specified face.
void GetTri (int index, MCVertex **_u0, MCVertex **_u1, MCVertex **_u2) const
 Returns pointers to all vertices of a specified tetrahedron face.
void GetTri (int index, MCVertex *_u[3]) const
 Returns pointers to all vertices of a specified tetrahedron face.
void GetTri (int index, int *_u0, int *_u1, int *_u2) const
 Returns indexes of vertices of a tetrahedron face.
void GetTri (int index, int _u[3]) const
 Returns indexes of vertices of a tetrahedron face.
unsigned int GetValueFlag ()
 Returns the value flag.
MCVertexGetVertex (int index)
 Returns pointer to a specified vertex.
MCTetraGetVertexTetra (MCVertex *_uzel)
 Returns a tetrahedron registered in a specified tetrahedron vertex (sharing the same vertex).
void GetVerticeS (MCVertex **_u0, MCVertex **_u1, MCVertex **_u2, MCVertex **_u3) const
 Returns pointers to all tetrahedron vertices.
void GetVerticeS (MCVertex *_u[4]) const
 Returns pointers to all tetrahedron vertices.
double GetVolume ()
 Returns tetrahedron volume.
void InverseOrientation ()
 Inverses orientation of the tetrahedron.
bool IsTriBool (MCVertex *_u0, MCVertex *_u1, MCVertex *_u2)
 Checks if a given triangle belongs to the tetrahedra.
bool IsTriBool (MCVertex *_u[3])
 Checks if a given triangle belongs to the tetrahedra.
int IsVertex (MCVertex *test_uzel) const
 Returns index of a specified vertex comparing pointers, or -1 if no such vertex was found.
bool IsVertexBool (MCVertex *test_uzel) const
 Checks if a given vertex belongs to the tetrahedra.
 MCTetra ()
 Default constructor.
 MCTetra (const MCTetra &_tet)
 Copy constructor.
 MCTetra (MCTetra *_tet)
 Constructor.
 MCTetra (MCVertex *_u0, MCVertex *_u1, MCVertex *_u2, MCVertex *_u3)
 Constructor.
 MCTetra (MCVertex *_u[4])
 Constructor.
void Registration ()
 Registeres the tetrahedron in all its vertices.
template<class S >
void SerializeEntity (mds::mod::CChannelSerializer< S > &Writer)
 Writes the tetrahedron data.
void SetValueFlag (unsigned int _value)
 Sets the value flag.
void SetVertex (int index, MCVertex *new_uzel)
 Sets pointer to a specified vertex.
void SetVertexTetra (MCVertex *_uzel, MCTetra *_tet)
 Sets pointer to a tetrahedron registered in a specified tetrahedron vertex (sharing the same vertex).
void SetVerticeS (MCVertex *_u0, MCVertex *_u1, MCVertex *_u2, MCVertex *_u3)
 Sets pointers to all tetrahedron vertices.
void SetVerticeS (MCVertex *_u[4])
 Sets pointers to all tetrahedron vertices.
bool TestIdentity (MCTetra *test_tetra) const
 Checks identity of two tetrahedra.
virtual std::string ToString () const
 Returns text description of the tetrahedra.
virtual ~MCTetra ()
 Virtual destructor.

Protected Types

typedef MCEntity< MCTetratBase
 Base class.

Protected Member Functions

void NeighboursActualization ()
 Tetrahedra neighbours actualization.
void NeighboursDeRegistration ()
 Tetrahedron neighbours deregistration.
void NeighboursRegistration ()
 Tetrahedron neighbours registration.

Protected Attributes

MCTetran [4]
 Direct pointers to neighbouring tetrahedra.
MCTetras [4]
 Pointers to tetrahedra sharing the same vertices.
MCVertexu [4]
 Pointers to all tetrahedron vertices.
unsigned int value_flag
 Value flag for signing the tetrahedron.

Detailed Description

Class representing a tetrahedron.


Member Typedef Documentation

typedef MCEntity<MCTetra> vctl::MCTetra::tBase [protected]

Base class.


Constructor & Destructor Documentation

vctl::MCTetra::MCTetra ( ) [inline]

Default constructor.

  • Initializes all pointers to NULL.
vctl::MCTetra::MCTetra ( const MCTetra _tet) [inline]

Copy constructor.

  • Initializes pointers to tetrahedron vertices only.
vctl::MCTetra::MCTetra ( MCTetra _tet) [inline]

Constructor.

  • Initializes pointers to tetrahedron vertices only.
vctl::MCTetra::MCTetra ( MCVertex _u0,
MCVertex _u1,
MCVertex _u2,
MCVertex _u3 
) [inline]

Constructor.

  • Initializes pointers to tetrahedron vertices only.
vctl::MCTetra::MCTetra ( MCVertex _u[4]) [inline]

Constructor.

  • Initializes pointers to tetrahedron vertices only.
virtual vctl::MCTetra::~MCTetra ( ) [inline, virtual]

Virtual destructor.


Member Function Documentation

void vctl::MCTetra::ChangeVertex ( MCVertex old_uzel,
MCVertex new_uzel 
) [inline]

Exchanges a specified vertex with a new one.

  • The method doesn't provide any registration/deregistration of tetrahedron in vertices. You must do this on your own!

Deregisteres the tetrahedron from its vertices.

template<class S >
void vctl::MCTetra::DeserializeEntity ( mds::mod::CChannelSerializer< S > &  Reader,
std::vector< MCVertex * > &  index_array 
) [inline]

Reads the tetra data.

  • An array of vertices must be loaded previously.

Returns tetrahedron surface area.

void MCTetra::GetCenter ( MCPoint3D _center)

Returns coordinates of tetrahedron center.

unsigned int vctl::MCTetra::GetHashCode ( ) const [inline, virtual]

Returns the tetrahedron hash code.

  • Not yet implemented!
    Todo:
    Doplnit implementaci generovani hash kodu.

Implements vctl::MCEntity< MCTetra >.

void MCTetra::GetMaxEdge ( MCVertex **  _u0,
MCVertex **  _u1 
)

Returns the longest edge.

Returns langth of the longest edge.

void MCTetra::GetMinEdge ( MCVertex **  _u0,
MCVertex **  _u1 
)

Returns the shortest edge.

Returns langth of the shortest edge.

MCTetra* vctl::MCTetra::GetNeighbour ( int  _index) [inline]

Returns a specified neighbouring tetrahedron.

  • Directly via internal pointers.

Returns a specified neighbouring tetrahedron.

  • Traversing all tetrahedra registered in the tetrahedron vertices.
void vctl::MCTetra::GetNeighbours ( MCTetra _n[4]) [inline]

Returns neighbouring tetrahedra.

  • Directly via internal pointers.
const MCTetra** vctl::MCTetra::GetNeighbours ( ) const [inline]

Returns pointers to neighbouring tetrahedra.

  • Directly via internal pointers.

Returns neighbouring tetrahedra.

  • Traversing all tetrahedra registered in the tetrahedron vertices.
MCVector3D MCTetra::GetNormal ( int  index) const

Returns normal of a specified tetrahedron face.

  • The returned vector is normalized.
void MCTetra::GetNormal ( int  index,
MCVector3D normal 
) const

Returns normal of a specified tetrahedron face.

  • The returned vector is normalized.

Returns normal of a specified tetrahedron face.

  • The returned vector is not normalized.
void MCTetra::GetNormal2 ( int  index,
MCVector3D normal 
) const

Returns normal of a specified tetrahedron face.

  • The returned vector is not normalized.
void MCTetra::GetRestTri ( int  index,
MCVertex **  _u0,
MCVertex **  _u1,
MCVertex **  _u2 
) const

Returns pointers to vertices opposing a specified vertex.

void vctl::MCTetra::GetRestTri ( int  index,
MCVertex _u[3] 
) const [inline]

Returns pointers to vertices opposing a specified vertex.

MCVertex * MCTetra::GetRestVertex ( MCVertex _u0,
MCVertex _u1,
MCVertex _u2 
)

Returns pointer to the remaining vertex.

Returns pointer to the vertex opposing a specified face.

void MCTetra::GetTri ( int  index,
MCVertex **  _u0,
MCVertex **  _u1,
MCVertex **  _u2 
) const

Returns pointers to all vertices of a specified tetrahedron face.

void vctl::MCTetra::GetTri ( int  index,
MCVertex _u[3] 
) const [inline]

Returns pointers to all vertices of a specified tetrahedron face.

void MCTetra::GetTri ( int  index,
int _u0,
int _u1,
int _u2 
) const

Returns indexes of vertices of a tetrahedron face.

void vctl::MCTetra::GetTri ( int  index,
int  _u[3] 
) const [inline]

Returns indexes of vertices of a tetrahedron face.

unsigned int vctl::MCTetra::GetValueFlag ( ) [inline]

Returns the value flag.

MCVertex* vctl::MCTetra::GetVertex ( int  index) [inline]

Returns pointer to a specified vertex.

Returns a tetrahedron registered in a specified tetrahedron vertex (sharing the same vertex).

  • NULL on failure.
void vctl::MCTetra::GetVerticeS ( MCVertex **  _u0,
MCVertex **  _u1,
MCVertex **  _u2,
MCVertex **  _u3 
) const [inline]

Returns pointers to all tetrahedron vertices.

void vctl::MCTetra::GetVerticeS ( MCVertex _u[4]) const [inline]

Returns pointers to all tetrahedron vertices.

Returns tetrahedron volume.

Inverses orientation of the tetrahedron.

bool vctl::MCTetra::IsTriBool ( MCVertex _u0,
MCVertex _u1,
MCVertex _u2 
) [inline]

Checks if a given triangle belongs to the tetrahedra.

bool vctl::MCTetra::IsTriBool ( MCVertex _u[3]) [inline]

Checks if a given triangle belongs to the tetrahedra.

int vctl::MCTetra::IsVertex ( MCVertex test_uzel) const [inline]

Returns index of a specified vertex comparing pointers, or -1 if no such vertex was found.

bool vctl::MCTetra::IsVertexBool ( MCVertex test_uzel) const [inline]

Checks if a given vertex belongs to the tetrahedra.

void vctl::MCTetra::NeighboursActualization ( ) [inline, protected]

Tetrahedra neighbours actualization.

  • Only for this tetra.
void MCTetra::NeighboursDeRegistration ( ) [protected]

Tetrahedron neighbours deregistration.

  • Actualizes all neighbours of its actual neighbours.
  • The function expects, that the tetra is deregistered from his vertices by using the function DeRegistration() first.
void MCTetra::NeighboursRegistration ( ) [protected]

Tetrahedron neighbours registration.

  • Actualizes all neighbours and also neighbours of all newly find neighbours.
void vctl::MCTetra::Registration ( ) [inline]

Registeres the tetrahedron in all its vertices.

template<class S >
void vctl::MCTetra::SerializeEntity ( mds::mod::CChannelSerializer< S > &  Writer) [inline]

Writes the tetrahedron data.

  • An unique index must be assigned to each vertex first.

Reimplemented from vctl::MCEntity< MCTetra >.

void vctl::MCTetra::SetValueFlag ( unsigned int  _value) [inline]

Sets the value flag.

void vctl::MCTetra::SetVertex ( int  index,
MCVertex new_uzel 
) [inline]

Sets pointer to a specified vertex.

void vctl::MCTetra::SetVertexTetra ( MCVertex _uzel,
MCTetra _tet 
) [inline]

Sets pointer to a tetrahedron registered in a specified tetrahedron vertex (sharing the same vertex).

  • NULL on failure.
void vctl::MCTetra::SetVerticeS ( MCVertex _u0,
MCVertex _u1,
MCVertex _u2,
MCVertex _u3 
) [inline]

Sets pointers to all tetrahedron vertices.

void vctl::MCTetra::SetVerticeS ( MCVertex _u[4]) [inline]

Sets pointers to all tetrahedron vertices.

bool vctl::MCTetra::TestIdentity ( MCTetra test_tetra) const [inline, virtual]

Checks identity of two tetrahedra.

Implements vctl::MCEntity< MCTetra >.

virtual std::string vctl::MCTetra::ToString ( ) const [inline, virtual]

Returns text description of the tetrahedra.

Implements vctl::MCEntity< MCTetra >.


Member Data Documentation

MCTetra* vctl::MCTetra::n[4] [protected]

Direct pointers to neighbouring tetrahedra.

MCTetra* vctl::MCTetra::s[4] [protected]

Pointers to tetrahedra sharing the same vertices.

MCVertex* vctl::MCTetra::u[4] [protected]

Pointers to all tetrahedron vertices.

unsigned int vctl::MCTetra::value_flag [protected]

Value flag for signing the tetrahedron.


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