PlaneHelper
Source: planeHelper.js:23
Plane geometry helper.
Constructor
new PlaneHelper(
imageGeometry: Geometry,
viewOrientation: Matrix33,
): PlaneHelperParameters
Instance Methods
getViewOrientation(): Matrix33
Get the view orientation.
Returns
Matrix33— The orientation matrix.
getTargetOrientation(): Matrix33
Get the target orientation.
Returns
Matrix33— The orientation matrix.
getOffset3DFromPlaneOffset(offset2D: Scalar2D): Vector3D
Get a 3D offset from a plane one.
Parameters
offset2D(Scalar2D) — The plane offset as {x,y}.
Returns
Vector3D— The 3D world offset.
getPlaneOffsetFromOffset3D(offset3D: Scalar3D): Scalar2D
Get a plane offset from a 3D one.
Parameters
offset3D(Scalar3D) — The 3D offset as {x,y,z}.
Returns
Scalar2D— The plane offset as {x,y}.
getTargetOrientedVector3D(vector: Vector3D): Vector3D
Orient an input vector from real to target space.
Parameters
vector(Vector3D) — The input vector.
Returns
Vector3D— The oriented vector.
getTargetDeOrientedVector3D(planeVector: Vector3D): Vector3D
De-orient an input vector from target to real space.
Parameters
planeVector(Vector3D) — The input vector.
Returns
Vector3D— The de-orienteded vector.
getTargetDeOrientedPoint3D(planePoint: Point3D): Point3D
De-orient an input point from target to real space.
Parameters
planePoint(Point3D) — The input point.
Returns
Point3D— The de-orienteded point.
getImageOrientedVector3D(planeVector: Vector3D): Vector3D
Orient an input vector from target to image space.
Parameters
planeVector(Vector3D) — The input vector.
Returns
Vector3D— The orienteded vector.
getImageOrientedPoint3D(planePoint: Point3D): Point3D
Orient an input point from target to image space.
Parameters
planePoint(Point3D) — The input vector.
Returns
Point3D— The orienteded vector.
getImageDeOrientedVector3D(vector: Vector3D): Vector3D
De-orient an input vector from image to target space.
Parameters
vector(Vector3D) — The input vector.
Returns
Vector3D— The de-orienteded vector.
getImageDeOrientedPoint3D(point: Point3D): Point3D
De-orient an input point from image to target space.
Parameters
point(Point3D) — The input point.
Returns
Point3D— The de-orienteded point.
getPositionFromPlanePoint(point2D: Point2D, k: number): Point3D
Get a world position from a 2D plane position.
Parameters
point2D(Point2D) — The plane point.k(number) — The slice index.
Returns
Point3D— The world position.
getPlanePointFromPosition(point: Point): Point3D
Get a 2D plane position from a world position.
Parameters
point(Point) — The world position.
Returns
Point3D— The plane point.
getCosines(): Array.<number>
Get the cosines of this plane.
Returns
Array.<number>— The 2 cosines vectors (3D).
getLegacyCosines(): Array.<number>
Get the cosines of this plane as saved in annotations by previous versions, see getLegacyTargetOrientation.
Returns
Array.<number>— The 2 cosines vectors (3D).
getPlanePoints(position: Point): Array.<Point3D>
Get a list of points that define the plane at input position, given this classes orientation.
Parameters
position(Point) — The position.
Returns
Array.<Point3D>— An origin and 2 cosines vectors.
worldToIndex(point: Point): Index
Image world to index.
Parameters
point(Point) — The input point.
Returns
Index— The corresponding index.
indexToWorld(index: Index): Point
Image index to world.
Parameters
index(Index) — The input index.
Returns
Point— The corresponding point.
isAquisitionOrientation(): boolean
Is this view in the same orientation as the image aquisition.
Returns
boolean— True if in aquisition plane.
getTargetOrientedPositiveXYZ(values: Scalar3D): Scalar3D
Reorder values to follow target orientation.
Parameters
values(Scalar3D) — Values as {x,y,z}.
Returns
Scalar3D— Reoriented values as {x,y,z}.
getScrollDimIndex(): number
Get the (view) scroll dimension index.
Returns
number— The index.
getNativeScrollDimIndex(): number
Get the native (image) scroll dimension index.
Returns
number— The index.