CLI Reference¶
This page provides documentation for our command line tools.
dicom-qr¶
DICOM Query & Retrieve tool.
Usage¶
dicom-qr [OPTIONS] COMMAND [ARGS]...
Arguments¶
No arguments available
Options¶
| Name | Description | Required | Default |
|---|---|---|---|
--version |
Show version info and exit. | No | - |
--help |
Show this message and exit. | No | - |
Commands¶
| Name | Description |
|---|---|
tui |
Start the TUI. |
list-series-for-study |
Get the series for a study. |
list-studies-name |
Get the studies for a patient name,... |
list-studies-patient-id |
Get the studies for a patient ID,... |
list-studies-accession-number |
List the studies for an accession number,... |
list-studies-date |
Get all studies between two dates,... |
studyuid-from-acc-number-file |
Load a CSV file, read the column... |
echo-pacs |
Send C-ECHO to server. |
download-from-patientid-date |
Download the images from the patientID and... |
download-from-name-date |
Download the images from the patient name... |
download-from-accession-number |
Download the images from the accession... |
download-from-studyuid |
Download a study, filtering for modalities. |
download-from-studyuid-file |
Download the studies listed in file... |
deident-check-files |
Check files against the filters in the... |
deident-retain-patient-id-name |
Apply de-identification keeping the... |
deident-replace-patient-id-name |
Apply de-identification and use a lookup... |
send-data-to-dicom-node |
Send DICOM files in a folder to a DICOM... |
Sub Commands¶
dicom-qr tui¶
Start the TUI.
Usage¶
dicom-qr tui [OPTIONS][SETTINGS_FILE]
Arguments¶
| Name | Description | Required |
|---|---|---|
[SETTINGS_FILE] |
[default: settings.json] | No |
Options¶
| Name | Description | Required | Default |
|---|---|---|---|
--help |
Show this message and exit. | No | - |
dicom-qr list-series-for-study¶
Get the series for a study.
Usage¶
dicom-qr list-series-for-study [OPTIONS] STUDY_UID [MODALITIES]...
Arguments¶
| Name | Description | Required |
|---|---|---|
STUDY_UID |
StudyInstanceUID | Yes |
Options¶
| Name | Description | Required | Default |
|---|---|---|---|
-v, --verbose |
Print more output | No | - |
-vv |
Print even more output | No | - |
--help |
Show this message and exit. | No | - |
dicom-qr list-studies-name¶
Get the studies for a patient name, filtering for modalities.
Usage¶
dicom-qr list-studies-name [OPTIONS] PATIENT_NAME [MODALITIES]...
Arguments¶
| Name | Description | Required |
|---|---|---|
PATIENT_NAME |
Patient name to query | Yes |
Options¶
| Name | Description | Required | Default |
|---|---|---|---|
-v, --verbose |
Print more output | No | - |
-vv |
Print even more output | No | - |
--help |
Show this message and exit. | No | - |
dicom-qr list-studies-patient-id¶
Get the studies for a patient ID, filtering for modalities.
Usage¶
dicom-qr list-studies-patient-id [OPTIONS] PATIENT_ID [MODALITIES]...
Arguments¶
| Name | Description | Required |
|---|---|---|
PATIENT_ID |
Patient ID to query | Yes |
Options¶
| Name | Description | Required | Default |
|---|---|---|---|
-d, --study_descr TEXT |
Study description for filtering | No | - |
-v, --verbose |
Print more output | No | - |
-vv |
Print even more output | No | - |
--help |
Show this message and exit. | No | - |
dicom-qr list-studies-accession-number¶
List the studies for an accession number, filtering for modalities.
Usage¶
dicom-qr list-studies-accession-number [OPTIONS] ACCESSION_NUMBER [MODALITIES]...
Arguments¶
| Name | Description | Required |
|---|---|---|
ACCESSION_NUMBER |
Accession number (16 characters). | Yes |
Options¶
| Name | Description | Required | Default |
|---|---|---|---|
-v, --verbose |
Print more output | No | - |
-vv |
Print even more output | No | - |
--help |
Show this message and exit. | No | - |
dicom-qr list-studies-date¶
Get all studies between two dates, filtering any of the study descriptions and modalities. Does not download images. The number of responses from the PACS is limited, if no results show try more filtering (descriptions and/or modalities or shorten the date range).
Usage¶
dicom-qr list-studies-date [OPTIONS]
Arguments¶
No arguments available
Options¶
| Name | Description | Required | Default |
|---|---|---|---|
-s, --start [%Y-%m-%d|%Y%m%d] |
Start date | Yes | - |
-e, --end [%Y-%m-%d|%Y%m%d] |
End date [default: 2025-08-28] | No | - |
-d, --study_descr TEXT |
Study description for filtering, can be used multiple times. | No | - |
-p, --patient_id TEXT |
Patient ID for filtering | No | - |
-m, --modalities TEXT |
Modalities used for filtering, can be used multiple times. | No | - |
-v, --verbose |
Print more output | No | - |
-vv |
Print even more output | No | - |
--help |
Show this message and exit. | No | - |
dicom-qr studyuid-from-acc-number-file¶
Load a CSV file, read the column 'AccessionNumber' and write all studies to output. Does not download images.
Usage¶
dicom-qr studyuid-from-acc-number-file [OPTIONS] FILENAME [OUTPUT]
Arguments¶
| Name | Description | Required |
|---|---|---|
FILENAME |
[required] | No |
Options¶
| Name | Description | Required | Default |
|---|---|---|---|
-vv |
Print even more output | No | - |
--help |
Show this message and exit. | No | - |
dicom-qr echo-pacs¶
Send C-ECHO to server.
Usage¶
dicom-qr echo-pacs [OPTIONS]
Arguments¶
No arguments available
Options¶
| Name | Description | Required | Default |
|---|---|---|---|
-v |
Print more output | No | - |
-vv |
Print even more output | No | - |
--help |
Show this message and exit. | No | - |
dicom-qr download-from-patientid-date¶
Download the images from the patientID and date, filtering for modalities.
Usage¶
dicom-qr download-from-patientid-date [OPTIONS] PATIENT_ID STUDY_DATE:[%Y-%m-%d|%Y%m%d]
Arguments¶
| Name | Description | Required |
|---|---|---|
PATIENT_ID |
[required] | No |
STUDY_DATE:[%Y-%m-%d|%Y%m%d] |
[required] | No |
Options¶
| Name | Description | Required | Default |
|---|---|---|---|
-m, --modality TEXT |
Filter series based on modalities | No | - |
-s, --sop-class-uid TEXT |
Filter series based on SOPClassUID | No | - |
--dumpdir DIRECTORY |
Override output folder. | No | - |
-v, --verbose |
Print more output | No | - |
-vv |
Print even more output | No | - |
--help |
Show this message and exit. | No | - |
dicom-qr download-from-name-date¶
Download the images from the patient name and date, filtering for modalities.
Usage¶
dicom-qr download-from-name-date [OPTIONS] PATIENT_NAME STUDY_DATE:[%Y-%m-%d|%Y%m%d]
Arguments¶
| Name | Description | Required |
|---|---|---|
PATIENT_NAME |
[required] | No |
STUDY_DATE:[%Y-%m-%d|%Y%m%d] |
[required] | No |
Options¶
| Name | Description | Required | Default |
|---|---|---|---|
-m, --modality TEXT |
Filter series based on modalities | No | - |
-s, --sop-class-uid TEXT |
Filter series based on SOPClassUID | No | - |
--dumpdir DIRECTORY |
Override output folder. | No | - |
-v, --verbose |
Print more output | No | - |
-vv |
Print even more output | No | - |
--help |
Show this message and exit. | No | - |
dicom-qr download-from-accession-number¶
Download the images from the accession number, filtering for modalities.
Usage¶
dicom-qr download-from-accession-number [OPTIONS] ACCESSION_NUMBER
Arguments¶
| Name | Description | Required |
|---|---|---|
ACCESSION_NUMBER |
Accession number. | Yes |
Options¶
| Name | Description | Required | Default |
|---|---|---|---|
-m, --modality TEXT |
Filter series based on modalities | No | - |
-s, --sop-class-uid TEXT |
Filter series based on SOPClassUID | No | - |
--dumpdir DIRECTORY |
Override output folder. | No | - |
-v, --verbose |
Print more output | No | - |
-vv |
Print even more output | No | - |
--help |
Show this message and exit. | No | - |
dicom-qr download-from-studyuid¶
Download a study, filtering for modalities.
Usage¶
dicom-qr download-from-studyuid [OPTIONS] STUDY_UID
Arguments¶
| Name | Description | Required |
|---|---|---|
STUDY_UID |
Study UID to download | Yes |
Options¶
| Name | Description | Required | Default |
|---|---|---|---|
-m, --modality TEXT |
Filter series based on modalities | No | - |
-s, --sop-class-uid TEXT |
Filter series based on SOPClassUID | No | - |
--dumpdir DIRECTORY |
Override output folder. | No | - |
--no_store_scp |
No local C_STORE SCP server. | No | - |
-v, --verbose |
Print more output | No | - |
-vv |
Print even more output | No | - |
--help |
Show this message and exit. | No | - |
dicom-qr download-from-studyuid-file¶
Download the studies listed in file (column name: StudyInstanceUID), filtering for modalities and/or sop_class_uid.
Usage¶
dicom-qr download-from-studyuid-file [OPTIONS] FILENAME
Arguments¶
| Name | Description | Required |
|---|---|---|
FILENAME |
Input | Yes |
Options¶
| Name | Description | Required | Default |
|---|---|---|---|
-m, --modality TEXT |
Filter series based on modalities | No | - |
-s, --sop-class-uid TEXT |
Filter series based on SOPClassUID | No | - |
--already-processed FILE |
File with already processed UIDs. | No | - |
--dumpdir DIRECTORY |
Override output folder. [default: dumpdir] | No | - |
-v, --verbose |
Print more output | No | - |
-vv |
Print even more output | No | - |
--help |
Show this message and exit. | No | - |
dicom-qr deident-check-files¶
Check files against the filters in the recipe and log the results.
Usage¶
dicom-qr deident-check-files [OPTIONS] INPUT_DIR
Arguments¶
| Name | Description | Required |
|---|---|---|
INPUT_DIR |
input folder. | Yes |
Options¶
| Name | Description | Required | Default |
|---|---|---|---|
-r, --recipe PATH |
Recipe to de-identify | No | - |
-v, --verbose |
Print more output | No | - |
-vv |
Print even more output | No | - |
--help |
Show this message and exit. | No | - |
dicom-qr deident-retain-patient-id-name¶
Apply de-identification keeping the existing patient name and id.
Usage¶
dicom-qr deident-retain-patient-id-name [OPTIONS] INPUT_DIR OUTPUT_DIR
Arguments¶
| Name | Description | Required |
|---|---|---|
INPUT_DIR |
input folder. | Yes |
OUTPUT_DIR |
output folder. | Yes |
Options¶
| Name | Description | Required | Default |
|---|---|---|---|
-r, --recipe PATH |
Recipe to de-identify | No | - |
-l, --log PATH |
Log UID lookup to file | No | - |
-d, --date-offset INTEGER |
Date offset to de-identify | No | - |
--xnat-project TEXT |
Add PatientComments tag for importing into the correct XNAT project | No | - |
--xnat-prefix TEXT |
Prefix added subject and session field for XNAT | No | - |
-v, --verbose |
Print more output | No | - |
-vv |
Print even more output | No | - |
--help |
Show this message and exit. | No | - |
dicom-qr deident-replace-patient-id-name¶
Apply de-identification and use a lookup table to update patient name and id.
Usage¶
dicom-qr deident-replace-patient-id-name [OPTIONS] INPUT_DIR OUTPUT_DIR PATIENT_MAPPING
Arguments¶
| Name | Description | Required |
|---|---|---|
INPUT_DIR |
input folder. | Yes |
OUTPUT_DIR |
output folder. | Yes |
PATIENT_MAPPING |
CSV/XSLX file with the original patient IDs and the new ones. | Yes |
Options¶
| Name | Description | Required | Default |
|---|---|---|---|
-r, --recipe PATH |
Recipe to de-identify | No | - |
-l, --log PATH |
Log UID lookup to file | No | - |
-d, --date-offset INTEGER |
Date offset to de-identify | No | - |
-e, --time-offset INTEGER |
Time offset to de-identify | No | - |
--xnat-project TEXT |
Add PatientComments tag for importing into the correct XNAT project | No | - |
--xnat-prefix TEXT |
Prefix added subject and session field for XNAT | No | - |
--pixel-anonymize |
Perform pixel anonymization | No | - |
-v, --verbose |
Print more output | No | - |
-vv |
Print even more output | No | - |
--help |
Show this message and exit. | No | - |
dicom-qr send-data-to-dicom-node¶
Send DICOM files in a folder to a DICOM Store SCP node.
Usage¶
dicom-qr send-data-to-dicom-node [OPTIONS] DESTINATION PORT DATA_FOLDER
Arguments¶
| Name | Description | Required |
|---|---|---|
DESTINATION |
Address of the destination DICOM node | Yes |
PORT |
Port of the destination DICOM node | Yes |
DATA_FOLDER |
File or folder to upload. | Yes |
Options¶
| Name | Description | Required | Default |
|---|---|---|---|
-r, --recursive |
Recursive scanning of input | No | - |
-v, --verbose |
Print more output | No | - |
-vv |
Print even more output | No | - |
--help |
Show this message and exit. | No | - |