Overlay

Note

This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the Habitat Guide and Python API guide (v2.0) for usage.

class Overlay(modality: str, at: str = 'habitat_map')[source]

Bases: object

Habitat labels over one source modality.

modality

Image key on the subject (e.g. "T1").

Type:

str

at

Pipeline boundary this atom reads. Fixed at habitat_map.

Type:

str

stem(subject_id: str) → str[source]

Return the PNG stem <subject>_<modality>_overlay.

draw(ctx: SubjectContext) → 'Figure' | None[source]

Draw the overlay, or raise if the modality is missing.

Parameters:

ctx – Completed subject’s map and images.

Returns:

A matplotlib Figure.

Raises:

HABITAPIError – If ctx.subject has no image for modality.

__init__(modality: str, at: str = 'habitat_map') → None