MeVisLabToolboxReference
ml::Disc Class Reference

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

#include <mlDisc.h>

List of all members.

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)
 Set normal vector (performing normalization, (1,0,0) if zero).
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
 Compute bounding box of disc in target coordinates; box is a homogeneous matrix specifying the transformation.
SubImageBox getBoundingBox (const MedicalImageProperties &pImg) const
 Compute bounding box of disc in voxel coordinates.
void fill (const MedicalImageProperties &pImg, SubImage &destImg, double fillVal) const
 Draw disc with value fillVal into subimage destImg.
void fill (const MedicalImageProperties &pImg, VirtualVolume &destImg, double fillVal) const
 Draw disc with value fillVal into VirtualVolume destImg.

Detailed Description

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

Definition at line 35 of file mlDisc.h.


Constructor & Destructor Documentation

ml::Disc::Disc ( )

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

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

Convenience constructor.


Member Function Documentation

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.

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.

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.

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.

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

Get center.

Definition at line 59 of file mlDisc.h.

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

Get normal.

Definition at line 62 of file mlDisc.h.

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

Get Plane object in which disc is located.

Definition at line 76 of file mlDisc.h.

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

Get radius.

Definition at line 65 of file mlDisc.h.

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 72 of file mlDisc.h.

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 68 of file mlDisc.h.

References ml::FloatingPointVector< T, size, DataContainer >::length().

void ml::Disc::setCenter ( const Vector3 c) [inline]

Set center.

Definition at line 49 of file mlDisc.h.

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

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

Set radius.

Definition at line 56 of file mlDisc.h.

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

Initialize disc parameters (used by constructor)

Definition at line 45 of file mlDisc.h.


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