sort_dicom#

qx_utilities.dicom.sort_dicom.sort_dicom(folder='.', copy='move', outdir=None, files=None, _log=None)#

sort_dicom [folder=.] [outdir=<folder>] [files=<comma-separated list>]

Sorts DICOM (and PAR/REC) files into per-sequence dicom subfolders.

Parameters

--folder (str, default '.'):

The base session folder that contains the inbox subfolder with the unsorted DICOM files.

--copy (str, default 'move'):

Accepted for backward compatibility but ignored, the files are always copied and the inbox folder is left intact.

--outdir (str, default detailed below):

Optional directory in which the dicom folder is created. Defaults to the folder parameter if not set.

--files (str, default detailed below):

Optional comma separated list of files to sort. Defaults to the contents of <folder>/inbox.

Notes

This is a thin wrapper over the single-pass import engine. In one read pass it sorts imaging DICOMs into dicom/<seriesNumber*10>, sets aside non-image DICOMs (dicom/non-image) and incomplete-volume/orphan slices (dicom/orphans) using scanner-aware heuristics, places PAR/REC pairs in their sequence folders and log files in dicom/log. Unlike the legacy command it copies rather than moves, so the inbox is left intact; the copy argument is therefore accepted but ignored.

Examples

qunex sort_dicom --folder=OP667