pyrot.eye_modelling.common_methods#

Attributes#

Functions#

getTranslationMatrix(→ numpy.ndarray)

Generate a translation matrix for 3D transformations.

toRadians(→ float)

Convert an angle from degrees to radians.

toDegrees(→ float)

Convert an angle from radians to degrees.

getIdentityMatrix(→ numpy.ndarray)

Returns a 4x4 identity matrix.

getRotationMatrixX(→ numpy.ndarray)

Calculate the rotation matrix for a rotation around the X-axis.

getRotationMatrixY(→ numpy.ndarray)

Generate a rotation matrix for a rotation around the Y-axis.

getRotationMatrixZ(→ numpy.ndarray)

Generate a rotation matrix for a rotation around the Z-axis.

getEyeModelGeometry(→ object)

Retrieve the geometry for a specific structure type from the eye model.

getClipGeometries(→ list)

Retrieve all clip geometries from the eye model.

getEyeModelToPatientRotationMatrix(→ numpy.ndarray)

Calculate the rotation matrix to transform from eye model coordinates to patient coordinates.

Module Contents#

pyrot.eye_modelling.common_methods.logger#
pyrot.eye_modelling.common_methods.getTranslationMatrix(x: float, y: float, z: float) numpy.ndarray#

Generate a translation matrix for 3D transformations.

Parameters#

xfloat

Translation along the x-axis.

yfloat

Translation along the y-axis.

zfloat

Translation along the z-axis.

Returns#

numpy.ndarray

A 4x4 translation matrix.

pyrot.eye_modelling.common_methods.toRadians(angleDegrees: float) float#

Convert an angle from degrees to radians.

Parameters#

angleDegreesfloat

Angle in degrees.

Returns#

float

Angle in radians.

pyrot.eye_modelling.common_methods.toDegrees(angleRadians: float) float#

Convert an angle from radians to degrees.

Parameters#

angleRadiansfloat

Angle in radians.

Returns#

float

Angle in degrees.

pyrot.eye_modelling.common_methods.getIdentityMatrix() numpy.ndarray#

Returns a 4x4 identity matrix.

Returns#

numpy.ndarray

A 4x4 identity matrix.

pyrot.eye_modelling.common_methods.getRotationMatrixX(angleDeg: float) numpy.ndarray#

Calculate the rotation matrix for a rotation around the X-axis.

Parameters#

angleDegfloat

The angle of rotation in degrees.

Returns#

numpy.ndarray

A 4x4 rotation matrix representing the rotation around the X-axis.

pyrot.eye_modelling.common_methods.getRotationMatrixY(angleDeg: float) numpy.ndarray#

Generate a rotation matrix for a rotation around the Y-axis.

Parameters#

angleDegfloat

The angle of rotation in degrees.

Returns#

numpy.ndarray

A 4x4 rotation matrix representing the rotation around the Y-axis.

pyrot.eye_modelling.common_methods.getRotationMatrixZ(angleDeg: float) numpy.ndarray#

Generate a rotation matrix for a rotation around the Z-axis.

Parameters#

angleDegfloat

The angle of rotation in degrees.

Returns#

numpy.ndarray

A 4x4 rotation matrix representing the rotation around the Z-axis.

pyrot.eye_modelling.common_methods.getEyeModelGeometry(eyeModel: object, structureType: str) object#

Retrieve the geometry for a specific structure type from the eye model.

Parameters#

eyeModelobject

The eye model containing the geometries.

structureTypestr

The type of structure to retrieve the geometry for.

Returns#

object

The geometry corresponding to the specified structure type.

pyrot.eye_modelling.common_methods.getClipGeometries(eyeModel: object) list#

Retrieve all clip geometries from the eye model.

Parameters#

eyeModelobject

The eye model containing the clip geometries.

Returns#

list

A list of clip geometries.

pyrot.eye_modelling.common_methods.getEyeModelToPatientRotationMatrix(rotationXDeg: float, rotationYDeg: float, rotationZDeg: float) numpy.ndarray#

Calculate the rotation matrix to transform from eye model coordinates to patient coordinates.

Parameters#

rotationXDegfloat

Rotation angle around the X-axis in degrees.

rotationYDegfloat

Rotation angle around the Y-axis in degrees.

rotationZDegfloat

Rotation angle around the Z-axis in degrees.

Returns#

numpy.ndarray

A 4x4 rotation matrix.