Download Storescu [UPDATED]

4 views
Skip to first unread message

Audie Reints

unread,
Jan 20, 2024, 9:06:23 AM1/20/24
to tatabconsla

The storescu application implements a Service Class User (SCU) for the Storage Service Class. For each DICOM file on the command line it sends a C-STORE message to a Storage Service Class Provider (SCP) and waits for a response. The application can be used to transmit DICOM images and other DICOM composite objects.

The storescu application does not support extended negotiation by default. However, using an appropriate association negotiation profile (see below) the optional support for extended negotiation can be added to particular SOP classes.

download storescu


Download File ····· https://t.co/cXzqVc1N7U



storescu supports a flexible mechanism for specifying the DICOM network association negotiation behavior, based on so-called "associationnegotiation profiles" which may be read from a configuration file. The format and semantics of this configuration file are documented in asconfig.txt.

The storescu 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 /dicom.dic will be loaded unless the dictionary is built into the application (default for Windows).

The storescu application implements a Service Class User (SCU) forthe Storage service class. It requests anassociation with a peer Application Entity and once established requests thetransfer of one or more SOP Instances.

The forum post that I linked to earlier has an example config file with a [PrivateSiemens] section in the [[Profiles]]. I tried this but (as far as I understand) you have to copy all of the SOP classes that you might see, and run storescu referring to the PrivateSiemens profile name. So you may as well edit out an unused presentation context in the Default configuration.

On many systems, the storescu command from the DCMTK project is not configuredout-of-the-box to send uncommon/recent SOP class UIDs or transfersyntaxes. You might have to fine-tune the default configuration fileof storescu in order to be able to send e.g. MPEG4 videos orbreast tomosynthesis images.

We are putting together a project to migrate old data from an AGFA IMPAX 3.5 where the data are all in dicom JPEG compressed. The exact Transfert Syntax is JPEGLosslessNH141.2.840.10008.1.2.4.57 . Now I have setup Conquest 1.4.14beta 20070322., down to 1.4.11 trying to get the dcmdjeg.exe to do the decompressing but it is never even invoked, What we have is an association that never happens because Conquest claims that the list of SOP should be added to the dgatesop.lst file. Now if I use dcmdjpeg of the source file and send the output file to Conquest all is fine. If I comment out or not the JPEGLosslessNH14 entry in dgatesop.lst it does not change the issue. It's like it's never getting there. I activated the use of DCMTK OFFIS in the GUI and using .dcm extension. I compared all entries in the log generated from storescu with the -d switch . Can't figure out that one. Not related to modality type. It's purely JPEG related and/or LittleEndian/Explicit/Implicit sort of problem.

I looked at the code for storescu and noticed that the "JPEG Lossless, Non-hierarchical, Process 14" does exist in the dcmtk 3.5.3 environment but simply was not implemented as an option on the storescu utility. I modified the option parsing lines (only 4 lines to add) and now the option --propose-jpegprocess14 invoke the EXS_JPEGProcess14TransferSyntax TS whereas the --propose-lossless invoke the EXS_JPEGProcess14SV1TransferSyntax TS. I know this is not a DCMTK forum but since it is the final word on the issue. I transfered the image over to Conquest and confirmed that all is saved as is by the Conquest server (if one want it that way). In my case it will speed up the migration progress significantly.

The default behavior of storescu is to propose two presentation contexts for each supported SOP class (abstract syntax) - one with the preferred transfer syntax and one with all other uncompressed transfer syntaxes. The default preferred transfer syntax is explicit VR with byte ordering corresponding to the local byte ordering of the machine on which storescu is running. This behavior can be changed with the --propose, --combine and --required options, see above. Depending on these options, the following transfer syntaxes are supported:

The storescu application does not support extended negotiation by default. However, using an appropriate association negotiation profile (see below) the optional support for extended negotiation can be added to particular SOP classes.

storescu supports a flexible mechanism for specifying the DICOM network association negotiation behavior, based on so-called 'association negotiation profiles' which may be read from a configuration file. The format and semantics of this configuration file are documented in asconfig.txt.

This will transfer the DICOM image IM000001 to the storescp and ultimately store it in the folder /reserve/playground/pacs. The whole operation looks like in the image below. Do not get bothered by the messages of the storescu command; it just evidences that even commercially taken DICOM images do not always fulfil the specs.

You will realize here that in this example, the storescp instance has the root certificate of the storescu instance (which is the self-generated root certificate) whereas the storescu instance has the root ceritifcate chain of the storescp instance (which I extracted using the Firefox browser and accessing my own page ). The reason for this crossover mentioning of the root certificates is simple:

In this example, I still used a self-created certificate and key for the DICOM-enabled device that shall talk to the PACS, but the PACS itself uses a real certificate. You can see that the DICOM-enabled device also uses the storescu command in order to transmit DICOM data. This is not unusual, as most device manufacturers would use the dcmtk toolkit rather than programming DICOM routines from scratch.

peer hostname of DICOM peerport tcp/ip port number of peerdcmfile-in DICOM file or directory to be transmittedOPTIONSgeneral 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 -v --verbose verbose mode, print processing details -d --debug debug mode, print debug information -ll --log-level [l]evel: string constant (fatal, error, warn, info, debug, trace) use level l for the logger -lc --log-config [f]ilename: string use config file f for the logger +v --verbose-pc show presentation contexts in verbose modeinput optionsinput file format: +f --read-file read file format or data set (default) +fo --read-file-only read file format only -f --read-dataset read data set without file meta informationinput files: +sd --scan-directories scan directories for input files (dcmfile-in) +sp --scan-pattern [p]attern: string (only with --scan-directories) pattern for filename matching (wildcards) # possibly not available on all systems -r --no-recurse do not recurse within directories (default) +r --recurse recurse within specified directoriesnetwork optionsapplication entity titles: -aet --aetitle [a]etitle: string set my calling AE title (default: STORESCU) -aec --call [a]etitle: string set called AE title of peer (default: ANY-SCP)association negotiation profile from configuration file: -xf --config-file [f]ilename, [p]rofile: string use profile p from config file fproposed transmission transfer syntaxes (not with --config-file): -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 -xi --propose-implicit propose implicit VR little endian TS only -xs --propose-lossless propose default JPEG lossless TS and all uncompressed transfer syntaxes -xy --propose-jpeg8 propose default JPEG lossy TS for 8 bit data and all uncompressed transfer syntaxes -xx --propose-jpeg12 propose default JPEG lossy TS for 12 bit data and all uncompressed transfer syntaxes -xv --propose-j2k-lossless propose JPEG 2000 lossless TS and all uncompressed transfer syntaxes -xw --propose-j2k-lossy propose JPEG 2000 lossy TS and all uncompressed transfer syntaxes -xt --propose-jls-lossless propose JPEG-LS lossless TS and all uncompressed transfer syntaxes -xu --propose-jls-lossy propose JPEG-LS lossy TS and all uncompressed transfer syntaxes -xm --propose-mpeg2 propose MPEG2 Main Profile @ Main Level TS only -xh --propose-mpeg2-high propose MPEG2 Main Profile @ High Level TS only -xr --propose-rle propose RLE lossless TS and all uncompressed transfer syntaxes -R --required propose only required presentation contexts (default: propose all supported) +C --combine combine proposed transfer syntaxes (default: separate presentation context for each TS)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 OBdeflate compression level (only with --propose-deflated or --config-file): +cl --compression-level [l]evel: integer (default: 6) 0=uncompressed, 1=fastest, 9=best compressionuser identity negotiation: -usr --user [u]ser name: string authenticate using user name u -pwd --password [p]assword: string (only with --user) authenticate using password p -epw --empty-password send empty password (only with --user) -kt --kerberos [f]ilename: string read kerberos ticket from file f --saml [f]ilename: string read SAML request from file f -rsp --pos-response expect positive responseother network options: -to --timeout [s]econds: integer (default: unlimited) timeout for connection requests -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) --max-send-pdu [n]umber of bytes: integer (4096..131072) restrict max send pdu to n bytes --repeat [n]umber: integer repeat n times --abort abort association instead of releasing it -nh --no-halt do not halt if unsuccessful store encountered (default: do halt) -up --uid-padding silently correct space-padded UIDs +II --invent-instance invent a new SOP instance UID for every image sent +IR --invent-series [n]umber: integer (implies --invent-instance) invent a new series UID after n images have been sent (default: 100) +IS --invent-study [n]umber: integer (implies --invent-instance) invent a new study UID after n series have been sent (default: 50) +IP --invent-patient [n]umber: integer (implies --invent-instance) invent a new patient ID and name after n studies have been sent (default: 25)transport layer security (TLS) optionstransport 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 certificateprivate 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 passwordkey and certificate file format: -pem --pem-keys read keys and certificates as PEM file (default) -der --der-keys read keys and certificates as DER filecertification authority: +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 certificatesciphersuite: +cs --cipher [c]iphersuite name: string add ciphersuite to list of negotiated suites +dp --dhparam [f]ilename: string read DH parameters for DH/DSS ciphersuitespseudo 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 fpeer authentication: -rc --require-peer-cert verify peer certificate, fail if absent (default) -vc --verify-peer-cert verify peer certificate if present -ic --ignore-peer-cert don't verify peer certificateNOTESDICOM ConformanceThe storescu application supports the following Storage SOP Classes as an SCU:ComputedRadiographyImageStorage 1.2.840.10008.5.1.4.1.1.1DigitalXRayImageStorageForPresentation 1.2.840.10008.5.1.4.1.1.1.1DigitalXRayImageStorageForProcessing 1.2.840.10008.5.1.4.1.1.1.1.1DigitalMammographyXRayImageStorageForPresentation 1.2.840.10008.5.1.4.1.1.1.2DigitalMammographyXRayImageStorageForProcessing 1.2.840.10008.5.1.4.1.1.1.2.1DigitalIntraOralXRayImageStorageForPresentation 1.2.840.10008.5.1.4.1.1.1.3DigitalIntraOralXRayImageStorageForProcessing 1.2.840.10008.5.1.4.1.1.1.3.1CTImageStorage 1.2.840.10008.5.1.4.1.1.2EnhancedCTImageStorage 1.2.840.10008.5.1.4.1.1.2.1UltrasoundMultiframeImageStorage 1.2.840.10008.5.1.4.1.1.3.1MRImageStorage 1.2.840.10008.5.1.4.1.1.4EnhancedMRImageStorage 1.2.840.10008.5.1.4.1.1.4.1MRSpectroscopyStorage 1.2.840.10008.5.1.4.1.1.4.2UltrasoundImageStorage 1.2.840.10008.5.1.4.1.1.6.1SecondaryCaptureImageStorage 1.2.840.10008.5.1.4.1.1.7MultiframeSingleBitSecondaryCaptureImageStorage 1.2.840.10008.5.1.4.1.1.7.1MultiframeGrayscaleByteSecondaryCaptureImageStorage 1.2.840.10008.5.1.4.1.1.7.2MultiframeGrayscaleWordSecondaryCaptureImageStorage 1.2.840.10008.5.1.4.1.1.7.3MultiframeTrueColorSecondaryCaptureImageStorage 1.2.840.10008.5.1.4.1.1.7.4TwelveLeadECGWaveformStorage 1.2.840.10008.5.1.4.1.1.9.1.1GeneralECGWaveformStorage 1.2.840.10008.5.1.4.1.1.9.1.2AmbulatoryECGWaveformStorage 1.2.840.10008.5.1.4.1.1.9.1.3HemodynamicWaveformStorage 1.2.840.10008.5.1.4.1.1.9.2.1CardiacElectrophysiologyWaveformStorage 1.2.840.10008.5.1.4.1.1.9.3.1BasicVoiceAudioWaveformStorage 1.2.840.10008.5.1.4.1.1.9.4.1GrayscaleSoftcopyPresentationStateStorage 1.2.840.10008.5.1.4.1.1.11.1ColorSoftcopyPresentationStateStorage 1.2.840.10008.5.1.4.1.1.11.2PseudoColorSoftcopyPresentationStateStorage 1.2.840.10008.5.1.4.1.1.11.3BlendingSoftcopyPresentationStateStorage 1.2.840.10008.5.1.4.1.1.11.4XRayAngiographicImageStorage 1.2.840.10008.5.1.4.1.1.12.1EnhancedXAImageStorage 1.2.840.10008.5.1.4.1.1.12.1.1XRayRadiofluoroscopicImageStorage 1.2.840.10008.5.1.4.1.1.12.2EnhancedXRFImageStorage 1.2.840.10008.5.1.4.1.1.12.2.1NuclearMedicineImageStorage 1.2.840.10008.5.1.4.1.1.20RawDataStorage 1.2.840.10008.5.1.4.1.1.66SpatialRegistrationStorage 1.2.840.10008.5.1.4.1.1.66.1SpatialFiducialsStorage 1.2.840.10008.5.1.4.1.1.66.2RealWorldValueMappingStorage 1.2.840.10008.5.1.4.1.1.67VLEndoscopicImageStorage 1.2.840.10008.5.1.4.1.1.77.1.1VLMicroscopicImageStorage 1.2.840.10008.5.1.4.1.1.77.1.2VLSlideCoordinatesMicroscopicImageStorage 1.2.840.10008.5.1.4.1.1.77.1.3VLPhotographicImageStorage 1.2.840.10008.5.1.4.1.1.77.1.4OphthalmicPhotography8BitImageStorage 1.2.840.10008.5.1.4.1.1.77.1.5.1OphthalmicPhotography16BitImageStorage 1.2.840.10008.5.1.4.1.1.77.1.5.2StereometricRelationshipStorage 1.2.840.10008.5.1.4.1.1.77.1.5.3OphthalmicTomographyImageStorage 1.2.840.10008.5.1.4.1.1.77.1.5.4BasicTextSRStorage 1.2.840.10008.5.1.4.1.1.88.11EnhancedSRStorage 1.2.840.10008.5.1.4.1.1.88.22ComprehensiveSRStorage 1.2.840.10008.5.1.4.1.1.88.33ProcedureLogStorage 1.2.840.10008.5.1.4.1.1.88.40MammographyCADSRStorage 1.2.840.10008.5.1.4.1.1.88.50KeyObjectSelectionDocumentStorage 1.2.840.10008.5.1.4.1.1.88.59ChestCADSRStorage 1.2.840.10008.5.1.4.1.1.88.65XRayRadiationDoseSRStorage 1.2.840.10008.5.1.4.1.1.88.67ColonCADSRStorage 1.2.840.10008.5.1.4.1.1.88.69EncapsulatedPDFStorage 1.2.840.10008.5.1.4.1.1.104.1PositronEmissionTomographyImageStorage 1.2.840.10008.5.1.4.1.1.128RTImageStorage 1.2.840.10008.5.1.4.1.1.481.1RTDoseStorage 1.2.840.10008.5.1.4.1.1.481.2RTStructureSetStorage 1.2.840.10008.5.1.4.1.1.481.3RTBeamsTreatmentRecordStorage 1.2.840.10008.5.1.4.1.1.481.4RTPlanStorage 1.2.840.10008.5.1.4.1.1.481.5RTBrachyTreatmentRecordStorage 1.2.840.10008.5.1.4.1.1.481.6RTTreatmentSummaryRecordStorage 1.2.840.10008.5.1.4.1.1.481.7The default behaviour of storescu is to propose two presentation contexts for each supported SOP class (abstract syntax) - one with the preferred transfer syntax and one with all other uncompressed transfer syntaxes. The default preferred transfer syntax is explicit VR with byte ordering corresponding to the local byte ordering of the machine on which storescu is running. This behaviour can be changed with the --propose, --combine and --required options, see above. Depending on these options, the following transfer syntaxes are supported:

df19127ead
Reply all
Reply to author
Forward
0 new messages