DataSource

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 DataSource(*args, **kwargs)[source]

Bases: Protocol

Anything that can produce a cohort.

This protocol is the concrete mechanism behind the goal of embedding HABIT into the wider ecosystem. The v0.1 directory convention becomes one implementation among several rather than the only way in, so data prepared by nnU-Net, MONAI, a DICOM export, or an in-memory notebook session are all equally valid entry points.

load() → Cohort[source]

Build the cohort described by this source.

Returns:

A cohort with a defined, reproducible subject order.

__init__(*args, **kwargs)