Annotator Module#

Module: pyradise.data.annotator

General#

The annotator module provides the functionality to manage information about the expert Annotator who generated the segmentation on a certain SegmentationImage. The Annotator can take any name such that it can be used to identify a human expert as well as an auto-segmentation algorithm (e.g. a deep learning model).

Examples of different annotator naming:

from pyradise.data.annotator import Annotator

annotator = Annotator("John Doe")
annotator = Annotator("John Doe", "JD")
annotator = Annotator("Robust Auto-Segmentation Algorithm")
annotator = Annotator("Robust Auto-Segmentation Algorithm", "RASA")
annotator = Annotator("Segmentation Algorithm v0.1")
annotator = Annotator("Segmentation Algorithm v0.1", "SA-V01")

Class Overview#

The following class is provided by the annotator module:

Class

Description

Annotator

Class to identify the human expert or the auto-segmentation algorithm that generated a certain SegmentationImage instance.

Details#

class Annotator(name, abbreviation=None)[source]#

Bases: object

A class for identifying the annotator who segmented a certain organ. Because the name of the annotator takes every value, the annotator can either be a human expert or an auto-segmentation algorithm.

Parameters:
  • name (str) – The name of the annotator.

  • abbreviation (Optional[str]) – The abbreviation of the annotator (default: None).

get_name()[source]#

Get the name of the Annotator.

Returns:

The name of the Annotator.

Return type:

str

get_abbreviation()[source]#

Get the abbreviation of the Annotator.

Returns:

The abbreviation of the Annotator if contained, otherwise None.

Return type:

Optional[str]

classmethod get_default()[source]#

Get the default Annotator.

The default Annotator name is ‘NA’ and its abbreviation is also ‘NA’.

Returns:

The default Annotator.

Return type:

Annotator

is_default()[source]#

Check if the Annotator is the default Annotator.

Returns:

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

Return type:

bool