dwv.image. PlaneHelper

new PlaneHelper(spacing, imageOrientation, viewOrientation)

Plane geometry helper.

Parameters:
NameTypeDescription
spacingdwv.image.Spacing

The spacing.

imageOrientationdwv.math.Matrix

The image oientation.

viewOrientationdwv.math.Matrix

The view orientation.

Methods

getImageDeOrientedVector3D(vector) → {dwv.math.Vector3D}

De-orient an input vector from image to target space. WARN: returns absolute values... TODO: check why abs is needed...

Parameters:
NameTypeDescription
vectordwv.math.Vector3D

The input vector.

Returns:

The de-orienteded vector.

Type: 
dwv.math.Vector3D

getImageOrientedVector3D(planeVector) → {dwv.math.Vector3D}

Orient an input vector from target to image space. WARN: returns absolute values... TODO: check why abs is needed...

Parameters:
NameTypeDescription
planeVectordwv.math.Vector3D

The input vector.

Returns:

The orienteded vector.

Type: 
dwv.math.Vector3D

getNativeScrollIndex() → {number}

Get the native (image) scroll dimension index.

Returns:

The index.

Type: 
number

getOffset3DFromPlaneOffset(offset2D) → {dwv.math.Vector3D}

Get a 3D offset from a plane one.

Parameters:
NameTypeDescription
offset2Dobject

The plane offset as {x,y}.

Returns:

The 3D world offset.

Type: 
dwv.math.Vector3D

getPlaneOffsetFromOffset3D(offset3D) → {object}

Get a plane offset from a 3D one.

Parameters:
NameTypeDescription
offset3Dobject

The 3D offset as {x,y,z}.

Returns:

The plane offset as {x,y}.

Type: 
object

getScrollIndex() → {number}

Get the (view) scroll dimension index.

Returns:

The index.

Type: 
number

getTargetDeOrientedVector3D(planeVector) → {dwv.math.Vector3D}

De-orient an input vector from target to real space.

Parameters:
NameTypeDescription
planeVectordwv.math.Vector3D

The input vector.

Returns:

The de-orienteded vector.

Type: 
dwv.math.Vector3D

getTargetOrientedPositiveXYZ(values) → {object}

Reorder values to follow target orientation. WARN: returns absolute values... TODO: check why abs is needed...

Parameters:
NameTypeDescription
valuesobject

Values as {x,y,z}.

Returns:

Reoriented values as {x,y,z}.

Type: 
object

getTargetOrientedVector3D(vector) → {dwv.math.Vector3D}

Orient an input vector from real to target space.

Parameters:
NameTypeDescription
vectordwv.math.Vector3D

The input vector.

Returns:

The oriented vector.

Type: 
dwv.math.Vector3D