datalad-hirni-dicom2spec

Synopsis

datalad-hirni-dicom2spec [-h] [-s SPEC] [-d DATASET] [--subject SUBJECT] [--anon-subject ANON_SUBJECT] [--acquisition ACQUISITION] [--properties PATH or JSON string] PATH [PATH ...]

Description

Derives a specification snippet from DICOM metadata and stores it in a JSON file.

The derivation is based on a rule system. You can implement your own rules as a python class. See the documentation page on customization for details. If you have such rules in dedicated files, their use and priority is configured via the datalad.hirni.dicom2spec.rules config variable. It takes a path to a python file containung such a rule definition. This configuration can be specified multiple times and at different levels (system-wide, user, dataset, local repository). If there are indeed several occurences of that configuration, the respective rules will be applied in order. Hence “later” appearances will overwrite “earlier” ones. Thereby you can have institution rules for example and still apply additional rules tailored to your needs or a particular study.

Options

PATH

path to DICOM files. 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

-s SPEC, –spec SPEC

file to store the specification in. Constraints: value must be a string [Default: None]

-d DATASET, –dataset DATASET

specify a dataset containing the DICOM metadata to be used. If no dataset is given, an attempt is made to identify the dataset based on the current working directory. 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. Constraints: value must be a string [Default: None]

–anon-subject ANON_SUBJECT

TODO. Constraints: value must be a string [Default: None]

–acquisition ACQUISITION

acquisition identifier. If not specified, an attempt will be made to derive an identifier from DICOM headers. Constraints: value must be a string [Default: None]

–properties PATH or JSON string

Constraints: value must be a string [Default: None]

Authors

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