discovery¶
Dataset discovery and project metadata helpers.
default_data_dir
¶
Return the data directory without DATA_DIR: data/ of a source checkout, else ./visfem_data, where the fetch commands put the example data.
discover_xdmf
¶
Return stem->path for all .xdmf files with a matching .h5 in directory.
ircadb_organ_names
¶
Return sorted organ names available for a patient directory.
format_organ_name
¶
Return name with a space inserted after a known leading prefix word.
iter_descriptor_paths
¶
Return the sorted paths of every dataset descriptor JSON under DATASETS_DIR.
load_descriptor
¶
Return the validated ProjectMetadata parsed from the JSON at path; raises ValidationError or OSError.
load_project_metadata
¶
Return ProjectMetadata for each readable, valid dataset JSON under DATASETS_DIR, keyed by file stem and filtered by ALLOWED_DATASETS.
patient_numbers
¶
Return the sorted numeric ids of the patient_<n> folders in ddir.
group_by_organ_system
¶
Return the datasets in metadata grouped by first organ_system value, groups sorted by that value and entries by sort_order then name.
active_timeseries_path
¶
Return the active timeseries file of meta: its PVD for a PVD dataset, else the XDMF in ddir named by state.active_xdmf, else the first XDMF in ddir, else None.
grasp_phase_pvd
¶
Return the per-patient GRASP phase-series PVD path, or None if absent.
grasp_phase_count
¶
Return the number of contrast phases in a GRASP per-patient PVD.