sort_dicom
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
dicomsubfolders.Parameters
- --folder (str, default '.'):
The base session folder that contains the
inboxsubfolder with the unsorted DICOM files.- --copy (str, default 'move'):
Accepted for backward compatibility but ignored, the files are always copied and the
inboxfolder is left intact.- --outdir (str, default detailed below):
Optional directory in which the
dicomfolder 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 indicom/log. Unlike the legacy command it copies rather than moves, so theinboxis left intact; thecopyargument is therefore accepted but ignored.Examples
qunex sort_dicom --folder=OP667
