NAME storescp SYNOPSIS storescp [options] port SUMMARY The storescp application implements a Service Class Provider (SCP) for the Storage Service Class. It listens on a specific TCP/IP port for incoming association requests from a Storage SCU and can receive images according to the Storage Service Class. Received images will normally be stored in files (within the current working directory). The storescp application also supports the Verification Service Class as an SCP. USAGE storescp: DICOM storage (C-STORE) SCP usage: storescp [options] port parameters: port tcp/ip port number to listen on general options: -h --help print this help text and exit --version print version information and exit -v --verbose verbose mode, print processing details -d --debug debug mode, print debug information -od --output-directory [p]ath: string write output-files to (existing) directory p (default: .) network options: preferred network transfer syntaxes: +x= --prefer-uncompr prefer explicit VR local byte order (default) +xe --prefer-little prefer explicit VR little endian TS +xb --prefer-big prefer explicit VR big endian TS +xs --prefer-lossless prefer default JPEG lossless TS +xy --prefer-jpeg8 prefer default JPEG lossy TS for 8 bit data +xx --prefer-jpeg12 prefer default JPEG lossy TS for 12 bit data +xr --prefer-rle prefer RLE lossless TS +xd --prefer-deflated prefer deflated expl. VR little endian TS +xi --implicit accept implicit VR little endian TS only other network options: -aet --aetitle aetitle: string set my AE title (default: STORESCP) -pdu --max-pdu [n]umber of bytes: integer [4096..131072] set max receive pdu to n bytes (def.: 16384) -dhl --disable-host-lookup disable hostname lookup --refuse refuse association --reject reject association if no implement. class UID --ignore ignore store data, receive but do not store --sleep-after [s]econds: integer sleep s seconds after store (default: 0) --sleep-during [s]econds: integer sleep s seconds during store (default: 0) --abort-after abort association after receipt of C-STORE-RQ (but before sending response) --abort-during abort association during receipt of C-STORE-RQ -pm --promiscuous promiscuous mode, accept unknown SOP classes -up --uid-padding silently correct space-padded UIDs output options: bit preserving mode: -B --normal allow implicit format conversions (default) +B --bit-preserving write data exactly as read output file format: +F --write-file write file format (default) -F --write-dataset write data set without file meta information output transfer syntax (not with --bit-preserving or compr. transmission): +t= --write-xfer-same write with same TS as input (default) +te --write-xfer-little write with explicit VR little endian TS +tb --write-xfer-big write with explicit VR big endian TS +ti --write-xfer-implicit write with implicit VR little endian TS +td --write-xfer-deflated write with deflated expl. VR little endian TS post-1993 value representations (not with --bit-preserving): +u --enable-new-vr enable support for new VRs (UN/UT) (default) -u --disable-new-vr disable support for new VRs, convert to OB group length encoding (not with --bit-preserving): +g= --group-length-recalc recalculate group lengths if present (default) +g --group-length-create always write with group length elements -g --group-length-remove always write without group length elements length encoding in sequences and items (not with --bit-preserving): +e --length-explicit write with explicit lengths (default) -e --length-undefined write with undefined lengths data set trailing padding (not with --write-dataset or --bit-preserving): -p --padding-off no padding (default) +p --padding-create [f]ile-pad [i]tem-pad: integer align file on multiple of f bytes and items on multiple of i bytes deflate compression level (not with --write-xfer-little/big/implicit): +cl --compression-level compression level: 0-9 (default 6) 0=uncompressed, 1=fastest, 9=best compression sorting into subdirectories (not with --bit-preserving): -ss --sort-conc-studies [p]refix: string sort concerning studies into subdirectories that start with prefix p event options: -xcr --exec-on-reception [c]ommand: string execute command c after having received and processed one C-STORE-Request message -xcs --exec-on-eostudy [c]ommand: string (only w/ -ss) execute command c after having received and processed all C-STORE-Request messages that belong to one study -rns --rename-on-eostudy (only w/ -ss) having received and processed all C-STORE-Request messages that belong to one study, rename output files according to a certain pattern -tos --eostudy-timeout [t]imeout: integer (only w/ -ss, -xcs or -rns) specifies a timeout of t seconds for end-of-study determination transport layer security (TLS) options: transport protocol stack options: -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 private key password options (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 options: -pem --pem-keys read keys and certificates as PEM file (def.) -der --der-keys read keys and certificates as DER file certification authority options: +cf --add-cert-file [c]ertificate filename: string add certificate file to list of certificates +cd --add-cert-dir [c]ertificate directory: string add certificates in d to list of certificates ciphersuite options: +cs --cipher [c]iphersuite name: string add ciphersuite to list of negotiated suites +dp --dhparam [f]ilename: string read DH parameters for DH/DSS ciphersuites pseudo random generator options: +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 options: -rc --require-peer-cert verify peer certificate, fail if absent (def.) -vc --verify-peer-cert verify peer certificate if present -ic --ignore-peer-cert don't verify peer certificate OPTIONS The semantic impacts of the above mentioned options is clear for the majority of options. Some particular options, however, are so specific that they need detailed descriptions which will be given in this passage. Option --sort-conc-studies enables a user to sort all received DICOM objects into different subdirectories. The sorting will be done with regard to the studies the individual objects belong to, i.e. objects that belong to the same study will be stored in the same subdirectory. In general, a DICOM object d_n+1 is considered to belong to the same study as a DICOM object d_n if and only if d_n and d_n+1 show the exact same values in attribute Study Instance UID. The names of the resulting subdirectories always start with a prefix p which was passed to this option as a parameter. In addition to this prefix, the subdirec- tory names contain time stamp information with regard to the date and time of reception of this particular study's first DICOM object. In detail, the deter- mination of the subdirectory names pertains to the pattern [prefix]_[YYYYMMDD]_[HHMMSSPPP] where YYYY refers to year (4 digits), MM to month (01-12), DD to day (01-31), HH to hour (00-23), MM to minute (00-59), SS to second (00-59) and PPP to milliseconds (000-999). Option --exec-on-reception makes it possible to execute a certain command line after having received and processed one DICOM object (through a C-STORE-Request message). The command line which shall be executed will be passed to this option as a parameter; note that the specified command line may contain a placeholder ("#p") which will be replaced at run time by the complete path to the output directory into which the last DICOM object was stored, and it may contain another placeholder ("#f") which will be replaced at run time by the last output file's filename. The specified command line will be executed as a separate process, so that the execution of storescp will not be held back. Option --exec-on-eostudy enables a user to execute a certain command line after having determined that all DICOM objects that belong to one study have been received by storescp. The command line which shall be executed will be passed to this option as a parameter; note that the specified command line may contain a placeholder ("#p") that will be replaced at run time by the complete path to the output directory into which the last study's DICOM objects were stored. The specified command line will be executed as a separate process, so that the execution of storescp will not be held back. In general, the question if all DICOM objects that belong to one study have been received by storescp will be answered positively if and only if two consecutively received DICOM objects d_n and d_n+1 do not show the same values in attribute Study Instance UID; in such a case, d_n+1 is considered to belong to a new study. Note that in case this option is used in combination with option --rename-on-eostudy, the renaming performed by the latter option will be executed before this option's command line is executed. Option --rename-on-eostudy refers to the above mentioned option --sort-conc- studies and can only be used in combination with this option. If a user specifies option --rename-on-eostudy and storescp determines that all DICOM objects that belong to a certain study have been received, all DICOM files that belong to the last study will be renamed in the corresponding output directory. The filenames into which the files are being renamed will be calculated using the pattern [prefix][consecutive numbering] where [prefix] is a 2 character prefix that reveals the kind of DICOM object stored in the file and [consecutive numbering] is a consecutively numbered, 6-digit number, starting at "000001". In general, the question if all DICOM objects that belong to one study have been received by storescp will be answered positively if and only if two consecutively received DICOM objects d_n and d_n+1 do not show the same values in attribute Study Instance UID; in such a case, d_n+1 is considered to belong to a new study. Using option --eostudy-timeout a user can modify the determination process to figure out if all DICOM objects that belong to one study have already been received by storescp. With regard to this fact, it is clear that this option can only be used in combination with at least one of the three options --sort- conc-studies, --exec-on-eostudy and --rename-on-eostudy. If option --eostudy- timeout is specified, the end of a study is considered to have occurred not only if two consecutively received DICOM objects d_n and d_n+1 do not show the same values in attribute Study Instance UID, but also if whithin a time span of x seconds after the reception of a DICOM object d_n, no other DICOM object was received over the network. Note that the amount x of seconds (which determines the length of this time span) has to be passed to this option as a parameter. DICOM CONFORMANCE The storescp application supports the following SOP Classes as an SCP: VerificationSOPClass "1.2.840.10008.1.1" StoredPrintStorage "1.2.840.10008.5.1.1.27" HardcopyGrayscaleImageStorage "1.2.840.10008.5.1.1.29" HardcopyColorImageStorage "1.2.840.10008.5.1.1.30" ComputedRadiographyImageStorage "1.2.840.10008.5.1.4.1.1.1" DigitalXRayImageStorageForPresentation "1.2.840.10008.5.1.4.1.1.1.1" DigitalXRayImageStorageForProcessing "1.2.840.10008.5.1.4.1.1.1.1.1" DigitalMammographyXRayImageStorageForPresentation "1.2.840.10008.5.1.4.1.1.1.2" DigitalMammographyXRayImageStorageForProcessing "1.2.840.10008.5.1.4.1.1.1.2.1" DigitalIntraOralXRayImageStorageForPresentation "1.2.840.10008.5.1.4.1.1.1.3" DigitalIntraOralXRayImageStorageForProcessing "1.2.840.10008.5.1.4.1.1.1.3.1" CTImageStorage "1.2.840.10008.5.1.4.1.1.2" RETIRED_UltrasoundMultiframeImageStorage "1.2.840.10008.5.1.4.1.1.3" UltrasoundMultiframeImageStorage "1.2.840.10008.5.1.4.1.1.3.1" MRImageStorage "1.2.840.10008.5.1.4.1.1.4" EnhancedMRImageStorage "1.2.840.10008.5.1.4.1.1.4.1" MRSpectroscopyStorage "1.2.840.10008.5.1.4.1.1.4.2" RETIRED_NuclearMedicineImageStorage "1.2.840.10008.5.1.4.1.1.5" RETIRED_UltrasoundImageStorage "1.2.840.10008.5.1.4.1.1.6" UltrasoundImageStorage "1.2.840.10008.5.1.4.1.1.6.1" SecondaryCaptureImageStorage "1.2.840.10008.5.1.4.1.1.7" MultiframeSingleBitSecondaryCaptureImageStorage "1.2.840.10008.5.1.4.1.1.7.1" MultiframeGrayscaleByteSecondaryCaptureImageStorage "1.2.840.10008.5.1.4.1.1.7.2" MultiframeGrayscaleWordSecondaryCaptureImageStorage "1.2.840.10008.5.1.4.1.1.7.3" MultiframeTrueColorSecondaryCaptureImageStorage "1.2.840.10008.5.1.4.1.1.7.4" StandaloneOverlayStorage "1.2.840.10008.5.1.4.1.1.8" StandaloneCurveStorage "1.2.840.10008.5.1.4.1.1.9" TwelveLeadECGWaveformStorage "1.2.840.10008.5.1.4.1.1.9.1.1" GeneralECGWaveformStorage "1.2.840.10008.5.1.4.1.1.9.1.2" AmbulatoryECGWaveformStorage "1.2.840.10008.5.1.4.1.1.9.1.3" HemodynamicWaveformStorage "1.2.840.10008.5.1.4.1.1.9.2.1" CardiacElectrophysiologyWaveformStorage "1.2.840.10008.5.1.4.1.1.9.3.1" BasicVoiceAudioWaveformStorage "1.2.840.10008.5.1.4.1.1.9.4.1" StandaloneModalityLUTStorage "1.2.840.10008.5.1.4.1.1.10" StandaloneVOILUTStorage "1.2.840.10008.5.1.4.1.1.11" GrayscaleSoftcopyPresentationStateStorage "1.2.840.10008.5.1.4.1.1.11.1" XRayAngiographicImageStorage "1.2.840.10008.5.1.4.1.1.12.1" XRayFluoroscopyImageStorage "1.2.840.10008.5.1.4.1.1.12.2" RETIRED_XRayAngiographicBiPlaneImageStorage "1.2.840.10008.5.1.4.1.1.12.3" NuclearMedicineImageStorage "1.2.840.10008.5.1.4.1.1.20" RawDataStorage "1.2.840.10008.5.1.4.1.1.66" VLEndoscopicImageStorage "1.2.840.10008.5.1.4.1.1.77.1.1" VLMicroscopicImageStorage "1.2.840.10008.5.1.4.1.1.77.1.2" VLSlideCoordinatesMicroscopicImageStorage "1.2.840.10008.5.1.4.1.1.77.1.3" VLPhotographicImageStorage "1.2.840.10008.5.1.4.1.1.77.1.4" BasicTextSR "1.2.840.10008.5.1.4.1.1.88.11" EnhancedSR "1.2.840.10008.5.1.4.1.1.88.22" ComprehensiveSR "1.2.840.10008.5.1.4.1.1.88.33" MammographyCADSR "1.2.840.10008.5.1.4.1.1.88.50" KeyObjectSelectionDocument "1.2.840.10008.5.1.4.1.1.88.59" PETImageStorage "1.2.840.10008.5.1.4.1.1.128" PETCurveStorage "1.2.840.10008.5.1.4.1.1.129" RTImageStorage "1.2.840.10008.5.1.4.1.1.481.1" RTDoseStorage "1.2.840.10008.5.1.4.1.1.481.2" RTStructureSetStorage "1.2.840.10008.5.1.4.1.1.481.3" RTBeamsTreatmentRecordStorage "1.2.840.10008.5.1.4.1.1.481.4" RTPlanStorage "1.2.840.10008.5.1.4.1.1.481.5" RTBrachyTreatmentRecordStorage "1.2.840.10008.5.1.4.1.1.481.6" RTTreatmentSummaryRecordStorage "1.2.840.10008.5.1.4.1.1.481.7" The storescp application will accept presentation contexts for all of the abovementioned supported SOP Classes using any of the transfer syntaxes: LittleEndianImplicitTransferSyntax "1.2.840.10008.1.2" LittleEndianExplicitTransferSyntax "1.2.840.10008.1.2.1" BigEndianExplicitTransferSyntax "1.2.840.10008.1.2.2" The default behaviour of the storescp application is to prefer transfer syntaxes having an explicit encoding over the default implicit transfer syntax. If storescp is running on big-endian hardware it will prefer BigEndianExplicit- TransferSyntax to LittleEndianExplicitTransferSyntax (and vice versa). This behaviour can be changed with the --prefer options (see above). The storescp application does not support extended negotiation. ENVIRONMENT The storescp application will attempt to load DICOM data dictionaries specified in the DCMDICTPATH environment variable. By default, if the DCMDICTPATH environment variable is not set, the file /usr/local/dicom/lib/dicom.dic will be loaded. The default behaviour should be preferred and the DCMDICTPATH environment variable only used when alternative data dictionaries are required. The DCMDICTPATH environment variable has the same format as the shell PATH variable in that a colon (":") separates entries. 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.