get_dicom_fields#

qx_utilities.general.dicomdeid.get_dicom_fields(folder='.', targetfile='dicom_fields.csv', limit='20')#

get_dicom_fields [folder=.] [targetfile=dicom_fields.csv] [limit=20]

Returns an overview of DICOM fields across all the DICOM files.

Parameters

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

The base folder to search for DICOM files. The command will try to locate all valid DICOM files within the specified folder and its subfolders.

--targetfile (str, default 'dicom_fields.csv'):

The name (and path) of the file to store the information in.

--limit (int, default 20):

The maximum number of example values to provide for each of the DICOM fields.

Output files

After running, the command will inspect all the valid DICOM files (including gzip compressed ones) in the specified folder and its subfolders. It will generate a report file that will list all the DICOM fields found across all the DICOM files. For each of the fields, the command will list example values up to the specified limit. The list will be saved as a comma separated values (csv) file.

This file can be used to identify the fields that might carry personally identifiable information and therefore need to be processed appropriately.

Examples

qunex get_dicom_fields
qunex get_dicom_fields \
    --folder=/data/studies/WM/sessions/inbox/MR
qunex get_dicom_fields \
     --folder=/data/studies/WM/sessions/inbox/MR/original \
     --targetfile=/data/studies/WM/sessions/specs/dicom_fields.csv \
     --limit=10