MeVisLabToolboxReference
|
Class to handle the geometry primitive "Disc" consisting of a center, a normal and a radius. More...
#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) |
Set normal vector (performing normalization, (1,0,0) if zero). | |
void | setRadius (double r) |
Set radius. | |
const Vector3 & | getCenter () const |
Get center. | |
const Vector3 & | getNormal () 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. |
Class to handle the geometry primitive "Disc" consisting of a center, a normal and a radius.
ml::Disc::Disc | ( | ) |
Constructor. Default state is center at (0,0,0), normal (1,0,0) and radius 0.
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] |
const Vector3& ml::Disc::getNormal | ( | ) | const [inline] |
Plane ml::Disc::getPlane | ( | ) | 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] |
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