Orientation Module#

Module: pyradise.process.orientation

General#

The orientation module provides functionality to reorient images such that the anatomical orientation of the data is standardized.

Class Overview#

The following classes are provided by the orientation module:

Class

Description

SpatialOrientation

Enum class for spatial image orientations (e.g. RAS, LAS).

OrientationFilterParams

Parameterization class for the OrientationFilter.

OrientationFilter

Filter for reorienting Image instances.

Details#

class SpatialOrientation(value)[source]#

Bases: Enum

An enum class for all possible medical image orientations an image can possess.

INVALID = _Coord.ITK_COORDINATE_UNKNOWN#

The default value for an unidentifiable image orientation.

RIP = 264194#

The right inferior posterior (RIP) orientation.

LIP = 264195#

The left inferior posterior (LIP) orientation.

RSP = 264450#

The right superior posterior (RSP) orientation.

LSP = 264451#

The left superior posterior (LSP) orientation.

RIA = 329730#

The right inferior anterior (RIA) orientation.

LIA = 329731#

The left inferior anterior (LIA) orientation.

RSA = 329986#

The right superior anterior (RSA) orientation.

LSA = 329987#

The left superior anterior (LSA) orientation.

IRP = 262664#

The inferior right posterior (IRP) orientation.

ILP = 262920#

The inferior left posterior (ILP) orientation.

SRP = 262665#

The superior right posterior (SRP) orientation.

SLP = 262921#

The superior left posterior (SLP) orientation.

IRA = 328200#

The inferior right anterior (IRA) orientation.

ILA = 328456#

The inferior left anterior (ILA) orientation.

SRA = 328201#

The superior right anterior (SRA) orientation.

SLA = 328457#

The superior left anterior (SLA) orientation.

RPI = 525314#

The right posterior inferior (RPI) orientation.

LPI = 525315#

The left posterior inferior (LPI) orientation.

RAI = 525570#

The right anterior inferior (RAI) orientation.

LAI = 525571#

The left anterior inferior (LAI) orientation.

RPS = 590850#

The right posterior superior (RPS) orientation.

LPS = 590851#

The left posterior superior (LPS) orientation.

RAS = 591106#

The right anterior superior (RAS) orientation.

LAS = 591107#

The left anterior superior (LAS) orientation.

PRI = 524804#

The posterior right inferior (PRI) orientation.

PLI = 525060#

The posterior left inferior (PLI) orientation.

ARI = 524805#

The anterior right inferior (ARI) orientation.

ALI = 525061#

The anterior left inferior (ALI) orientation.

PRS = 590340#

The posterior right superior (PRS) orientation.

PLS = 590596#

The posterior left superior (PLS) orientation.

ARS = 590341#

The anterior right superior (ARS) orientation.

ALS = 590597#

The anterior left superior (ALS) orientation.

IPR = 132104#

The inferior posterior right (IPR) orientation.

SPR = 132105#

The superior posterior right (SPR) orientation.

IAR = 132360#

The inferior anterior right (IAR) orientation.

SAR = 132361#

The superior anterior right (SAR) orientation.

IPL = 197640#

The inferior posterior left (IPL) orientation.

SPL = 197641#

The superior posterior left (SPL) orientation.

IAL = 197896#

The inferior anterior left (IAL) orientation.

SAL = 197897#

The superior anterior left (SAL) orientation.

PIR = 133124#

The posterior inferior right (PIR) orientation.

PSR = 133380#

The posterior superior right (PSR) orientation.

AIR = 133125#

The anterior inferior right (AIR) orientation.

ASR = 133381#

The anterior superior right (ASR) orientation.

PIL = 198660#

The posterior inferior left (PIL) orientation.

PSL = 198916#

The posterior superior left (PSL) orientation.

AIL = 198661#

The anterior inferior left (AIL) orientation.

ASL = 198917#

The anterior superior left (ASL) orientation.

class OrientationFilterParams(output_orientation)[source]#

Bases: FilterParams

A filter parameter class for the OrientationFilter.

The orientation is a string or SpatialOrientation value consisting of three characters. These three characters describe the orientation of the image with the following values:

  • I: Inferior

  • S: Superior

  • A: Anterior

  • P: Posterior

  • R: Right

  • L: Left

The orientation of the image is described by the order of the characters. The first character describes the primary orientation of patient in the positive x-axis direction. The second character describes the secondary orientation of patient in the positive y-axis direction. The third character describes the tertiary orientation of patient in the positive z-axis direction. For example, the orientation RAS means that the patient is facing right in the positive x-axis direction, facing anterior in the positive y-axis direction, and facing superior in the positive z-axis direction. For more details we refer to appropriate literature (e.g. website).

Parameters:

output_orientation (Union[SpatialOrientation, str]) – The desired output orientation of all provided images.

class OrientationFilter(warning_on_non_invertible=False)[source]#

Bases: Filter

A filter class for reorienting all Image instances of a Subject instance to a specified SpatialOrientation.

static is_invertible()[source]#

Returns whether the filter is invertible or not.

Returns:

True because the reorientation of images is invertible.

Return type:

bool

execute(subject, params)[source]#

Execute the image reorientation procedure.

Parameters:
Returns:

The Subject instance with oriented IntensityImage and SegmentationImage instances.

Return type:

Subject

execute_inverse(subject, transform_info, target_image=None)[source]#

Execute the inverse image reorientation procedure.

Parameters:
Returns:

The Subject instance with reoriented IntensityImage and SegmentationImage instances.

Return type:

Subject