inspect_preprocessed_root

Note

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

inspect_preprocessed_root(root: str | Path) → PreprocessedInventory[source]

List subjects and series folders under a HABIT preprocessed root.

Does not open NRRD/NIfTI files. Safe to call on the user’s own tree to check that it matches the convention.

Parameters:

root – Folder that should contain images/ and masks/.

Returns:

A PreprocessedInventory (also used as the printed report).

Raises:

DataFormatError – If images/ is missing or has no subject folders.

Examples using habit.datasets.inspect_preprocessed_root

Load from directory

Load from directory