-
Notifications
You must be signed in to change notification settings - Fork 95
dicompull
Copy DICOM files from a CD or a DICOM directory and write them to a new directory structure.
dicompull [options] <input-dir> ... -o <output-format>
-L Follow symbolic links (default).
-P Do not follow symbolic links.
-k tag=value Provide an attribute to be queried and matched.
-q <query.txt> Provide a file to describe the find query.
-u <uids.txt> Provide a file that contains a list of UIDs.
-o <directory> Directory structure to fit the files into.
-maxdepth n Set the maximum directory depth.
-name pattern Set a pattern to match (with "*" or "?").
-image Restrict the search to files with PixelData.
-series Find all files in series if even one file matches.
--ignore-dicomdir Ignore the DICOMDIR file even if it is present.
--charset <cs> Charset to use if SpecificCharacterSet is missing.
--silent Do not report any progress information.
--help Print a brief help message.
--version Print the software version.
Find DICOM files in one directory and copy them into a new directory structure. This is typically done to organize a set of DICOM files that were previously disorganized.
The "-o" option can be provided with a format string that describes the output directory structure, for example:
dicompull /indir -o /outdir/{PatientID}/{StudyDate}-{StudyID}/{SeriesNumber}
The format string consists of DICOM attribute names in curly braces, which will be replaced with the attributes values from the DICOM files. The files themselves are written to the directory with names of the format "IM-SSSS-TTTT.dcm" where SSSS is the series number and TTTT is the image number.
The values are expected to be in ASCII, and any non-ASCII characters, non-graphical characters, or punctuation will be replaced with an underscore when the directory structure is created.
The files to be copied can be specified with search keys, which take the form "-k key=value" where keys can either use the standard names given in the DICOM dictionary, e.g. Modality or SeriesDescription, or can be in the form GGGG,EEEE with hexadecimal group and element values. The tags can also be listed in a query file with the "-q" option (one tag per line). See Command Line Tools and the dicomfind documentation for more information on querying files.
The "-u uids.txt" option can be used to provide a list of UIDs. Provide a file where the first line of the file is the key (e.g. SeriesInstanceUID) and the rest of the file provides the UIDs to match, one UID per line:
SeriesInstanceUID
1.3.12.2.1107.5.2.30.25490.2014011612063575738142168
1.3.12.2.1107.5.2.30.25490.2014011612063575739234876
- dicomfind to find files and pass them to another program
- dicomtocsv to summarize the DICOM files in a spreadsheet