Error While Running StoreSCU

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
niirdan
Posts: 21
Joined: Wed, 2023-02-22, 13:13

Error While Running StoreSCU

#1 Post by niirdan »

Hey Friends , I'm trying to Simulate Receiving Dicom Files from a Modality to MY Running StoreSCP service (running in a different network).
to Simulate it Im Trying to send The Dicom File Throw storescu service from my local machine
and this is the Log of my storeSCU:

Code: Select all

12:04:09,932 DEBUG - STORESCU->artisan(1): enter state: Sta6 - Association established and ready for data transfer
Connected to artisan in 45ms
12:04:10,023 DEBUG - Decompressor: org.dcm4che3.opencv.NativeImageReader
12:04:10,025 INFO  - STORESCU->artisan(1) << 1:C-STORE-RQ[pcid=3, prior=0
  cuid=1.2.840.10008.5.1.4.1.1.3.1 - Ultrasound Multi-frame Image Storage
  iuid=1.2.276.0.26.1.1.1.2.2020.375.28486.274177.180224000 - ?
  tsuid=1.2.840.10008.1.2.1 - Explicit VR Little Endian]
12:04:10,034 DEBUG - STORESCU->artisan(1) << 1:C-STORE-RQ Command:
(0000,0002) UI [1.2.840.10008.5.1.4.1.1.3.1] AffectedSOPClassUID
(0000,0100) US [1] CommandField
(0000,0110) US [1] MessageID
(0000,0700) US [0] Priority
(0000,0800) US [0] CommandDataSetType
(0000,1000) UI [1.2.276.0.26.1.1.1.2.2020.375.28486.274177.180224000] Affected

12:04:10,036 DEBUG - STORESCU->artisan(1) << 1:C-STORE-RQ Dataset:
(0008,0005) CS [ISO_IR 100] SpecificCharacterSet
(0008,0008) CS [ORIGINAL\PRIMARY\OBSTETRICAL\] ImageType
(0008,0016) UI [1.2.840.10008.5.1.4.1.1.3.1] SOPClassUID
(0008,0018) UI [1.2.276.0.26.1.1.1.2.2020.375.28486.274177.180224000] SOPInsta
(0008,0020) DA [20201203] StudyDate
(0008,0023) DA [20201203] ContentDate
(0008,0030) TM [095410] StudyTime
(0008,0033) TM [095446] ContentTime
(0008,0050) SH [] AccessionNumber
(0008,0060) CS [US] Modality
(0008,0070) LO [GE Healthcare Austria GmbH & Co OG] Manufacturer
(0008,0080) LO [Dr.Zmira] InstitutionName
(0008,0090) PN [] ReferringPhysicianName
(0008,1010) SH [US1] StationName
(0008,1070) PN [] OperatorsName
(0008,1090) LO [V830] ManufacturerModelName
(0010,0010) PN [Weiss^Sofia] PatientName
(0010,0020) LO [324462431] PatientID
(0010,0030) DA [] PatientBirthDate
(0010,0040) CS [F] PatientSex
(0018,0040) IS [16] CineRate
(0018,1000) LO [D64710] DeviceSerialNumber
(0018,1020) LO [14.x.x VE] SoftwareVersions
(0018,1063) DS [61.083332061768] FrameTime
(0018,6011) SQ [2 Items] SequenceOfUltrasoundRegions
>Item #1
>(0018,6012) US [1] RegionSpatialFormat
>(0018,6014) US [1] RegionDataType
>(0018,6016) UL [0] RegionFlags
>(0018,6018) UL [241] RegionLocationMinX0
>(0018,601A) UL [58] RegionLocationMinY0
>(0018,601C) UL [719] RegionLocationMaxX1
>(0018,601E) UL [387] RegionLocationMaxY1
>(0018,6020) SL [241] ReferencePixelX0
>(0018,6022) SL [387] ReferencePixelY0
>(0018,6024) US [3] PhysicalUnitsXDirection
>(0018,6026) US [3] PhysicalUnitsYDirection
>(0018,6028) FD [0] ReferencePixelPhysicalValueX
>(0018,602A) FD [0] ReferencePixelPhysicalValueY
>(0018,602C) FD [0.02999210730195] PhysicalDeltaX
>(0018,602E) FD [0.02999210730195] PhysicalDeltaY
>Item #2
>(0018,6012) US [3] RegionSpatialFormat
>(0018,6014) US [3] RegionDataType
>(0018,6016) UL [0] RegionFlags
>(0018,6018) UL [50] RegionLocationMinX0
>(0018,601A) UL [391] RegionLocationMinY0
>(0018,601C) UL [910] RegionLocationMaxX1
>(0018,601E) UL [720] RegionLocationMaxY1
>(0018,6020) SL [0] ReferencePixelX0
...

Aug 01, 2023 12:04:10 PM org.opencv.osgi.OpenCVNativeLoader init
INFO: Successfully loaded OpenCV native library.
12:04:10,083 DEBUG - Decompressed frame #1 1:Infinity in 32 ms
12:04:10,112 INFO  - STORESCU->artisan(1) >> {}
A-ABORT[source: 0 - service-user, reason: 0]
        at org.dcm4che3.net.PDUDecoder.nextPDU(PDUDecoder.java:196)
        at org.dcm4che3.net.Association$2.run(Association.java:521)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
12:04:10,128 INFO  - STORESCU->artisan(1): close Socket[addr=/34.165.1.182,port=443,localport=54526]
12:04:10,128 DEBUG - STORESCU->artisan(1): enter state: Sta1 - Idle
java.net.SocketException: Socket closed
        at java.net.SocketOutputStream.socketWrite(Unknown Source)
        at java.net.SocketOutputStream.write(Unknown Source)
        at org.dcm4che3.net.PDUEncoder.writePDU(PDUEncoder.java:128)
        at org.dcm4che3.net.PDUEncoder.writePDataTF(PDUEncoder.java:394)
        at org.dcm4che3.net.Association.doWritePDataTF(Association.java:697)
        at org.dcm4che3.net.State$4.writePDataTF(State.java:113)
        at org.dcm4che3.net.Association.writePDataTF(Association.java:693)
        at org.dcm4che3.net.PDUEncoder.flushPDataTF(PDUEncoder.java:371)
        at org.dcm4che3.net.PDUEncoder.write(PDUEncoder.java:318)
        at org.dcm4che3.io.DicomOutputStream.write(DicomOutputStream.java:114)
        at org.dcm4che3.imageio.codec.Decompressor.writeTo(Decompressor.java:348)
        at org.dcm4che3.imageio.codec.Decompressor.writeTo(Decompressor.java:320)
        at org.dcm4che3.imageio.codec.Decompressor.writeFrameTo(Decompressor.java:285)
        at org.dcm4che3.imageio.codec.Decompressor.writeTo(Decompressor.java:269)
        at org.dcm4che3.imageio.codec.Decompressor$1.writeTo(Decompressor.java:202)
        at org.dcm4che3.io.DicomOutputStream.writeAttribute(DicomOutputStream.java:208)
        at org.dcm4che3.io.DicomOutputStream.writeAttribute(DicomOutputStream.java:184)
        at org.dcm4che3.data.Attributes.writeTo(Attributes.java:2657)
        at org.dcm4che3.data.Attributes.writeTo(Attributes.java:2616)
        at org.dcm4che3.io.DicomOutputStream.writeDataset(DicomOutputStream.java:146)
        at org.dcm4che3.net.DataWriterAdapter.writeTo(DataWriterAdapter.java:67)
        at org.dcm4che3.net.PDUEncoder.writeDIMSE(PDUEncoder.java:437)
        at org.dcm4che3.net.Association.invoke(Association.java:1233)
        at org.dcm4che3.net.Association.invoke(Association.java:1223)
        at org.dcm4che3.net.Association.cstore(Association.java:888)
        at org.dcm4che3.tool.storescu.StoreSCU.send(StoreSCU.java:485)
        at org.dcm4che3.tool.storescu.StoreSCU.sendFiles(StoreSCU.java:389)
        at org.dcm4che3.tool.storescu.StoreSCU.main(StoreSCU.java:297)
storescu: A-ABORT[source: 0 - service-user, reason: 0]
A-ABORT[source: 0 - service-user, reason: 0]
        at org.dcm4che3.net.PDUDecoder.nextPDU(PDUDecoder.java:196)
        at org.dcm4che3.net.Association$2.run(Association.java:521)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

StoreSCP Log :

Code: Select all

D: $dcmtk: storescp v3.6.7 2022-04-22 $
D: 
D: DcmDataDictionary: Loading file: /usr/local/share/dcmtk/dicom.dic
D: Association Received: 94
D: setting network send timeout to 60 seconds
D: setting network receive timeout to 60 seconds
D: PDU Type: Associate Request, PDU Length: 627 + 6 bytes PDU header
D: Only dumping 512 bytes.
D:   01  00  00  00  02  73  00  01  00  00  61  72  74  69  73  61
D:   6e  20  20  20  20  20  20  20  20  20  53  54  4f  52  45  53
D:   43  55  20  20  20  20  20  20  20  20  00  00  00  00  00  00
D:   00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
D:   00  00  00  00  00  00  00  00  00  00  10  00  00  15  31  2e
D:   32  2e  38  34  30  2e  31  30  30  30  38  2e  33  2e  31  2e
D:   31  2e  31  20  00  00  2e  01  00  00  00  30  00  00  11  31
D:   2e  32  2e  38  34  30  2e  31  30  30  30  38  2e  31  2e  31
D:   40  00  00  11  31  2e  32  2e  38  34  30  2e  31  30  30  30
D:   38  2e  31  2e  32  20  00  00  3a  03  00  00  00  30  00  00
D:   1b  31  2e  32  2e  38  34  30  2e  31  30  30  30  38  2e  35
D:   2e  31  2e  34  2e  31  2e  31  2e  33  2e  31  40  00  00  13
D:   31  2e  32  2e  38  34  30  2e  31  30  30  30  38  2e  31  2e
D:   32  2e  31  20  00  00  38  05  00  00  00  30  00  00  1b  31
D:   2e  32  2e  38  34  30  2e  31  30  30  30  38  2e  35  2e  31
D:   2e  34  2e  31  2e  31  2e  33  2e  31  40  00  00  11  31  2e
D:   32  2e  38  34  30  2e  31  30  30  30  38  2e  31  2e  32  20
D:   00  00  3d  07  00  00  00  30  00  00  1b  31  2e  32  2e  38
D:   34  30  2e  31  30  30  30  38  2e  35  2e  31  2e  34  2e  31
D:   2e  31  2e  33  2e  31  40  00  00  16  31  2e  32  2e  38  34
D:   30  2e  31  30  30  30  38  2e  31  2e  32  2e  34  2e  35  30
D:   20  00  00  38  09  00  00  00  30  00  00  1b  31  2e  32  2e
D:   38  34  30  2e  31  30  30  30  38  2e  35  2e  31  2e  34  2e
D:   31  2e  31  2e  36  2e  31  40  00  00  11  31  2e  32  2e  38
D:   34  30  2e  31  30  30  30  38  2e  31  2e  32  20  00  00  3a
D:   0b  00  00  00  30  00  00  1b  31  2e  32  2e  38  34  30  2e
D:   31  30  30  30  38  2e  35  2e  31  2e  34  2e  31  2e  31  2e
D:   36  2e  31  40  00  00  13  31  2e  32  2e  38  34  30  2e  31
D:   30  30  30  38  2e  31  2e  32  2e  31  20  00  00  36  0d  00
D:   00  00  30  00  00  19  31  2e  32  2e  38  34  30  2e  31  30
D:   30  30  38  2e  35  2e  31  2e  34  2e  31  2e  31  2e  37  40
D:   00  00  11  31  2e  32  2e  38  34  30  2e  31  30  30  30  38
D: 
D: Parsing an A-ASSOCIATE PDU
I: Association Received
D: Parameters:
D: ====================== BEGIN A-ASSOCIATE-RQ =====================
D: Our Implementation Class UID:      1.2.276.0.7230010.3.0.3.6.7
D: Our Implementation Version Name:   OFFIS_DCMTK_367
D: Their Implementation Class UID:    1.2.40.0.13.1.3
D: Their Implementation Version Name: dcm4che-5.17.0
D: Application Context Name:    1.2.840.10008.3.1.1.1
D: Calling Application Name:    STORESCU
D: Called Application Name:     artisan
D: Responding Application Name: 
D: Our Max PDU Receive Size:    16384
D: Their Max PDU Receive Size:  16378
D: Presentation Contexts:
D:   Context ID:        1 (Proposed)
D:     Abstract Syntax: =VerificationSOPClass
D:     Proposed SCP/SCU Role: Default
D:     Proposed Transfer Syntax(es):
D:       =LittleEndianImplicit
D:   Context ID:        3 (Proposed)
D:     Abstract Syntax: =UltrasoundMultiframeImageStorage
D:     Proposed SCP/SCU Role: Default
D:     Proposed Transfer Syntax(es):
D:       =LittleEndianExplicit
D:   Context ID:        5 (Proposed)
D:     Abstract Syntax: =UltrasoundMultiframeImageStorage
D:     Proposed SCP/SCU Role: Default
D:     Proposed Transfer Syntax(es):
D:       =LittleEndianImplicit
D:   Context ID:        7 (Proposed)
D:     Abstract Syntax: =UltrasoundMultiframeImageStorage
D:     Proposed SCP/SCU Role: Default
D:     Proposed Transfer Syntax(es):
D:       =JPEGBaseline
D:   Context ID:        9 (Proposed)
D:     Abstract Syntax: =UltrasoundImageStorage
D:     Proposed SCP/SCU Role: Default
D:     Proposed Transfer Syntax(es):
D:       =LittleEndianImplicit
D:   Context ID:        11 (Proposed)
D:     Abstract Syntax: =UltrasoundImageStorage
D:     Proposed SCP/SCU Role: Default
D:     Proposed Transfer Syntax(es):
D:       =LittleEndianExplicit
D:   Context ID:        13 (Proposed)
D:     Abstract Syntax: =SecondaryCaptureImageStorage
D:     Proposed SCP/SCU Role: Default
D:     Proposed Transfer Syntax(es):
D:       =LittleEndianImplicit
D:   Context ID:        15 (Proposed)
D:     Abstract Syntax: =SecondaryCaptureImageStorage
D:     Proposed SCP/SCU Role: Default
D:     Proposed Transfer Syntax(es):
D:       =LittleEndianExplicit
D: Requested Extended Negotiation: none
D: Accepted Extended Negotiation:  none
D: Requested User Identity Negotiation: none
D: User Identity Negotiation Response:  none
D: ======================= END A-ASSOCIATE-RQ ======================
D: Constructing Associate AC PDU
I: Association Acknowledged (Max Send PDV: 16366)
D: ====================== BEGIN A-ASSOCIATE-AC =====================
D: Our Implementation Class UID:      1.2.276.0.7230010.3.0.3.6.7
D: Our Implementation Version Name:   OFFIS_DCMTK_367
D: Their Implementation Class UID:    1.2.40.0.13.1.3
D: Their Implementation Version Name: dcm4che-5.17.0
D: Application Context Name:    1.2.840.10008.3.1.1.1
D: Calling Application Name:    STORESCU
D: Called Application Name:     artisan
D: Responding Application Name: artisan
D: Our Max PDU Receive Size:    16384
D: Their Max PDU Receive Size:  16378
D: Presentation Contexts:
D:   Context ID:        1 (Accepted)
D:     Abstract Syntax: =VerificationSOPClass
D:     Proposed SCP/SCU Role: Default
D:     Accepted SCP/SCU Role: Default
D:     Accepted Transfer Syntax: =LittleEndianImplicit
D:   Context ID:        3 (Accepted)
D:     Abstract Syntax: =UltrasoundMultiframeImageStorage
D:     Proposed SCP/SCU Role: Default
D:     Accepted SCP/SCU Role: Default
D:     Accepted Transfer Syntax: =LittleEndianExplicit
D:   Context ID:        5 (Accepted)
D:     Abstract Syntax: =UltrasoundMultiframeImageStorage
D:     Proposed SCP/SCU Role: Default
D:     Accepted SCP/SCU Role: Default
D:     Accepted Transfer Syntax: =LittleEndianImplicit
D:   Context ID:        7 (Transfer Syntaxes Not Supported)
D:     Abstract Syntax: =UltrasoundMultiframeImageStorage
D:     Proposed SCP/SCU Role: Default
D:     Accepted SCP/SCU Role: Default
D:   Context ID:        9 (Accepted)
D:     Abstract Syntax: =UltrasoundImageStorage
D:     Proposed SCP/SCU Role: Default
D:     Accepted SCP/SCU Role: Default
D:     Accepted Transfer Syntax: =LittleEndianImplicit
D:   Context ID:        11 (Accepted)
D:     Abstract Syntax: =UltrasoundImageStorage
D:     Proposed SCP/SCU Role: Default
D:     Accepted SCP/SCU Role: Default
D:     Accepted Transfer Syntax: =LittleEndianExplicit
D:   Context ID:        13 (Accepted)
D:     Abstract Syntax: =SecondaryCaptureImageStorage
D:     Proposed SCP/SCU Role: Default
D:     Accepted SCP/SCU Role: Default
D:     Accepted Transfer Syntax: =LittleEndianImplicit
D:   Context ID:        15 (Accepted)
D:     Abstract Syntax: =SecondaryCaptureImageStorage
D:     Proposed SCP/SCU Role: Default
D:     Accepted SCP/SCU Role: Default
D:     Accepted Transfer Syntax: =LittleEndianExplicit
D: Requested Extended Negotiation: none
D: Accepted Extended Negotiation:  none
D: Requested User Identity Negotiation: none
D: User Identity Negotiation Response:  none
D: ======================= END A-ASSOCIATE-AC ======================
D: DcmDataset::read() TransferSyntax="Little Endian Implicit"
E: DIMSE failure (aborting association): 0006:020b DIMSE_parseCmdObject: Missing CommandField

Any Idea's ?

Michael Onken
DCMTK Developer
Posts: 2051
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: Error While Running StoreSCU

#2 Post by Michael Onken »

Hi,

it looks like something in the arriving command set of the C-STORE-RQ is wrong; in particular the DCMTK parser complains that this tag:

Code: Select all

(0000,0100) US [1] CommandField
is missing, though at least in the DCM4CHEE log it is still present.

Maybe you can record the DICOM communication using wireshark to see what is actually going over the wire.

Best regards,
Michael

niirdan
Posts: 21
Joined: Wed, 2023-02-22, 13:13

Re: Error While Running StoreSCU

#3 Post by niirdan »

Hey Michael , Thanks for your Response !
I Successfully made it worked (I'm now using dcmtk's storescu)
and I have another issue .
I'm trying to add TLS Encryption
I'm running this :

Code: Select all

 sudo storescp --verbose --debug --enable-tls /home/test/key.pfx --output-directory /home/dan/test -B  443 
This is The return log :

Code: Select all

$dcmtk: storescp v3.6.6 2021-01-14 $

storescp: DICOM storage (C-STORE) SCP
error: Too many parameters
I've followed this : https://support.dcmtk.org/docs/storescp.html

Michael Onken
DCMTK Developer
Posts: 2051
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: Error While Running StoreSCU

#4 Post by Michael Onken »

HI,

Great that it worked :)

Note that --enable-tls requires two arguments (key file and certificate file) while you provided only one:

Code: Select all

  +tls  --enable-tls  [p]rivate key file, [c]ertificate file: string
          use authenticated secure TLS connection
Best regards,
Michael

niirdan
Posts: 21
Joined: Wed, 2023-02-22, 13:13

Re: Error While Running StoreSCU

#5 Post by niirdan »

Thanks again for the Fast Reply!! much appreciated

Code: Select all

 sudo storescp --verbose --debug --enable-tls /home/dan/leumit100-key.pem /home/dan/artisanca.crt --output-directory /home/dan/dicom_files -B  443
D: $dcmtk: storescp v3.6.6 2021-01-14 $
D: 
D: DcmDataDictionary: Loading file: /usr/share/libdcmtk16/dicom.dic
D: DcmDataDictionary: Loading file: /usr/share/libdcmtk16/private.dic
E: [b]OpenSSL error: no start line[/b]
F: 000b:0005 [b]Unable to load certificate[/b] from '/home/dan/artisanca.crt'
OpenSSL should be installed on the machine ?

niirdan
Posts: 21
Joined: Wed, 2023-02-22, 13:13

Re: Error While Running StoreSCU

#6 Post by niirdan »

Nevermind , everything is working !
thanks Again!

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest