ormir-mids package
Module contents
This is the muscle-bids base package providing basic I/O functionality for reading and writing DICOM and BIDS files. The python representation of the data is the MedicalVolume class, provided by pyvoxel, with added attributes for BIDS.
- Specifically, the MedicalVolumes returned have four additional attributes:
omids_header: a dictionary containing the information contained in the BIDS header
patient_header: a dictionary containing patient information
extra_header: a dictionary containing raw DICOM tags that are not part of the BIDS header
meta_header: a dictionary containing the meta DICOM information
- ormir_mids.MedicalVolume
alias of
OMidsMedVolume
- ormir_mids.find_omids(path, suffix)[source]
Finds an ORMIR-MIDS dataset with a specific suffix (e.g. mese).
- Parameters:
path (str): Path to the root folder suffix (str): Suffix of the bids dataset
- Returns:
list: List of paths to the bids datasets
- ormir_mids.load_dicom(path, group_by=None)[source]
Loads all dicom files in a folder.
- Parameters:
path (str): Path to the folder group_by (str): If not None, group the volumes by the specified header
- Returns:
MedicalVolume with muscle-bids headers
- ormir_mids.load_dicom_with_subfolders(path)[source]
Loads all dicom files in a folder and its subfolders.
- Parameters:
path (str): Path to the root folder
- Returns:
list: List of dicom volumes