datalad-hirni-import-dcm

Synopsis

datalad-hirni-import-dcm [-h] [-d PATH] [--subject SUBJECT] [--anon-subject ANON_SUBJECT] [--properties PATH or JSON string] PATH [ACQUISITION ID]

Description

Import a DICOM archive into a study raw dataset.

This creates a subdataset, containing the extracted DICOM files, under ACQUISITION ID/dicoms. Metadata is extracted from the DICOM headers and a study specification will automatically be prefilled, based on the metadata in DICOM headers. The specification is written to AQUISTION ID/studyspec.json by default. To this end after the creation of the subdataset and the extraction of DICOM metadata, hirni-dicom2spec is called internally. Therefore whatever you configure regarding dicom2spec applies here as well. Please refer to hirni-dicom2spec’s documentation on how to configure the deduction from DICOM metadata to a study specification.

Options

PATH

path or URL of the dicom archive to be imported. Constraints: value must be a string

ACQUISITION ID

acquisition identifier for the imported DICOM files. This is used as the name the of directory, that is supposed to contain all data related to that acquisition. If not specified, an attempt will be made to derive ACQUISITION_ID from DICOM metadata. You can specify how to deduce that identifier from the DICOM header fields by configuring DATALAD.HIRNI.IMPORT.ACQUISITION-FORMAT with a python format string referencing DICOM header field names as variables. For example, the current default value for that configuration is “{PatientID}”. Constraints: value must be a string [Default: None]

-h, –help, –help-np

show this help message. –help-np forcefully disables the use of a pager for displaying the help message

-d PATH, –dataset PATH

specify the dataset to import the DICOM archive into. If no dataset is given, an attempt is made to identify the dataset based on the current working directory and/or the given PATH. Constraints: Value must be a Dataset or a valid identifier of a Dataset (e.g. a path) [Default: None]

–subject SUBJECT

subject identifier. If not specified, an attempt will be made to derive SUBJECT from DICOM headers. See hirni-dicom2spec for details. Constraints: value must be a string [Default: None]

–anon-subject ANON_SUBJECT

an anonymized subject identifier. This is needed for anonymized conversion via spec2bids –anonymize and will be stored in the specification snippet for the imported DICOMs. Hence it can be added later and isn’t mandatory for the import. Constraints: value must be a string [Default: None]

–properties PATH or JSON string

a JSON string or a path to a JSON file, to provide overrides/additions to the to be created specification snippets for this acquisition. Constraints: value must be a string [Default: None]

Authors

datalad is developed by DataLad developers <team@datalad.org>.