### dcmqrscp example: start server with DICOMDIR Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-dcmqrscp/README.md Starts a dcmqrscp server listening on port 11112 with called AE title DCMQRSCP, using the DICOMDIR at /media/cdrom/DICOMDIR. ```text dcmqrscp -b DCMQRSCP:11112 --dicomdir /media/cdrom/DICOMDIR ``` -------------------------------- ### modality --stgcmt example command Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-ihe/dcm4che-tool-ihe-modality/README.md Example command that starts a server on port 11114 with AE title MODALITY, scans images in path/to/study, sends MPPS N-CREATE and N-SET requests, sends DICOM objects, and requests storage commitment to DCM4CHEE@localhost:11112. ```bash modality --stgcmt -b MODALITY:11114 -c DCM4CHEE@localhost:11112 path/to/study ``` -------------------------------- ### Get file information with qstar Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-qstar/README.md Gets file information for the file at the specified full path. ```bash qstar -u user:secret --url http://127.0.0.1:18083 /path/to/file ``` -------------------------------- ### storescu usage example Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-storescu/README.md Shows a basic command to send a DICOM image to a Storage Service Class Provider. The example uses the -c option to specify the destination and the image file as an argument. ```text storescu -c STORESCP@localhost:11112 image.dcm ``` -------------------------------- ### json2index example invocation Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-json2index/README.md Example command that runs json2index on a schema directory. The output shows attribute names, descriptions, and parent schema information for each schema in the directory. ```text json2index /work/dcm4chee-arc-lang/src/main/webapp/assets/schema ``` -------------------------------- ### hl7pix command example Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-hl7pix/README.md Example command to query a PIX Manager for patient IDs across domains. The command specifies the PIX Manager address and patient ID with assigning authority. ```bash hl7pix -c XREF^XYZ@localhost:2575 XYZ10515W^^^XREF2005 ``` -------------------------------- ### dcmdump example command Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-dcmdump/README.md Example command that dumps the DICOM file image.dcm to standard output. ```bash $ dcmdump image.dcm ``` -------------------------------- ### xml2dcm command examples Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-xml2dcm/README.md Two command-line examples for the xml2dcm tool. The first converts an XML presentation to a DICOM file. The second loads a DICOM object and stores it as a DICOM Part 10 file with a specified transfer syntax. ```bash xml2dcm -x in.xml -o out.dcm ``` ```bash xml2dcm -f -t 1.2.840.10008.1.2.1.99 -i in.dcm -o out.dcm ``` -------------------------------- ### Start storescp server with AE title and port Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-storescp/README.md Starts the storescp server listening on port 11112, accepting association requests with STORESCP as the called AE title. Received objects are stored to the working directory. ```bash storescp -b STORESCP:11112 ``` -------------------------------- ### Start IANSCP server on port 11112 Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-ianscp/README.md Starts the IANSCP server listening on port 11112, accepting association requests. ```bash ianscp -b IANSCP:11112 ``` -------------------------------- ### Start STOW-RS server on port 8080 Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-stowrsd/README.md Starts the STOW-RS server listening on port 8080. The server accepts connections on any local address by default. ```bash stowrsd -b 8080 ``` -------------------------------- ### Start HL7 receiver on port 2575 Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-hl7rcv/README.md Starts the HL7 receiver listening on port 2575. ```bash hl7rcv -b 2575 ``` -------------------------------- ### maskpxdata example: nullify two regions Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-maskpxdata/README.md Example command that nullifies pixel values inside two rectangular regions of 200x60 pixels with top-left corners at (20,20) and (500,20) on image.dcm. ```text maskpxdata -r 20,20,200,60 -r 500,20,200,60 -- image.dcm ``` -------------------------------- ### dcmldap example: create new Device with Network AE Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-dcmldap/README.md Command to create a new Device 'storescp' providing Network AE 'STORESCP' on Network Connection 'dicom' listening on host 'storescp' at port '11112'. Uses default bind DN and password to connect to the LDAP server. ```bash $ dcmldap -c STORESCP@storescp:11112 ``` -------------------------------- ### Example 4: jpg2dcm video.mp4 videoMP4.dcm Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-jpg2dcm/README.md Encapsulates an MP4 video into a DICOM Video Object. ```bash jpg2dcm video.mp4 videoMP4.dcm ``` -------------------------------- ### Example 3: jpg2dcm video.mpeg video.dcm Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-jpg2dcm/README.md Encapsulates an MPEG2 video into a DICOM Video Object. ```bash jpg2dcm video.mpeg video.dcm ``` -------------------------------- ### Start TLS/TCP Syslog receiver on port 6514 Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-syslogd/README.md Starts the Syslog daemon with TLS enabled and listening on TCP port 6514. The command is `syslogd --tls -b 6514`. ```bash syslogd --tls -b 6514 ``` -------------------------------- ### Example 5: jpg2dcm img1.jpeg video1.mp4 dicom-dir Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-jpg2dcm/README.md Encapsulates the specified image and video files into DICOM objects in the output directory. ```bash jpg2dcm img1.jpeg video1.mp4 dicom-dir ``` -------------------------------- ### Run stgcmtscu with -b and -c options Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-stgcmtscu/README.md Starts a Storage Commitment Service Class User (SCU) that listens on port 11114 with AE title STGCMTSCU for receiving Storage Commitment Results, then sends a Storage Commitment Request for SOP Instances in the directory path/to/study to the Storage Service Class Provider DCMQRSCP on localhost:11112. ```bash stgcmtscu -b STGCMTSCU:11114 -c DCMQRSCP@localhost:11112 path/to/study ``` -------------------------------- ### movescu retrieve study example Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-movescu/README.md Retrieves a study from a Query/Retrieve Service Class Provider (DCMQRSCP) listening on local port 11112 and sends it to the Storage Service Class Provider (STORESCP). The study is identified by its Study Instance UID (1.2.3.4). ```bash movescu -c DCMQRSCP@localhost:11112 -m StudyInstanceUID=1.2.3.4 --dest STORESCP ``` -------------------------------- ### agfa2sr command example with options Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-agfa2sr/README.md Example command that converts Agfa Reports from file 'agfa_reports' to DICOM SR Documents, encoding with Latin alphabet No.1 and setting Manufacturer (0008,0070) to 'AGFA', storing into the working directory. ```bash => agfa2sr -s '00080005=ISO_IR 100' -s 'Manufacturer=AGFA' -- agfa_reports ``` -------------------------------- ### QIP data type format examples Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-hl7pdq/README.md Lists the valid formats for the parameter, which must be formatted as HL7 QIP data type with @PID...^. ```text @PID.3.1^ @PID.3.4.1^ @PID.3.4.2^ @PID.3.4.3^ @PID.5.1.1^ @PID.5.2^ @PID.6.1.1^ @PID.6.2^ @PID.7.1^ @PID.8^ @PID.11.1.1^ @PID.11.1.3^ @PID.11.1.5^ @PID.13.1^ @PID.18.1^ @PID.18.4.1^ @PID.18.4.2^ @PID.18.4.3^ ``` -------------------------------- ### dcmldap example: add Network AE to existing Device with TLS Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-dcmldap/README.md Command to add Network AE 'STORESCP_TLS' on Network Connection 'dicom-tls' requiring TLS, listening on host 'localhost' at port '2762', providing to existing Device 'storescp'. Uses default bind DN and password. ```bash $ dcmldap -a STORESCP_TLS@localhost:2762 --tls --dev=storescp ``` -------------------------------- ### Example 1: jpg2dcm -f metadata.xml image.jpg image.dcm Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-jpg2dcm/README.md Encapsulates a JPEG image verbatim with DICOM attributes from metadata.xml into a DICOM Image Object. ```bash jpg2dcm -f metadata.xml image.jpg image.dcm ``` -------------------------------- ### dcm2pdf Example 7: Convert multiple PDF DICOMs to directory Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-dcm2pdf/README.md Converts multiple encapsulated PDF DICOM objects to PDF files in a specified output directory. ```text dcm2pdf object1.dcm object2.dcm pdf-dir ``` -------------------------------- ### Example 6: jpg2dcm image-dir mp4-dir mpeg2-dir dicom-object-dir Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-jpg2dcm/README.md Encapsulates images and videos from specified directories into DICOM objects in the output directory. ```bash jpg2dcm image-dir mp4-dir mpeg2-dir dicom-object-dir ``` -------------------------------- ### dcm2pdf Example 8: Convert DICOM directory to PDF directory Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-dcm2pdf/README.md Converts all encapsulated PDF DICOM objects in a directory to PDF files in an output directory. ```text dcm2pdf dicom-object-dir pdf-dir ``` -------------------------------- ### upsscu -O get with push SOP class Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-upsscu/README.md Sends a UPS N-GET RQ to the UPS SCP at UPSSCP@localhost:11112 with UPS Instance UID and Negotiating SOP Class UID as Unified Procedure Step Push Sop Class. ```bash upsscu -c UPSSCP@localhost:11112 -O get -u 1.2.3.4.5.6.7.8 ``` -------------------------------- ### dcm2json example: extract bulkdata to directory Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-dcm2json/README.md Reads DICOM from standard input and writes JSON to standard output, extracting pixel data to files in /tmp/pixeldata/ with names like blk#####.tmp. ```bash $ dcm2json --blk-file-dir=/tmp/pixeldata/ - < image.dcm ``` -------------------------------- ### hl7pdq command examples for patient demographics queries Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-hl7pdq/README.md Two command-line invocations of the hl7pdq tool. The first queries a Patient Demographics Supplier for a patient with a specific Patient ID and Assigning Authority. The second queries for patients with a matching family name and sex, restricted to a domain. ```shell hl7pdq -c XREF^XYZ@localhost:2575 @PID.3.1^XYZ10515W @PID.3.4.1^XREF2005 ``` ```shell hl7pdq -c XREF^XYZ@localhost:2575 @PID.5.1.1^SMITH @PID.8^F ^^^XREF2005 ``` -------------------------------- ### dcm2pdf options help and version Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-dcm2pdf/README.md Lists the command-line options -h and -V for displaying help and version information. ```text -h,--help display this help and exit -V,--version output version information and exit ``` -------------------------------- ### hl7pdq command-line options Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-hl7pdq/README.md Lists all available command-line options for hl7pdq, including their syntax, defaults, and behaviors. ```text Options: -b,--bind specify Sending Application and Facility and local address used to connect to the remote application; use hl7pdq^dcm4che and pick up any valid local address to bind the socket by default. -c,--connect specify Receiving Application and Facility, remote address and port of the HL7 Receiver acting as Patient Demographics Supplier. --charset HL7 Character Set used to encode the message, ASCII by default --connect-timeout timeout in ms for TCP connect, no timeout by default -h,--help display this help and exit --key-pass password for accessing the key in the key store, key store password by default --key-store file path or URL of key store containing the private key, resource:key.p12 by default --key-store-pass password for key store containing the private key, 'secret' by default --key-store-type type of key store containing the private key, PKCS12 by default --mllp2 use MLLP Release 2 with Commit Acknowledgement Block --proxy <[user:password@]host:port> specify host and port of the HTTP Proxy to tunnel the HL7 connection. --response-timeout timeout in ms for receiving other outstanding DIMSE RSPs than C-MOVE or C-GET RSPs, no timeout by default --sorcv-buffer set SO_RCVBUF socket option to specified value --sosnd-buffer set SO_SNDBUF socket option to specified value --ssl2Hello send/accept SSLv3/TLS ClientHellos encapsulated in a SSLv2 ClientHello packet; equivalent to --tls-protocol SSLv2Hello --tls-protocol SSLv3 --tls-protocol TLSv1 --tls-protocol TLSv1.1 --tls-protocol TLSv1.2 --ssl3 enable only TLS/SSL protocol SSLv3; equivalent to --tls-protocol SSLv3 --tcp-delay set TCP_NODELAY socket option to false, true by default ``` -------------------------------- ### Get job status with qstar Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-qstar/README.md Gets the overall status of the retrieve job with jobId 42. ```bash qstar -u user:secret --url http://127.0.0.1:18083 --job 42 ``` -------------------------------- ### storescu command-line options Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-storescu/README.md Lists the command-line options for storescu, including TLS protocol, temporary file handling, trust store configuration, UID suffix, user identity negotiation, and version output. Each option has a short description and default values where applicable. ```text --tls13 enable only TLS/SSL protocol TLSv1.3; equivalent to --tls-protocol TLSv1.3 --tmp-file-dir directory were temporary file with File Meta Information from scanned files is stored; if not specified, the file is stored into the default temporary-file directory --tmp-file-prefix prefix for generated file name for temporary file; 'storescu-' by default --tmp-file-suffix suffix for generated file name for temporary file; '.tmp' by default --trust-store file path of key store containing trusted certificates, resource:cacerts.p12 by default --trust-store-pass password for key store with trusted certificates, 'secret' by default --trust-store-type type of key store with trusted certificates, PKCS12 by default --uid-suffix specify suffix to be appended to the Study, Series and SOP Instance UID of the sent object(s). --user negotiate user identity with specified user name --user-jwt negotiate user identity with specified JSON Web Token --user-pass negotiate user identity with specified password --user-rsp negotiate user identity with positive response requested --user-saml negotiate user identity with specified SAML Assertion -V,--version output version information and exit ``` -------------------------------- ### Get file retrieve status for a job Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-qstar/README.md Gets retrieve status for the specified files retrieved by job with jobId 42. ```bash qstar -u user:secret --url http://127.0.0.1:18083 --job 42 /path/to/file1 /path/to/file2 ``` -------------------------------- ### planarconfig command-line usage Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-planarconfig/README.md Shows the general usage syntax for the planarconfig utility, including the optional flags and the file or directory arguments. ```text usage: planarconfig [-v] [--uids] [--3x3 MIN MAX] [--fix[0|1]] |... ``` -------------------------------- ### modality options list Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-ihe/dcm4che-tool-ihe-modality/README.md Lists all command-line options for the modality tool, including bind, connect, timeout, VR, key store, and MPPS-related options with their defaults and constraints. ```text Options: --accept-timeout timeout in ms for receiving A-ASSOCIATE-AC, no timeout by default -b,--bind specify AE Title, local address of the Application Entity provided by this application; use IOCMTEST and pick up any valid local address to bind the socket by default. If also a port is specified, the Application Entity will listening for incoming association requests on it. --big-endian propose all uncompressed TS, explicit VR big endian first (default: implicit VR little endian first) -c,--connect specify AE Title, remote address and port of the remote Application Entity. --code-config file path or URL of list of configured Discontinuation Reasons Codes to be used instead of etc/modality/koscode.properties --connect-timeout timeout in ms for TCP connect, no timeout by default --dc send MPPS N-SET RQ with status DISCONTINUED instead of COMPLETED --dc-reason include Discontinuation Reason Code in MPPS N-SET RQ with status DISCONTINUED - must be one of the values specified by etc/modality/mppscode.properties or --code-config --explicit-vr propose all uncompressed TS, explicit VR little endian first (default: implicit VR little endian first) -h,--help display this help and exit --idle-timeout timeout in ms for aborting idle Associations, no timeout by default --implicit-vr propose only implicit VR little endian (default: all uncompressed TS) --key-pass password for accessing the key in the key store, key store password by default --key-store file path or URL of key store containing the private key, resource:key.p12 by default --key-store-pass password for key store containing the private key, 'secret' by default --key-store-type type of key store containing the private key, PKCS12 by default ``` -------------------------------- ### hl7rcv command-line options Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-hl7rcv/README.md Lists all command-line options for hl7rcv, including bind address, charset, directory, timeouts, TLS settings, and key store configuration. Defaults are noted for many options, such as ASCII charset, '.' directory, and 'secret' key store password. ```text Options: -b,--bind <[ip:]port> specify the port on which the HL7 Receiver shall listening for connection requests. If no local IP address of the network interface is specified, connections on any/all local addresses are accepted. --charset HL7 Character Set used to decode message if not specified by MSH-18, ASCII by default --directory directory to which received HL7 V2 messages are stored, using its Message Type as sub-directory name and its Message Control ID or a random uuid as file name. '.' by default -h,--help display this help and exit --idle-timeout timeout in ms for receiving HL7 messages, no timeout by default --ignore do not store received HL7 V2 messages in files --key-pass password for accessing the key in the key store, key store password by default --key-store file path or URL of key store containing the private key, resource:key.p12 by default --key-store-pass password for key store containing the private key, 'secret' by default --key-store-type type of key store containing the private key, PKCS12 by default --mllp2 use MLLP Release 2 with Commit Acknowledgement Block --response-delay delay in ms returning response message. No delay by default. --sorcv-buffer set SO_RCVBUF socket option to specified value --sosnd-buffer set SO_SNDBUF socket option to specified value --ssl2Hello send/accept SSLv3/TLS ClientHellos encapsulated in a SSLv2 ClientHello packet; equivalent to --tls-protocol SSLv2Hello --tls-protocol SSLv3 --tls-protocol TLSv1 --tls-protocol TLSv1.1 --tls-protocol TLSv1.2 --ssl3 enable only TLS/SSL protocol SSLv3; equivalent to --tls-protocol SSLv3 --tcp-delay set TCP_NODELAY socket option to false, true by default --tls enable TLS connection without encryption or with AES or 3DES encryption; equivalent to --tls-cipher SSL_RSA_WITH_NULL_SHA --tls-cipher TLS_RSA_WITH_AES_128_CBC_SHA --tls-cipher SSL_RSA_WITH_3DES_EDE_CBC_SHA --tls-3des enable TLS connection with 3DES encryption; equivalent to --tls-cipher SSL_RSA_WITH_3DES_EDE_CBC_SHA --tls-aes enable TLS connection with AES or 3DES encryption; equivalent to --tls-cipher TLS_RSA_WITH_AES_128_CBC_SHA --tls-cipher SSL_RSA_WITH_3DES_EDE_CBC_SHA --tls-cipher enable TLS connection with specified Cipher Suite. Multiple Cipher Suites may be enabled by multiple --tls-cipher options --tls-eia-https enable server endpoint identification according RFC 2818: HTTP Over TLS ``` -------------------------------- ### Start MPPS SCP server on port 11112 Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-mppsscp/README.md Starts the MPPS SCP server listening on port 11112 with called AE title MPPSSCP. Received MPPS objects are stored in the working directory. ```bash mppsscp -b MPPSSCP:11112 ``` -------------------------------- ### Build with Maven Wrapper Source: https://github.com/dcm4che/dcm4che/blob/master/README.md Build the project using the Maven Wrapper. Requires Java 17 (JDK) or newer. The first command is for Unix-like systems (Linux/macOS), the second for Windows. ```bash ./mvnw install ``` ```bash .\mvnw install ``` -------------------------------- ### dcm2dcm options list Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-dcm2dcm/README.md Lists all command-line options for dcm2dcm, including compression parameters, transfer syntax selection, and encoding controls. ```bash Options: -C specify additional compression parameter --decoding-speed decoding speed (0-4) of JPEG XL compression --effort compression effort level (1-9) of JPEG XL compression --expl-item-len encode sequence items with explicit length; at default, non-empty sequence items are encoded with undefined length --expl-seq-len encode sequences with explicit length; at default, non-empty sequences are encoded with undefined length -F,--no-fmi transcode sources to Implicit VR Little Endian and store it without File Meta Information -f,--retain-fmi retain File Meta Information from source files if available. At default the File Meta Information is replaced by one referencing dcm4che-3.x --group-len include (gggg,0000) Group Length attributes; at default, optional Group Length attributes are excluded -h,--help display this help and exit --j2ki compress JPEG 2000 Lossy; equivalent to -t 1.2.840.10008.1.2.4.91 --j2kr compress JPEG 2000 Lossless; equivalent to -t 1.2.840.10008.1.2.4.90 --jlsl compress JPEG LS Lossless; equivalent to -t 1.2.840.10008.1.2.4.80 --jlsn compress JPEG LS Lossy (Near-Lossless); equivalent to -t 1.2.840.10008.1.2.4.81 --jpeg compress JPEG Lossy; equivalent to -t 1.2.840.10008.1.2.4.50 or .51 --jpll compress JPEG Lossless; equivalent to -t 1.2.840.10008.1.2.4.70 --jxll compress JPEG XL Lossless; equivalent to -t 1.2.840.10008.1.2.4.110 --jxly compress JPEG XL Lossy; equivalent to -t 1.2.840.10008.1.2.4.112 --max-threads use up to threads for compression/decompression; the default is 1 -N Near-Lossless parameter of JPEG LS Lossy compression -q compression quality (0.0-1.0) of JPEG Lossy compression -Q compression factor (5-100) of JPEG 2000 Lossy compression -t,--transfer-syntax transcode sources to specified Transfer Syntax. At default use Explicit VR Little Endian --undef-item-len encode all sequence items with undefined length; at default, only non-empty sequence items are encoded with undefined length --undef-seq-len encode all sequences with undefined length; at default, only non-empty sequences are encoded with undefined length -V,--version output version information and exit --verify verify compression if decompressed pixel values does not differ from original pixel values more than --verify-block verify compression by comparing average pixel values of specified block size; 1 by default ``` -------------------------------- ### mkkos example: create KOS with title DCM-113000 Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-mkkos/README.md Example command that creates a DICOM KOS with Document Title (113000, DCM, "Of Interest") flagging Composite objects in the directory path/to/study and stores it into kos.dcm. ```text mkkos --title DCM-113000 -o kos.dcm path/to/study ``` -------------------------------- ### json2index usage and options Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-json2index/README.md Shows the command-line usage and available options for json2index. The utility requires a schema directory argument and supports -h/--help and -V/--version flags. ```text usage: json2index Utility to create search index for UI configuration from JSON schema files - Options: -h,--help display this help and exit -V,--version output version information and exit - ``` -------------------------------- ### hl7pdq usage syntax Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-hl7pdq/README.md Shows the command-line usage pattern for hl7pdq, including the required -c option and optional query parameters and domains. ```text usage: hl7pdq [options] -c ^@: [..] [..] ``` -------------------------------- ### deidentify example with retain-uid and dummy values Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-deidentify/README.md Example command that de-identifies in.dcm to out.dcm while retaining UIDs and setting Patient Name and Patient ID to specified dummy values. The -s option accepts attribute keyword or tag value. ```bash $ deidentify --retain-uid -sPatientName=ANONYMIZED -sPatientID=0815 -- in.dcm out.dcm ``` -------------------------------- ### mkkos command usage Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-mkkos/README.md Shows the general usage syntax for the mkkos tool, including required and optional arguments. ```text usage: mkkos [options] --title -o [..][..] ``` -------------------------------- ### json2rst usage and example Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-json2rst/README.md Command-line usage and options for the json2rst utility, which generates ReStructuredText files from Archive configuration schema JSON files. The argument sets table column widths, defaulting to |p{4cm}|l|p{8cm}|. The example shows converting exportRule.schema.json to exportRule.rst with custom column widths. ```text usage: json2rst [] The json2rst utility generates ReStructuredText files from Archive configuration schema JSON files used for documentation of Archive configuration attributes in the DICOM Conformance Statement. The sets the width of table columns in the generated rst files, with default being as |p{4cm}|l|p{8cm}| - Options: -h,--help display this help and exit -V,--version output version information and exit - Example: json2rst /work/dcm4chee-arc-lang/src/main/webapp/assets/schema/exportRule.schema.js on /work/dcm4chee-arc-cs/docs/networking/config "|p{6cm}|l|p{10cm}|" => Convert configuration fields and their descriptions specified in exportRule.schema.json file to its corresponding exportRule.rst file created in the specified output directory, with specified column widths for the table rendered in exportRule.html (on building html pages from rst files) ``` -------------------------------- ### xml2dcm usage and options Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-xml2dcm/README.md Shows the full command-line usage and all available options for xml2dcm, including flags for bulk data handling, encoding, and file meta information. ```text usage: xml2dcm [] [-i ] -x [-o ] Convert (or the standard input if = '-') into a DICOM stream written to -o or standard output if no -o option is specified. Optionally load DICOM file specified by -i and merge attributes parsed from with it. - Options: -B,--no-bulkdata do not read bulkdata from -i -b,--alloc-bulkdata load bulkdata from -i into memory; at default, bulkdata from -i is streamed to -o and not hold in memory --blk <[seq.]attr> specify attribute by keyword or tag value (in hex) which shall be treated as bulkdata, e.g. --blk=IconImageSequence.PixelData or --blk=00880200.7FE00010. Multiple attributes can be specified by repeating the option for each attribute. --blk-file-prefix prefix for generating file names for extracted bulkdata; 'blk' by default --blk-file-suffix suffix for generating file names for extracted bulkdata; '.tmp' by default --blk-nodefs do NOT treat attributes listed by DICOM Composite Instance Retrieve Without Bulk Data Service Class as bulkdata, but only consider bulkdata attributes explicitly specified by --blk <[seq/]attr> and --blk-vr . --blk-vr specify threshold for the value length for attributes with particular VRs which shall be treated as bulkdata, e.g.: --blk-vr LT,OB,OD,OF,OL,OW,UC,UN,UT=1024 - treat all attributes with VR = LT or OB or OD or OF or OL or OW or UC or UN or UT which value length exceeds 1024 bytes as bulkdata. -c,--cat-blk-files concatenate extracted bulkdata into one file -d,--blk-file-dir directory were files with extracted bulkdata are stored if the DICOM stream to be merged is read from standard input; if not specified, files are stored into the default temporary-file directory --expl-item-len encode sequence items with explicit length; at default, non-empty sequence items are encoded with undefined length --expl-seq-len encode sequences with explicit length; at default, non-empty sequences are encoded with undefined length -F,--no-fmi store result always without File Meta Information. At default, the result is stored with File Meta Information if the XML file or the input DICOM file specified by -i contains a File Meta Information -f,--fmi store result always as DICOM Part 10 File with File Meta Information. At default, the result is only stored with File Meta Information if the XML file or the input DICOM file specified by -i contains a File Meta Information --group-len include (gggg,0000) Group Length attributes; at default, optional Group Length attributes are excluded -h,--help display this help and exit -i load DICOM file to be merged with attributes parsed from -x ; set = '-' to read DICOM stream from standard input --keep-blk-files do not delete extracted bulkdata after it was written into the generated DICOM stream. --lenient silently ignore attributes from XML file ``` -------------------------------- ### dcm2xml example: convert image.dcm Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-dcm2xml/README.md Converts the DICOM file image.dcm to XML, including only a reference to the pixel data. ```bash $ dcm2xml image.dcm ``` -------------------------------- ### qstar -u --url [options] [..] Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-qstar/README.md Main command-line interface for the QStar SOAP client. Supports authentication, file information retrieval, prefetch/retrieve, purge, and job status operations. ```APIDOC ## [CLI] qstar ### Description Command-line interface for the QStar SOAP client to prefetch, retrieve, purge, or fetch file information of specified files. ### Usage ``` qstar -u --url [options] [..] ``` ### Options - `-D, --target-dir ` - Directory to which retrieved files are stored. - `-h, --help` - Display this help and exit. - `-j, --job ` - Get retrieve status of specified files retrieved by job with specified jobId. If no file-path is specified, get the overall status of the retrieve job with specified jobId. Cannot be used with option --retrieve. - `-p, --progress ` - Continue fetching the retrieve status of specified files in specified interval after invoking the retrieve request until the retrieve job is completed. If no interval is specified, fetch status continuously without delay. - `-P, --purge` - Purge specified files from the QStar cache. - `-r, --retrieve ` - Retrieve specified files with specified priority (1 - LOW, 2 - NORMAL, 3 - HIGH). If no target directory is specified, the files will be prefetched to the QStar cache and no file will be created in the filesystem. - `-s, --sort` - Sort specified list of files for retrieve by its position on the media. - `-u, --user ` - User name and password to use for server authentication. - `-U, --url ` - Request URL. - `-V, --version` - Output version information and exit. ### Examples #### Verify authentication ``` qstar -u user:secret --url http://127.0.0.1:18083 ``` #### Get file information ``` qstar -u user:secret --url http://127.0.0.1:18083 /path/to/file ``` #### Prefetch files with low priority and progress ``` qstar -u user:secret --url http://127.0.0.1:18083 --retrieve 1 -p 100 /path/to/file1 /path/to/file2 ``` #### Retrieve files with high priority to target directory ``` qstar -u user:secret --url http://127.0.0.1:18083 --retrieve 3 --target-dir /path/to/dir /path/to/file1 /path/to/file2 ``` #### Get job status ``` qstar -u user:secret --url http://127.0.0.1:18083 --job 42 ``` #### Get retrieve status of files for a job ``` qstar -u user:secret --url http://127.0.0.1:18083 --job 42 /path/to/file1 /path/to/file2 ``` #### Purge file from cache ``` qstar -u user:secret --url http://127.0.0.1:18083 --purge /path/to/file ``` ``` -------------------------------- ### dcm2json example: convert image.dcm Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-dcm2json/README.md Converts a DICOM file to JSON on standard output, including only a reference to the pixel data. ```bash $ dcm2json image.dcm ``` -------------------------------- ### syslog command usage Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-syslog/README.md Shows the command-line usage and all available options for the syslog tool. Use this to understand how to invoke the tool and configure its behavior. ```text usage: syslog [options] -c : [..] Send content of specified files as RFC 5424 Syslog messages via TCP/TLS or UDP to a Syslog Receiver listening on specified host and port. Specify '-' as to read the message from standard input - Options: --app-name specify APPNAME in emitted Syslog messages. 'syslog' by default. -b,--bind specify local address used to connect to the remote application; pick up any valid local address to bind the socket by default. -c,--connect specify remote address and port of the Syslog Receiver. --connect-timeout timeout in ms for TCP connect, no timeout by default --delay specify delay time in ms between sent messages --facility specify facility name of the emitted syslog messages. Valid facility names are: kern, user, mail, daemon, auth, syslog, lpr, news, uucp, cron, authpriv, ftp, ntp, audit, console, cron2, local0 to local7. The default is authpriv. -h,--help display this help and exit --idle-timeout specify time in ms, after TCP connection is closed between sent messages. Only effective if a larger delay time between sent messages is specified by option --delay. --key-pass password for accessing the key in the key store, key store password by default --key-store file path or URL of key store containing the private key, resource:key.p12 by default --key-store-pass password for key store containing the private key, 'secret' by default --key-store-type type of key store containing the private key, PKCS12 by default --level specify level name of the emitted Syslog messages. Valid level names are: emerg, alert, crit, err, warning, notice, info, debug. The default is notice. --msg-id Specify MSGID in emitted Syslog messages. 'DICOM+RFC3881' by default. --no-bom do not prefix message content by BOM. --proxy <[user:password@]host:port> specify host and port of the HTTP Proxy to tunnel the TCP connection. --retry specify retry interval in s to re-sent messages which could not delivered to the syslog receiver; no retry by default. --sorcv-buffer set SO_RCVBUF socket option to specified value --sosnd-buffer set SO_SNDBUF socket option to specified value --spool-dir directory to spool messages which could not delivered to the syslog receiver. Use system temporary directory by default. --ssl2Hello send/accept SSLv3/TLS ClientHellos encapsulated in a SSLv2 ClientHello packet; ``` -------------------------------- ### dcm2pdf Example 6: Convert OBJ DICOM to OBJ Source: https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-dcm2pdf/README.md Converts an encapsulated OBJ DICOM object to an OBJ file. ```text dcm2pdf obj-object.dcm obj-file.obj ```