Command line arguments
You can use the following command-line arguments:
|
Open a DICOM file |
mDicom.exe <path_to_DICOM_file> |
|
Open a DICOMDIR file |
mDicom.exe <path_to_DICOMDIR_file> |
|
Open a DICOM zip file |
mDicom.exe <path_to_zip_file> |
|
Scan a folder for DICOM files |
mDicom.exe <path_to_directory_to_scan> |
|
Open DICOM files and folders |
mDicom.exe -fd <path_to_file1> <path_to_file2> <path_to_folder> |
|
Open MicroDicom in full-screen mode |
mDicom.exe -fullscreen |
|
Scan for DICOM files and copy them to a folder |
mDicom.exe -scanAndCopy -in <path_to_folder|path_to_folder> -out <path_to_folder> Example: mDicom.exe -scanAndCopy -in "c:\images" -out "c:\export" |
|
Scan CD for DICOM files and copy them to a folder |
mDicom.exe -scanCDAndCopy -out <path_to_folder> |
|
Show progress bar and messages on command line |
mDicom.exe -showUI Example: mDicom.exe -scanCDAndCopy -showUI -out "C:\export" |
|
Scan for DICOM files and convert to other format |
mDicom.exe -scanAndConvert -format <jpeg|png|bmp|gif|tiff|wmf|wmv|avi|txt|csv> -in <path_to_folder|path_to_folder> -out <path_to_folder> You can also use -overlay <all|anonymous|none>
|
|
Scan for JPG, PNG, BMP, GIF, TIFF files and convert to DICOM |
mDicom.exe -scanAndConvertToDicom -in <path_to_folder|path_to_folder> -out <path_to_folder> |
|
Anonymize DICOM files |
mDicom.exe -anonymize -in <path_to_folder|path_to_folder> -out <path_to_folder>
|
|
Download and show studies by tag value. Search in all PACS servers from the settings |
mDicom.exe -pacsTagValue 00100020 "PatientID" |
|
Download and show studies by tag value. Search in a specific PACS server with AE title from the settings |
mDicom.exe -pacsAETitle PACS_AETITLE -pacsTagValue 00100010 "PatientName" |
|
Download and show studies by tag value. Search in a specific PACS server with AE title, IP, Port and Protocol |
mDicom.exe -pacsServer <AETITLE>:<IP>:<Port>:<Protocol> -pacsTagValue 00100020 "PatientID" Example: mDicom.exe -pacsServer AETITLE:192.168.1.10:4242:MOVE -pacsTagValue 00100020 John |
|
Import files to the local database |
mDicom.exe -importToDatabase -in <path_to_folder|path_to_folder> -database <path_to_database_file> -copyFiles Example for importing images from a folder to the current database: Example for importing images from a folder to the current database and copy them to the database folder: Example for importing images from a folder to a specific database and copy them to the database folder: Example for importing images from two folders to the current database: |
The -anonymize command accepts the following options. They correspond to the settings in the Anonymize dialog. An option that is not used keeps the value last used in the Anonymize dialog (the template and the text added to the file name) or leaves the tags unchanged (all other options).
|
-template <name> |
Uses the anonymize template with this name. Nothing is anonymized if the template does not exist. |
|
-patientName <value> |
Replaces the patient name with the value. Without a value the patient name is cleared. |
|
-patientID <value> |
Replaces the patient ID with the value. Without a value the patient ID is cleared. |
|
-patientAge <value> |
Replaces the patient age with the value. Without a value the patient age is cleared. |
|
-instanceUID <new|keep> |
Generates new instance UIDs or keeps the original ones. |
|
-privateTags <delete|keep> |
Deletes the private tags or keeps them. |
|
-timesDates <clear|keep> |
Clears the times and dates or keeps them. |
|
-fileNameText <text> |
Adds the text to the names of the anonymized files. |
|
-fileNameTextPosition <beginning|end> |
Adds the text at the beginning or at the end of the file name. |
|
-noFileNameText |
Does not add text to the names of the anonymized files. |
|
-createSubFolder |
Creates a subfolder for the anonymized files in the output folder. |
Nothing is anonymized if an option has a wrong value. Use -showUI to see the error message.
Example:
mDicom.exe -anonymize -in "c:\images" -out "c:\export" -template "Research" -patientName "Anonymous" -patientID "0001" -instanceUID new -privateTags delete -timesDates clear -fileNameText "_anon"
The -createSubFolder option can also be used with -scanAndCopy, -scanCDAndCopy and -scanAndConvert (image and text formats). Without it the files are written directly to the output folder.
Example:
mDicom.exe -scanAndConvert -format jpeg -createSubFolder -in "c:\images" -out "c:\export"
Downloading studies with -pacsTagValue also works with DICOMweb servers. Without other options the search is done in all servers from the settings that are enabled for receiving, including the DICOMweb servers. The following options select the server:
|
-pacsDescription <description> |
Searches in the server from the settings with this description. It works for standard and for DICOMweb servers. |
|
-pacsServer <URL> |
Searches in a DICOMweb server that is not in the settings. The URL must start with http:// or https://. |
|
-pacsQidoPath <path> |
QIDO path, relative to the URL of the DICOMweb server. Used with -pacsServer <URL>. Empty by default. |
|
-pacsWadoPath <path> |
WADO path, relative to the URL of the DICOMweb server. Used with -pacsServer <URL>. Empty by default. |
|
-pacsUser <user> -pacsPassword <password> |
User name and password for basic authentication. Used with -pacsServer <URL>. A password on the command line can be seen by other users of the computer; to avoid this, add the server to the settings and use -pacsDescription. |
Examples:
mDicom.exe -pacsDescription "Hospital web PACS" -pacsTagValue 00100020 "PatientID"
mDicom.exe -pacsServer https://pacs.example.com/dicom-web -pacsTagValue 00100010 "PatientName"
mDicom.exe -pacsServer https://pacs.example.com/dicom-web -pacsUser john -pacsPassword secret -pacsTagValue 00100020 "PatientID"
The -pacsDate option downloads only the studies from a period of time. It can be used together with -pacsTagValue or without it, and with all options that select the server.
|
-pacsDate <today|yesterday|last2days|last7days|lastMonth|last3Months> |
Studies from the period. The periods are the same as in the Download from DICOM server dialog. lastWeek can be used instead of last7days. |
|
-pacsDate <YYYYMMDD> |
Studies from this date. |
|
-pacsDate <YYYYMMDD-YYYYMMDD> |
Studies between the two dates. |
Nothing is downloaded if neither -pacsTagValue nor -pacsDate is used.
Examples:
mDicom.exe -pacsAETitle PACS_AETITLE -pacsDate last7days
mDicom.exe -pacsTagValue 00100020 "PatientID" -pacsDate 20260101-20260131