MeVisLab Toolbox Reference
|
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. More... | |
Disc (const Vector3 &c, const Vector3 &n, double r) | |
Convenience constructor. More... | |
void | setValue (const Vector3 &c, const Vector3 &n, double r) |
Initialize disc parameters (used by constructor) More... | |
void | setCenter (const Vector3 &c) |
Set center. More... | |
bool | setNormal (const Vector3 &n) |
Set normal vector (performing normalization, (1,0,0) if zero). More... | |
void | setRadius (double r) |
Set radius. More... | |
const Vector3 & | getCenter () const |
Get center. More... | |
const Vector3 & | getNormal () const |
Get normal. More... | |
double | getRadius () const |
Get radius. More... | |
bool | project (const Vector3 &p, Vector3 &proj) const |
Project p to disc plane, return true if projected point lies on disc. More... | |
bool | intersect (const Line &l, Vector3 &cut) const |
Intersects line l with disc plane, true if cut point exists, no radius check. More... | |
Plane | getPlane () const |
Get Plane object in which disc is located. More... | |
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. More... | |
SubImageBox | getBoundingBox (const MedicalImageProperties &pImg) const |
Compute bounding box of disc in voxel coordinates. More... | |
void | fill (const MedicalImageProperties &pImg, SubImage &destImg, double fillVal) const |
Draw disc with value fillVal into subimage destImg. More... | |
void | fill (const MedicalImageProperties &pImg, VirtualVolume &destImg, double fillVal) const |
Draw disc with value fillVal into VirtualVolume destImg. More... | |
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.
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.
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.
|
inline |
|
inline |
|
inline |
Project p to disc plane, return true if projected point lies on disc.
Definition at line 66 of file mlDisc.h.
References ml::FloatingPointVector< T, size, DataContainer >::length().
|
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