#include <ImFusion/Base/Slice.h>
Represents a planar bounded slice in 3D space.
More...
Represents a planar bounded slice in 3D space.
|
| Slice (AnatomicalPlane plane=AnatomicalPlane::Axial) |
| Default constructor, optionally defining a standard plane.
|
|
| Slice (const mat4 &m, double x, double y) |
| Constructor with transformation matrix and size.
|
|
| Slice (const Corners &corners) |
| Create a slice from its four corners.
|
|
| Slice (const Corners &corners, const vec3 &direction) |
| Create a slice from its four corners and its direction.
|
|
vec3 | corner (int which) const |
| Return one of the corners of the slice.
|
|
int | axisClosest () const |
| Returns the unit axis to which the normal of this slice is closest.
|
|
bool | intersect (const Slice &other, vec3 &point1, vec3 &point2, bool finite=false) const |
| Returns true if an intersection with another slice exists, providing the points then.
|
|
bool | intersect (const vec3 &point1, const vec3 &point2, vec3 &pointOut, double &posOut) const |
| Returns true if an intersection with a line segment given by two points exists.
|
|
|
mat4 | mat |
| Transformation matrix of the slice.
|
|
double | sx |
| Half of the slice's extent in X direction.
|
|
double | sy |
| Half of the slice's extent in Y direction.
|
|
|
vec3 | axis1 () const |
|
vec3 | axis2 () const |
|
vec3 | normal () const |
|
vec3 | position () const |
|
◆ AnatomicalPlane
Enumeration of standard anatomical planes for slice-based visualization.
Enumerator |
---|
Undefined | unspecified plane.
|
Axial | horizontal/transverse plane dividing the body into cranial and caudal portions.
|
Sagittal | lateral/longitudinal plane dividing the body into left and right.
|
Coronal | frontal/vertical plane dividing the body into posterior and anterior portions.
|
◆ Corner
Readable names for defining the four corners of a slice.
Enumerator |
---|
BottomLeft | Corner at (-sx, -sy)
|
BottomRight | Corner at ( sx, -sy)
|
TopRight | Corner at ( sx, sy)
|
TopLeft | Corner at (-sx, sy)
|
◆ Slice()
Create a slice from its four corners.
The direction is determined from the cross product of the x-axis (left-to-right) and the y-axis (top-to-bottom).
◆ corner()
vec3 corner |
( |
int | which | ) |
const |
Return one of the corners of the slice.
- Parameters
-
which | Index of the corner to return (cf. Slice::Corner enumeration) |
◆ intersect()
bool intersect |
( |
const Slice & | other, |
|
|
vec3 & | point1, |
|
|
vec3 & | point2, |
|
|
bool | finite = false ) const |
Returns true if an intersection with another slice exists, providing the points then.
If the parameter finite is set to true, the method returns false in case the limited slice extent does not overlap. Output points are returned in all cases though.
The documentation for this class was generated from the following file: