dicomsort
dicomsort copied to clipboard
meaning of the -z flag
Is the goal of -z to run gzip compression on the files when putting them in the target directory?
yes - gzip or zip. The whole folder tree would be created as without the -z, then as a final pass all files (lowest level, without involving any folders) would be compressed. Example result without -z:
doejohn/MR_1
doejohn/MR_2
etc.
with -z:
doejohn/MR.zip or .gz
Makes sense - let's do .zip then - it's probably the most widely supported format (windows and mac in explorer/finder).
After looking at this a bit, I'm going to suggest we do it a little differently to remove a layer of directory.
Suppose you had something like:
%PatientName/%StudyDate/%SeriesDescription-%InstanceNumber.dcm
to get files like:
doejohn/2013-04-26/FLAIR-1.dcm
rather than creating a zip like this:
doejohn/2013-04-26/FLAIR.zip
I say we should make a file like this:
doejohn/2013-04-26.zip
The advantage of this is that we don't need to define the format of the zip file name (how do we know to drop the InstanceNumber? It would need to be an extra command line argument, which would be awkward.)