DICOM import functions#
Discover and load classic or enhanced DICOM image series. The general layer handles pixel scaling, functional groups, geometry, slice/frame ordering, dimensions, and standard MR observables. Vendor adapters add origin-specific metadata. The shared DICOM core owns pixel decoding and geometry.
- class mrax.io.dicom.DicomSeriesInfo(series_instance_uid: str, study_instance_uid: str, modality: str, manufacturer: str, description: str, file_count: int, frame_count: int)#
Header-only description of one discoverable DICOM image series.
- class mrax.io.dicom.DicomMetadataPatch(normalized: Mapping[str, object]=<factory>, metadata: Mapping[str, object]=<factory>)#
Vendor adapter additions to normalized and diagnostic metadata.
- class mrax.io.dicom.DicomMetadataAdapter(*args, **kwargs)#
Extension point for origin-specific DICOM metadata conventions.
- class mrax.io.dicom_bruker.BrukerDicomMetadataAdapter#
Interpret Bruker conventions layered on Enhanced MR/PET DICOM objects.
Bruker exports used by this adapter contain standards-based functional groups. Pixel decoding and geometry therefore remain in the general DICOM layer. This adapter is limited to origin detection, sequence naming, frame annotations, and Bruker-specific experiment hints.
- mrax.io.dicom.discover_dicom_series(source: str | Path | Sequence[str | Path], *, recursive: bool = True, force: bool = False) list[DicomSeriesInfo]#
Inspect DICOM headers and return image-series summaries.
Summaries contain only technical series metadata. Readable DICOM images enter discovery.
- mrax.io.dicom.load_dicom_series(source: str | Path | Sequence[str | Path], *, series_instance_uid: str | None = None, name: str | None = None, override_type: str | None = None, metadata_adapters: Sequence[DicomMetadataAdapter] | None = None, recursive: bool = True, force: bool = False, include_identifiers: bool = False, metadata_overrides: Mapping[str, object] | None = None) tuple[Experiment, DataSet, dict[str, object]]#
Load one classic or enhanced DICOM image series into MRax containers.
Standard rescale transforms, functional-group geometry, slice ordering, temporal dimensions, and common MR observables are handled by the general layer. When the input contains more than one series,
series_instance_uidis required.
- mrax.io.dicom.load_dicom_study(source: str | Path | Sequence[str | Path], *, type_overrides: Mapping[str, str] | None = None, metadata_adapters: Sequence[DicomMetadataAdapter] | None = None, recursive: bool = True, force: bool = False, include_identifiers: bool = False, series_groups: Mapping[str, Sequence[str]] | None = None, metadata_overrides: Mapping[str, Mapping[str, object]] | None = None) tuple[Study, dict[str, object]]#
Load DICOM series, optionally assembling explicitly named contrast sweeps.
series_groupsmaps experiment names to series UIDs. Selected series must share study, frame of reference, pixel layout and physical geometry. Unlisted series remain separate. Explicit compatible UIDs govern series merging.