findscu(1)

okay bestie, welcome to findscu(1) from OFFIS DCMTK πŸ’–

🌸 NAME

findscu β€” DICOM query (C-FIND) SCU. That's the whole vibe: it's the querying side of the DICOM conversation, and it's here to send C-FIND keys and collect the receipts. 🫢

✨ SYNOPSIS

findscu [options] peer port [dcmfile-in...]

πŸ’– DESCRIPTION

Okay so findscu is an SCU for the Query/Retrieve Service Class and the Basic Worklist Management Service Class. It only supports query functionality using the C-FIND message β€” no cap, that's its whole lane. It sends query keys to an SCP and awaits responses. You can use this application to test SCPs of the Query/Retrieve and Basic Worklist Management Service Classes. πŸ’…

πŸŽ€ PARAMETERS

  • peer β€” hostname of DICOM peer.
  • port β€” tcp/ip port number of peer.
  • dcmfile-in β€” DICOM query file(s).

πŸ’… OPTIONS

bestie, there are a LOT of options β€” here's every single one, grouped exactly how the page groups them. ✨

🧸 general options

  • -h, --help β€” print this help text and exit. πŸ†˜
  • --version β€” print version information and exit.
  • --arguments β€” print expanded command line arguments.
  • -q, --quiet β€” quiet mode, print no warnings and errors. Shhh 🀫
  • -v, --verbose β€” verbose mode, print processing details. Tell me everything πŸ‘€
  • -d, --debug β€” debug mode, print debug information. Full detective mode πŸ”
  • -ll, --log-level [l]evel: string constant β€” use level l for the logger. The values are (fatal, error, warn, info, debug, trace).
  • -lc, --log-config [f]ilename: string β€” use config file f for the logger.

🌐 network options

πŸ”‘ override matching keys:

  • -k, --key [k]ey: gggg,eeee="str", path or dictionary name="str" β€” override matching key.

πŸ—‚οΈ query information model:

  • -W, --worklist β€” use modality worklist information model (default).
  • -P, --patient β€” use patient root information model.
  • -S, --study β€” use study root information model.
  • -O, --psonly β€” use patient/study only information model.

πŸ“‘ IP protocol version:

  • -i4, --ipv4 β€” use IPv4 only (default).
  • -i6, --ipv6 β€” use IPv6 only.
  • -i0, --ip-auto β€” use DNS lookup to determine IP protocol.

🏷️ application entity titles:

  • -aet, --aetitle [a]etitle: string β€” set my calling AE title (default: FINDSCU).
  • -aec, --call [a]etitle: string β€” set called AE title of peer (default: ANY-SCP).

🧬 post-1993 value representations:

  • +u, --enable-new-vr β€” enable support for new VRs (UN/UT) (default).
  • -u, --disable-new-vr β€” disable support for new VRs, convert to OB.

πŸ”„ proposed transmission transfer syntaxes:

  • -x=, --propose-uncompr β€” propose all uncompressed TS, explicit VR with local byte ordering first (default).
  • -xe, --propose-little β€” propose all uncompressed TS, explicit VR little endian first.
  • -xb, --propose-big β€” propose all uncompressed TS, explicit VR big endian first.
  • -xd, --propose-deflated β€” propose deflated explicit VR little endian TS and all uncompressed transfer syntaxes.
  • -xi, --propose-implicit β€” propose implicit VR little endian TS only.

πŸ—œοΈ deflate compression level (only with --propose-deflated):

  • +cl, --compression-level [l]evel: integer (default: 6) β€” 0=uncompressed, 1=fastest, 9=best compression.

πŸ›°οΈ other network options:

  • -to, --timeout [s]econds: integer (default: unlimited) β€” timeout for connection requests.
  • -ts, --socket-timeout [s]econds: integer (default: 60) β€” timeout for network socket (0 for none).
  • -ta, --acse-timeout [s]econds: integer (default: 30) β€” timeout for ACSE messages.
  • -td, --dimse-timeout [s]econds: integer (default: unlimited) β€” timeout for DIMSE messages.
  • -pdu, --max-pdu [n]umber of bytes: integer (4096..131072) β€” set max receive pdu to n bytes (default: 16384).
  • --repeat [n]umber: integer β€” repeat n times.
  • --abort β€” abort association instead of releasing it.
  • --cancel [n]umber: integer β€” cancel after n responses (default: never).

πŸ” transport layer security (TLS) options

🧡 transport protocol stack:

  • -tls, --disable-tls β€” use normal TCP/IP connection (default).
  • +tls, --enable-tls [p]rivate key file, [c]ertificate file: string β€” use authenticated secure TLS connection.
  • +tla, --anonymous-tls β€” use secure TLS connection without certificate.

πŸ”‘ private key password (only with --enable-tls):

  • +ps, --std-passwd β€” prompt user to type password on stdin (default).
  • +pw, --use-passwd [p]assword: string β€” use specified password.
  • -pw, --null-passwd β€” use empty string as password.

πŸ“„ key and certificate file format:

  • -pem, --pem-keys β€” read keys and certificates as PEM file (default).
  • -der, --der-keys β€” read keys and certificates as DER file.

πŸ›οΈ certification authority:

  • +cf, --add-cert-file [f]ilename: string β€” add certificate file to list of certificates.
  • +cd, --add-cert-dir [d]irectory: string β€” add certificates in d to list of certificates.
  • +crl, --add-crl-file [f]ilename: string β€” add certificate revocation list file (implies --enable-crl-vfy).
  • +crv, --enable-crl-vfy β€” enable leaf CRL verification.
  • +cra, --enable-crl-all β€” enable full chain CRL verification.

πŸ›‘οΈ security profile:

  • +ph, --list-profiles β€” list supported TLS profiles and exit.
  • +pg, --profile-8996 β€” BCP 195 RFC 8996 TLS Profile (default).
  • +pm, --profile-8996-mod β€” Modified BCP 195 RFC 8996 TLS Profile (only available if underlying TLS library supports all TLS features required for this profile).
  • +py, --profile-bcp195-nd β€” Non-downgrading BCP 195 TLS Profile (retired).
  • +px, --profile-bcp195 β€” BCP 195 TLS Profile (retired).
  • +pz, --profile-bcp195-ex β€” Extended BCP 195 TLS Profile (retired).
  • +pb, --profile-basic β€” Basic TLS Secure Transport Connection Profile (retired) (only available if underlying TLS library supports 3DES).
  • +pa, --profile-aes β€” AES TLS Secure Transport Connection Profile (retired).
  • +pn, --profile-null β€” Authenticated unencrypted communication (retired, was used in IHE ATNA).

πŸ”’ ciphersuite:

  • +cc, --list-ciphers β€” list supported TLS ciphersuites and exit.
  • +cs, --cipher [c]iphersuite name: string β€” add ciphersuite to list of negotiated suites.

🏷️ server name indication:

  • --no-sni β€” do not use SNI (default).
  • --request-sni [s]erver name: string β€” request server name s.

🎲 pseudo random generator:

  • +rs, --seed [f]ilename: string β€” seed random generator with contents of f.
  • +ws, --write-seed β€” write back modified seed (only with --seed).
  • +wf, --write-seed-file [f]ilename: string (only with --seed) β€” write modified seed to file f.

🀝 peer authentication:

  • -rc, --require-peer-cert β€” verify peer certificate, fail if absent (default).
  • -ic, --ignore-peer-cert β€” don't verify peer certificate.

🎁 output options

πŸ—ƒοΈ general:

  • -od, --output-directory [d]irectory: string (default: ".") β€” write output files to existing directory d.

🩹 automatic data correction:

  • +dc, --enable-correction β€” enable automatic data correction.
  • -dc, --disable-correction β€” disable automatic data correction (default).

πŸ“¨ C-FIND responses:

  • +sr, --show-responses β€” always output responses to the logger.
  • -sr, --hide-responses β€” do not output responses to the logger.
  • -X, --extract β€” extract responses to DICOM file (rsp0001.dcm...).
  • -Xx, --extract-xml β€” extract responses to XML file (rsp0001.xml...).
  • -Xs, --extract-xml-single [f]ilename: string β€” extract all responses to given XML file f.
  • -Xlo, --limit-output [n]umber: integer β€” limit number of responses extracted to file to n (default: unlimited).

🌸 NOTES 🌸

okay so here's the tea, bestie β˜• β€” every single file you drop on the command line gets sent to the SCP as part of a C-FIND request. Like, that's its whole job. The query file has to be a valid DICOM data set containing the dataset part of a C-FIND-RQ message. You could, for instance, make that query file with the dump2dcm utility from a lil script like this one:

# query patient names and IDs
(0008,0052) CS [PATIENT]     # QueryRetrieveLevel
(0010,0010) PN []            # PatientName
(0010,0020) LO []            # PatientID

Individual attributes of each file you send can be modified or supplemented using the -k option. So like, this command:

findscu -P -k "(0010,0010)=HEWETT*" caesar 5678 patqry.dcm

will β€” when it's sent to the SCP caesar at TCP/IP port 5678 β€” cause any PatientName attribute in patqry.dcm to have the value "HEWETT*". If that attribute is already there, it gets replaced. If it's not there, it gets inserted. slay πŸ’… The -k option can show up more than once, no cap. And the value part (everything after the =) may be absent, which makes the attribute get sent with zero length.

So, in earlier versions of findscu, the tag keys were specified without braces around the group and element number, e.g. "0010,0010" instead of "(0010,0010)". Switching to the new syntax is recommended, but just so you know β€” the old syntax still works. lowkey iconic of it 🫢

Also -k accepts dictionary names instead of element tags for specifying DICOM elements. So the findscu call above then reads like this:

findscu -P -k PatientName="HEWETT*" caesar 5678 patqry.dcm

It's also possible to specify sequences, items and nested attributes using the -k option. In those cases you have to use a special "path" notation, like:

findscu -W -k "(0040,0100)[0].Modality=CT" caesar 5678

This call queries a worklist server at host caesar for any planned procedures for CT modalities by specifying tag (0040,0100) "Scheduled Procedure Step Sequence" and an attribute "Modality" in the first item of this sequence with value "CT". The details on this path notation live in the documentation of dcmodify. iykyk ✨

If no file is specified on the command line, the query has to be specified completely with one or more -k options. And if you provide multiple query files, findscu will send multiple C-FIND requests to the SCP. busy girl behavior πŸ’…

Each set of response identifiers it receives gets output to the logger β€” unless option --hide-responses, any of the below --extract variants, --quiet or an appropriate logger configuration is used. In those cases, you can force the output to the logger with option --show-responses. main character energy.

In addition, the response datasets can also be extracted as individual DICOM files (using option --extract) or XML files (using option --extract-xml). The output format of the latter is described by the file dcm2xml.dtd (starting with the top-level element "data-set"). For XML files, the Specific Character Set is mapped automatically to an appropriate XML encoding. If that's not possible β€” e.g. in the case of ISO 2022 character sets β€” non-ASCII characters and those below #32 are stored as "&#nnn;" where "nnn" refers to the numeric character code. Please note that this might lead to invalid character entity references (such as "" for ESC) and will cause most XML parsers to reject the document. 😭 so watch out for that one.

Alternatively, all response datasets of an association can be extracted to a single XML file using option --extract-xml-single. The top-level element of the XML document is "responses" (with a "type" attribute of "C-FIND"). The individual datasets are stored as described above. If support for character set conversion is enabled, UTF-8 encoding is used, i.e. all datasets are converted to UTF-8 encoding (which is strongly recommended in order to avoid issues with non-ASCII characters when different character sets are used). do it for the vibes, honestly πŸ¦‹

πŸ’« DICOM Conformance πŸ’«

The findscu application supports the following SOP Classes as an SCU:

FINDPatientRootQueryRetrieveInformationModel       1.2.840.10008.5.1.4.1.2.1.1
FINDStudyRootQueryRetrieveInformationModel         1.2.840.10008.5.1.4.1.2.2.1
FINDPatientStudyOnlyQueryRetrieveInformationModel  1.2.840.10008.5.1.4.1.2.3.1
FINDModalityWorklistInformationModel               1.2.840.10008.4.31

Wait β€” nope, hold up, that last one is 1.2.840.10008.5.1.4.31, my bad, keep it exact bestie:

FINDModalityWorklistInformationModel               1.2.840.10008.5.1.4.31

The findscu application will propose presentation contexts for one of the abovementioned supported SOP Classes depending on command line options (-P, -S, -O or -W). Basically, the following transfer syntaxes are supported:

LittleEndianImplicitTransferSyntax                 1.2.840.10008.1.2
LittleEndianExplicitTransferSyntax                 1.2.840.10008.1.2.1
DeflatedExplicitVRLittleEndianTransferSyntax       1.2.840.10008.1.2.1.99 (*)
BigEndianExplicitTransferSyntax                    1.2.840.10008.1.2.2

(*) if compiled with zlib support enabled (see --version output).

Which transfer syntaxes are actually proposed, and in what order, can be specified with the --propose options. And ngl β€” the findscu application does not support extended negotiation. it said no thanks πŸ’€


πŸ“ LOGGING πŸ“

The level of logging output of the various command line tools and underlying libraries can be specified by you, the user. By default, only errors and warnings are written to the standard error stream. Using option --verbose also reports informational messages like processing details. Option --debug can be used to get more details on the internal activity, e.g. for debugging purposes. Other logging levels can be selected using option --log-level. In --quiet mode only fatal errors are reported β€” and in such very severe error events, the application will usually terminate. For more details on the different logging levels, see the documentation of module "oflog". πŸ“š

In case the logging output should be written to file (optionally with logfile rotation), to syslog (Unix) or the event log (Windows), option --log-config can be used. This configuration file also allows for directing only certain messages to a particular output stream and for filtering certain messages based on the module or application where they're generated. An example configuration file is provided in <etcdir>/logger.cfg. πŸŽ€

⌨️ COMMAND LINE ⌨️

All command line tools use the following notation for parameters: square brackets enclose optional values (0-1), three trailing dots indicate that multiple values are allowed (1-n), and a combination of both means 0 to n values.

Command line options are distinguished from parameters by a leading + or - sign, respectively. Usually, order and position of command line options are arbitrary (i.e. they can appear anywhere). However, if options are mutually exclusive, the rightmost appearance is used. This behavior conforms to the standard evaluation rules of common Unix shells. πŸ’…

In addition, one or more command files can be specified using an @ sign as a prefix to the filename (e.g. @command.txt). Such a command argument is replaced by the content of the corresponding text file (multiple whitespaces are treated as a single separator unless they appear between two quotation marks) prior to any further evaluation. Please note that a command file cannot contain another command file β€” no inception, bestie πŸŒ€ This simple but effective approach allows you to summarize common combinations of options/parameters and avoids longish and confusing command lines (an example is provided in file <datadir>/dumppat.txt).

🌿 ENVIRONMENT 🌿

The findscu utility will attempt to load DICOM data dictionaries specified in the DCMDICTPATH environment variable. By default β€” i.e. if the DCMDICTPATH environment variable is not set β€” the file <datadir>/dicom.dic will be loaded unless the dictionary is built into the application (which is the default for Windows).

The default behavior should be preferred, and the DCMDICTPATH environment variable should only be used when alternative data dictionaries are required. The DCMDICTPATH environment variable has the same format as the Unix shell PATH variable in that a colon (":") separates entries. On Windows systems, a semicolon (";") is used as a separator. The data dictionary code will attempt to load each file specified in the DCMDICTPATH environment variable. It is an error if no data dictionary can be loaded. ⚠️

Depending on the command line options specified, the findscu utility will also attempt to load character set mapping tables. This happens when DCMTK was compiled with the oficonv library (which is the default) and the mapping tables are not built into the library (default when DCMTK uses shared libraries).

The mapping table files are expected in DCMTK's <datadir>. The DCMICONVPATH environment variable can be used to specify a different location. If a different location is specified, those mapping tables also replace any built-in tables. πŸ—‚οΈ

πŸ“ FILES πŸ“

  • <datadir>/dcm2xml.dtd β€” Document Type Definition (DTD) file

πŸ‘€ SEE ALSO πŸ‘€

movescu(1), dump2dcm(1), dcmodify(1)

Copyright (C) 1994-2026 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.


and that's the whole page, bestie!! πŸŽ€βœ¨ this is findscu version 3.7.1, dated Sat Oct 17 2026 09:34:01 β€” go forth and query, you absolute icon πŸ‘‘πŸ’–
πŸ“¦ where this page comes from