Scroll to navigation

DCMSTACK(1) User Commands DCMSTACK(1)

NAME

dcmstack - DICOM to NIfTI conversion - python3 package

DESCRIPTION

usage: dcmstack [-h] [--force-read] [--file-ext FILE_EXT] [--allow-dummies]

[--dest-dir DEST_DIR] [-o OUTPUT_NAME] [--output-ext OUTPUT_EXT] [-d] [--embed-meta] [-g GROUP_BY] [--voxel-order VOXEL_ORDER] [-t TIME_VAR] [--vector-var VECTOR_VAR] [--time-order TIME_ORDER] [--vector-order VECTOR_ORDER] [-l] [--disable-translator DISABLE_TRANSLATOR] [--extract-private] [-i INCLUDE_REGEX] [-e EXCLUDE_REGEX] [--default-regexes] [-v] [--strict] [--version] [src_dirs ...]

Stack DICOM files from each source directory into 2D to 5D volumes, optionally extracting meta data.

positional arguments:

The source directories containing DICOM files.

optional arguments:

show this help message and exit

Input options:

Try reading all files as DICOM, even if they are missing the preamble.
Only try reading files with the given extension. Default: .dcm
Allow DICOM files that are missing pixel data, filling that slice of the output nifti with the maximum representable value.

Output options:

Destination directory, defaults to the source directory.
Python format string determining the output filenames based on DICOM tags.
The extension for the output file type. Default: .nii.gz
Dump the extracted meta data into a JSON file with the same base name as the generated Nifti
Embed the extracted meta data into a Nifti header extension (in JSON format).

Stacking Options:

Comma separated list of meta data keys to group input files into stacks with.
Order the voxels so the spatial indices start from these directions in patient space. The directions in patient space should be given as a three character code: (l)eft, (r)ight, (a)nterior, (p)osterior, (s)uperior, (i)nferior. Passing an empty string will disable reorientation. Default: LAS
The DICOM element keyword to use for ordering the stack along the time dimension.
The DICOM element keyword to use for ordering the stack along the vector dimension.
Provide a text file with the desired order for the values (one per line) of the attribute used as the time variable. This option is rarely needed.
Provide a text file with the desired order for the values (one per line) of the attribute used as the vector variable. This option is rarely needed.

Meta Extraction and Filtering Options:

List enabled translators and exit
Disable the translators for the provided tags. Tags should be given in the format "0x0_0x0". More than one can be given in a comma separated list. If the word "all" is provided, all translators will be disabled.
Extract meta data from private elements, even if there is no translator. If the value for the element contains non-ascii bytes it will still be ignored. The extracted meta data may still be filtered out by the regular expressions.
Include any meta data where the key matches the provided regular expression. This will override any exclude expressions. Applies to all meta data.
Exclude any meta data where the key matches the provided regular expression. This will supplement the default exclude expressions. Applies to all meta data.
Print the list of default include and exclude regular expressions and exit.

General Options:

Print additional information.
Fail on the first exception instead of showing a warning.
Show the version and exit.

IT IS YOUR RESPONSIBILITY TO KNOW IF THERE IS PRIVATE HEALTH INFORMATION IN THE METADATA EXTRACTED BY THIS PROGRAM.

AUTHOR0This manpage was written by Nilesh Patra for the Debian distribution and0can be used for any other usage of the program.

November 2021 dcmstack 0.8