dicomsort icon indicating copy to clipboard operation
dicomsort copied to clipboard

meaning of the -z flag

Open pieper opened this issue 11 years ago • 3 comments

Is the goal of -z to run gzip compression on the files when putting them in the target directory?

pieper avatar Apr 18 '13 14:04 pieper

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

bebbi avatar Apr 18 '13 14:04 bebbi

Makes sense - let's do .zip then - it's probably the most widely supported format (windows and mac in explorer/finder).

pieper avatar Apr 18 '13 15:04 pieper

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.)

pieper avatar Apr 26 '13 13:04 pieper