MeVisLab Toolbox Reference
ml::Disc Class Reference

#include <mlDisc.h>

Public Member Functions

 Disc ()
 Constructor. Default state is center at (0,0,0), normal (1,0,0) and radius 0.
 Disc (const Vector3 &c, const Vector3 &n, double r)
 Convenience constructor.
void setValue (const Vector3 &c, const Vector3 &n, double r)
 Initialize disc parameters (used by constructor).
void setCenter (const Vector3 &c)
 Set center.
bool setNormal (const Vector3 &n)
void setRadius (double r)
 Set radius.
const Vector3getCenter () const
 Get center.
const Vector3getNormal () const
 Get normal.
double getRadius () const
 Get radius.
bool project (const Vector3 &p, Vector3 &proj) const
 Project p to disc plane, return true if projected point lies on disc.
bool intersect (const Line &l, Vector3 &cut) const
 Intersects line l with disc plane, true if cut point exists, no radius check.
Plane getPlane () const
 Get Plane object in which disc is located.
void getBoundingBox (const Matrix4 &transform, Vector3 &boxMin, Vector3 &boxMax) const
SubImageBox getBoundingBox (const MedicalImageProperties &pImg) const
void fill (const MedicalImageProperties &pImg, SubImage &destImg, double fillVal) const
void fill (const MedicalImageProperties &pImg, VirtualVolume &destImg, double fillVal) const

Detailed Description

Class to handle the geometry primitive "Disc" consisting of a center, a normal and a radius.

Definition at line 33 of file mlDisc.h.

Constructor & Destructor Documentation

◆ Disc() [1/2]

ml::Disc::Disc ( )

Constructor. Default state is center at (0,0,0), normal (1,0,0) and radius 0.

◆ Disc() [2/2]

ml::Disc::Disc ( const Vector3 & c,
const Vector3 & n,
double r )

Convenience constructor.

Member Function Documentation

◆ fill() [1/2]

void ml::Disc::fill ( const MedicalImageProperties & pImg,
SubImage & destImg,
double fillVal ) const

Draw disc with value fillVal into subimage destImg. The disc is transformed by transformation given by pImg. Only overlapping regions of extents of destImg and pImg are written.

◆ fill() [2/2]

void ml::Disc::fill ( const MedicalImageProperties & pImg,
VirtualVolume & destImg,
double fillVal ) const

Draw disc with value fillVal into VirtualVolume destImg. The disc is transformed by transformation given by pImg. Only overlapping regions of extents of destImg and pImg are written.

◆ getBoundingBox() [1/2]

void ml::Disc::getBoundingBox ( const Matrix4 & transform,
Vector3 & boxMin,
Vector3 & boxMax ) const

Compute bounding box of disc in target coordinates; box is a homogeneous matrix specifying the transformation.

◆ getBoundingBox() [2/2]

SubImageBox ml::Disc::getBoundingBox ( const MedicalImageProperties & pImg) const

Compute bounding box of disc in voxel coordinates. pImg are MedicalImageProperties to specify a maximum extent of the filled region, the transformation matrix and voxel size.

◆ getCenter()

const Vector3 & ml::Disc::getCenter ( ) const
inline

Get center.

Definition at line 57 of file mlDisc.h.

◆ getNormal()

const Vector3 & ml::Disc::getNormal ( ) const
inline

Get normal.

Definition at line 60 of file mlDisc.h.

◆ getPlane()

Plane ml::Disc::getPlane ( ) const
inline

Get Plane object in which disc is located.

Definition at line 74 of file mlDisc.h.

Referenced by intersect(), and project().

◆ getRadius()

double ml::Disc::getRadius ( ) const
inline

Get radius.

Definition at line 63 of file mlDisc.h.

◆ intersect()

bool ml::Disc::intersect ( const Line & l,
Vector3 & cut ) const
inline

Intersects line l with disc plane, true if cut point exists, no radius check.

Definition at line 70 of file mlDisc.h.

References getPlane().

◆ project()

bool ml::Disc::project ( const Vector3 & p,
Vector3 & proj ) const
inline

Project p to disc plane, return true if projected point lies on disc.

Definition at line 66 of file mlDisc.h.

References getPlane().

◆ setCenter()

void ml::Disc::setCenter ( const Vector3 & c)
inline

Set center.

Definition at line 47 of file mlDisc.h.

◆ setNormal()

bool ml::Disc::setNormal ( const Vector3 & n)

Set normal vector (performing normalization, (1,0,0) if zero). Return true if normal vector is not zero

Referenced by setValue().

◆ setRadius()

void ml::Disc::setRadius ( double r)
inline

Set radius.

Definition at line 54 of file mlDisc.h.

◆ setValue()

void ml::Disc::setValue ( const Vector3 & c,
const Vector3 & n,
double r )
inline

Initialize disc parameters (used by constructor).

Definition at line 43 of file mlDisc.h.

References setNormal().


The documentation for this class was generated from the following file:
  • MeVisLab/Standard/Sources/ML/MLTools/include/mlDisc.h