44 { _center = c; _radius = r;
setNormal(n); }
67 { proj =
getPlane().getClosestPoint(p);
return (proj - _center).length() <= _radius; }
71 {
return getPlane().intersect(l, cut); }
75 {
return Plane(_normal, _center); }
void setCenter(const Vector3 &c)
Set center.
double getRadius() const
Get radius.
SubImageBox getBoundingBox(const MedicalImageProperties &pImg) const
void setRadius(double r)
Set radius.
void getBoundingBox(const Matrix4 &transform, Vector3 &boxMin, Vector3 &boxMax) const
void fill(const MedicalImageProperties &pImg, SubImage &destImg, double fillVal) const
const Vector3 & getCenter() const
Get center.
bool intersect(const Line &l, Vector3 &cut) const
Intersects line l with disc plane, true if cut point exists, no radius check.
bool setNormal(const Vector3 &n)
void fill(const MedicalImageProperties &pImg, VirtualVolume &destImg, double fillVal) const
void setValue(const Vector3 &c, const Vector3 &n, double r)
Initialize disc parameters (used by constructor).
Disc()
Constructor. Default state is center at (0,0,0), normal (1,0,0) and radius 0.
bool project(const Vector3 &p, Vector3 &proj) const
Project p to disc plane, return true if projected point lies on disc.
Disc(const Vector3 &c, const Vector3 &n, double r)
Convenience constructor.
Plane getPlane() const
Get Plane object in which disc is located.
const Vector3 & getNormal() const
Get normal.
Class defining a plane in 3D.
Tmat4< MLdouble > Matrix4
The standard 4x4 matrix of type double.
Tvec3< MLdouble > Vector3
A vector with three components of type double.
TSubImageBox< MLint > SubImageBox
Defines the standard SubImageBox type used in the ML. Its size varies with the size of the MLint type...