nipoppy.tabular.dicom_dir_map.DicomDirMap¶
- class nipoppy.tabular.dicom_dir_map.DicomDirMap(*args, **kwargs)¶
A dataset’s DICOM directory mapping.
This mapping is used during DICOM reorganization and curation status file generation.
- get_dicom_dir(participant_id, session_id)¶
Return the participant’s raw DICOM directory for a given session.
- classmethod load_or_generate(manifest, fpath_dicom_dir_map, participant_first, validate=True)¶
Load or generate a DicomDirMap instance.
- Parameters:
manifest (
nipoppy.tabular.manifest.Manifest
) – Manifest for generating the mapping (not used iffpath_dicom_dir_map
is notNone
).fpath_dicom_dir_map (str | Path | None) – Path to a custom DICOM directory mapping file. If
None
, the DICOM directory mapping will be generated from the manifest.participant_first (bool) – Whether the generated uses
<PARTICIPANT>/<SESSION>
order (True) or<SESSION>/<PARTICIPANT>
(False). Not used iffpath_dicom_dir_map
is notNone
validate (bool, optional) – Whether to validate (through Pydantic) the created object, by default
True
- Return type:
- col_participant_dicom_dir = 'participant_dicom_dir'¶
- col_participant_id = 'participant_id'¶
- col_session_id = 'session_id'¶
- index_cols¶
- model¶
Model class associated with the tabular data.