Modality Module#

Module: pyradise.data.modality

General#

The modality module provides the functionality to manage the Modality information of a certain IntensityImage.

examples of different modalities

Fig. 7 Examples of different “modalities”.#

Class Overview#

The following class is provided by the modality module:

Class

Description

Modality

Class to identify the imaging modality and its details of a certain IntensityImage instance.

Details#

class Modality(name)[source]#

Bases: object

A class for identifying the imaging modality and its details.

Notes

The Modality class is used to discriminate between different imaging modalities and its details (e.g. the MR-sequence (T1c or T1w)). We are aware that the name modality may be misleading and does not follow precisely the professional taxonomy of the community, but we decided to stick to it for the sake of clarity and ease of use.

Parameters:

name (str) – The name of the modality.

classmethod get_default()[source]#

Get the default Modality.

Notes

The default Modality is ‘UNKNOWN’.

Returns:

The default Modality.

Return type:

Modality

is_default()[source]#

Check if the Modality is the default Modality.

Notes

The default Modality is ‘UNKNOWN’.

Returns:

True if the Modality is the default Modality, otherwise False.

Return type:

bool

get_name()[source]#

Get the name of the Modality.

Returns:

The name of the Modality.

Return type:

str