C Find SCU with charcterset support

314 views
Skip to first unread message

harithacha...@gmail.com

unread,
May 4, 2021, 7:06:36 AM5/4/21
to dcm4che
Hi,

When i am trying to Query a pacs based on patient ID with the character set ISO IR 126 , i am not receiving any response back from pacs.

Note that Patient ID value is encoded based on above charcterset. I am specifying the encoded patient ID and charcterset value in the search keys, and yet i am not able to fetch the results.

Please correct me if i am doing it in the wrong way or if i should make any changes to acquire the studies?

Thanks in advance.

Gunter Zeilinger

unread,
May 4, 2021, 7:14:29 AM5/4/21
to dcm4che
Not reproducible:

$ findscu -c TEST@test-ng:11112  -m "SpecificCharacterSet=ISO_IR 126" -m PatientName=Διον*
13:12:56,129 INFO  - Initiate connection from 0.0.0.0/0.0.0.0:0 to test-ng:11112
13:12:56,140 INFO  - Established connection Socket[addr=test-ng/192.168.2.121,port=11112,localport=42989]
13:12:56,148 DEBUG - /192.168.2.131:42989->test-ng/192.168.2.121:11112(1): enter state: Sta4 - Awaiting transport connection opening to complete
13:12:56,149 INFO  - FINDSCU->TEST(1) << A-ASSOCIATE-RQ
13:12:56,162 DEBUG - A-ASSOCIATE-RQ[
  calledAET: TEST
  callingAET: FINDSCU
  applicationContext: 1.2.840.10008.3.1.1.1 - DICOM Application Context Name
  implClassUID: 1.2.40.0.13.1.3
  implVersionName: dcm4che-5.23.3
  maxPDULength: 16378
  maxOpsInvoked/maxOpsPerformed: 0/0
  PresentationContext[id: 1
    as: 1.2.840.10008.5.1.4.1.2.2.1 - Study Root Query/Retrieve Information Model - FIND
    ts: 1.2.840.10008.1.2 - Implicit VR Little Endian
    ts: 1.2.840.10008.1.2.1 - Explicit VR Little Endian
    ts: 1.2.840.10008.1.2.2 - Explicit VR Big Endian (Retired)
  ]
]
13:12:56,162 DEBUG - FINDSCU->TEST(1): enter state: Sta5 - Awaiting A-ASSOCIATE-AC or A-ASSOCIATE-RJ PDU
13:12:56,165 INFO  - FINDSCU->TEST(1) >> A-ASSOCIATE-AC
13:12:56,165 DEBUG - A-ASSOCIATE-AC[
  calledAET: TEST
  callingAET: FINDSCU
  applicationContext: 1.2.840.10008.3.1.1.1 - DICOM Application Context Name
  implClassUID: 1.2.40.0.13.1.3
  implVersionName: dcm4che-5.23.3
  maxPDULength: 16378
  maxOpsInvoked/maxOpsPerformed: 0/0
  PresentationContext[id: 1
    result: 0 - acceptance
    ts: 1.2.840.10008.1.2 - Implicit VR Little Endian
  ]
]
13:12:56,166 DEBUG - FINDSCU->TEST(1): enter state: Sta6 - Association established and ready for data transfer
13:12:56,169 INFO  - FINDSCU->TEST(1) << 1:C-FIND-RQ[pcid=1, prior=0
  cuid=1.2.840.10008.5.1.4.1.2.2.1 - Study Root Query/Retrieve Information Model - FIND
  tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
13:12:56,193 DEBUG - FINDSCU->TEST(1) << 1:C-FIND-RQ Command:
(0000,0002) UI [1.2.840.10008.5.1.4.1.2.2.1] AffectedSOPClassUID
(0000,0100) US [32] CommandField
(0000,0110) US [1] MessageID
(0000,0700) US [0] Priority
(0000,0800) US [0] CommandDataSetType

13:12:56,195 DEBUG - FINDSCU->TEST(1) << 1:C-FIND-RQ Dataset:
(0008,0005) CS [ISO_IR 126] SpecificCharacterSet
(0008,0052) CS [STUDY] QueryRetrieveLevel
(0010,0010) PN [Διον*] PatientName

13:12:56,257 INFO  - FINDSCU->TEST(1) >> 1:C-FIND-RSP[pcid=1, status=ff00H
  cuid=1.2.840.10008.5.1.4.1.2.2.1 - Study Root Query/Retrieve Information Model - FIND
  tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
13:12:56,257 DEBUG - FINDSCU->TEST(1) >> 1:C-FIND-RSP Command:
(0000,0002) UI [1.2.840.10008.5.1.4.1.2.2.1] AffectedSOPClassUID
(0000,0100) US [32800] CommandField
(0000,0120) US [1] MessageIDBeingRespondedTo
(0000,0800) US [0] CommandDataSetType
(0000,0900) US [65280] Status

13:12:56,259 DEBUG - FINDSCU->TEST(1) >> 1:C-FIND-RSP Dataset:
(0008,0005) CS [ISO_IR 126] SpecificCharacterSet
(0008,0052) CS [STUDY] QueryRetrieveLevel
(0008,0054) AE [TEST] RetrieveAETitle
(0008,0056) CS [ONLINE] InstanceAvailability
(0008,0201) SH [-0400] TimezoneOffsetFromUTC
(0010,0010) PN [Διονυσιος] PatientName

13:12:56,259 INFO  - FINDSCU->TEST(1) >> 1:C-FIND-RSP[pcid=1, status=0H
  cuid=1.2.840.10008.5.1.4.1.2.2.1 - Study Root Query/Retrieve Information Model - FIND
  tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian]
13:12:56,259 DEBUG - FINDSCU->TEST(1) >> 1:C-FIND-RSP Command:
(0000,0002) UI [1.2.840.10008.5.1.4.1.2.2.1] AffectedSOPClassUID
(0000,0100) US [32800] CommandField
(0000,0120) US [1] MessageIDBeingRespondedTo
(0000,0800) US [257] CommandDataSetType
(0000,0900) US [0] Status

13:12:56,260 INFO  - FINDSCU->TEST(1) << A-RELEASE-RQ
13:12:56,260 DEBUG - FINDSCU->TEST(1): enter state: Sta7 - Awaiting A-RELEASE-RP PDU
13:12:56,260 INFO  - FINDSCU->TEST(1) >> A-RELEASE-RP
13:12:56,260 INFO  - FINDSCU->TEST(1): close Socket[addr=test-ng/192.168.2.121,port=1

Gunter Zeilinger

unread,
May 4, 2021, 7:44:58 AM5/4/21
to dcm4che
Also matching by Patient ID (with or without specifying  -m "SpecificCharacterSet=ISO_IR 126" works as expected:

$ findscu -c TEST@test-ng:11112  -m "SpecificCharacterSet=ISO_IR 126" -mPatientID=SCSGREEK -r PatientName | grep -A6 Dataset
13:43:53,912 DEBUG - FINDSCU->TEST(1) << 1:C-FIND-RQ Dataset:

(0008,0005) CS [ISO_IR 126] SpecificCharacterSet
(0008,0052) CS [STUDY] QueryRetrieveLevel
(0010,0010) PN [] PatientName
(0010,0020) LO [SCSGREEK] PatientID

13:43:53,924 INFO  - FINDSCU->TEST(1) >> 1:C-FIND-RSP[pcid=1, status=ff00H
--
13:43:53,926 DEBUG - FINDSCU->TEST(1) >> 1:C-FIND-RSP Dataset:

(0008,0005) CS [ISO_IR 126] SpecificCharacterSet
(0008,0052) CS [STUDY] QueryRetrieveLevel
(0008,0054) AE [TEST] RetrieveAETitle
(0008,0056) CS [ONLINE] InstanceAvailability
(0008,0201) SH [-0400] TimezoneOffsetFromUTC
(0010,0010) PN [Διονυσιος] PatientName

=======

$ findscu -c TEST@test-ng:11112 -mPatientID=SCSGREEK -r PatientName | grep -A6 Dataset
13:44:19,097 DEBUG - FINDSCU->TEST(1) << 1:C-FIND-RQ Dataset:
(0008,0052) CS [STUDY] QueryRetrieveLevel
(0010,0010) PN [] PatientName
(0010,0020) LO [SCSGREEK] PatientID

13:44:19,111 INFO  - FINDSCU->TEST(1) >> 1:C-FIND-RSP[pcid=1, status=ff00H

  cuid=1.2.840.10008.5.1.4.1.2.2.1 - Study Root Query/Retrieve Information Model - FIND
--
13:44:19,113 DEBUG - FINDSCU->TEST(1) >> 1:C-FIND-RSP Dataset:

(0008,0005) CS [ISO_IR 126] SpecificCharacterSet
(0008,0052) CS [STUDY] QueryRetrieveLevel
(0008,0054) AE [TEST] RetrieveAETitle
(0008,0056) CS [ONLINE] InstanceAvailability
(0008,0201) SH [-0400] TimezoneOffsetFromUTC
(0010,0010) PN [Διονυσιος] PatientName

harithacha...@gmail.com

unread,
May 4, 2021, 9:38:42 AM5/4/21
to dcm4che

C:\Users\320035705\Downloads\dcm4che-5.22.6-bin\dcm4che-5.22.6\bin>findscu -c scp@localhost:1112  -m "SpecificCharacterSet=ISO_IR 126" -m PatientName=Διον*
findscu: dcm2dcm
java.lang.IllegalArgumentException: dcm2dcm
        at org.dcm4che3.tool.common.CLIUtils.toTag(CLIUtils.java:689)
        at org.dcm4che3.tool.common.CLIUtils.toTags(CLIUtils.java:679)
        at org.dcm4che3.tool.common.CLIUtils.addAttributes(CLIUtils.java:807)
        at org.dcm4che3.tool.findscu.FindSCU.configureKeys(FindSCU.java:423)
        at org.dcm4che3.tool.findscu.FindSCU.main(FindSCU.java:354)


On exceuting the same command, getting this error? am i doing something wrong? please help

harithacha...@gmail.com

unread,
May 4, 2021, 9:51:33 AM5/4/21
to dcm4che
findscu -c scp@localhost:1112 -m "SpecificCharacterSet=ISO_IR 126" -m PatientName=Ακρατόπουλος^Κωνσταντίνος^Ιωάννης^Πάγκας
19:18:09,035 INFO  - Initiate connection from 0.0.0.0/0.0.0.0:0 to localhost:1112
19:18:09,053 INFO  - Established connection Socket[addr=localhost/127.0.0.1,port=1112,localport=63610]
19:18:09,069 DEBUG - /127.0.0.1:63610->localhost/127.0.0.1:1112(1): enter state: Sta4 - Awaiting transport connection opening to complete
19:18:09,070 INFO  - FINDSCU->scp(1) << A-ASSOCIATE-RQ
19:18:09,079 DEBUG - A-ASSOCIATE-RQ[
  calledAET: scp
  callingAET: FINDSCU
  applicationContext: 1.2.840.10008.3.1.1.1 - DICOM Application Context Name
  implClassUID: 1.2.40.0.13.1.3
  implVersionName: dcm4che-5.13.2
  maxPDULength: 16378
  maxOpsInvoked/maxOpsPerformed: 0/0
  PresentationContext[id: 1
    as: 1.2.840.10008.5.1.4.1.2.2.1 - Study Root Query/Retrieve Information Model - FIND
    ts: 1.2.840.10008.1.2 - Implicit VR Little Endian
    ts: 1.2.840.10008.1.2.1 - Explicit VR Little Endian
    ts: 1.2.840.10008.1.2.2 - Explicit VR Big Endian (Retired)
  ]
]
19:18:09,079 DEBUG - FINDSCU->scp(1): enter state: Sta5 - Awaiting A-ASSOCIATE-AC or A-ASSOCIATE-RJ PDU
19:18:09,087 INFO  - FINDSCU->scp(1) >> A-ASSOCIATE-AC
19:18:09,088 DEBUG - A-ASSOCIATE-AC[
  calledAET: scp
  callingAET: FINDSCU
  applicationContext: 1.2.840.10008.3.1.1.1 - DICOM Application Context Name
  implClassUID: 1.2.826.0.1.3680043.2.1545.2
  implVersionName: 3.0.0
  maxPDULength: 16384
  maxOpsInvoked/maxOpsPerformed: 1/1
  PresentationContext[id: 1
    result: 0 - acceptance
    ts: 1.2.840.10008.1.2 - Implicit VR Little Endian
  ]
]
19:18:09,088 DEBUG - FINDSCU->scp(1): enter state: Sta6 - Association established and ready for data transfer
19:18:09,098 INFO  - FINDSCU->scp(1) << 1:C-FIND-RQ[pcid=1, prior=0
  cuid=1.2.840.10008.5.1.4.1.2.2.1 - Study Root Query/Retrieve Information Model - FIND
  tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian
19:18:09,120 DEBUG - Command:
(0000,0002) UI [1.2.840.10008.5.1.4.1.2.2.1] AffectedSOPClassUID
(0000,0100) US [32] CommandField
(0000,0110) US [1] MessageID
(0000,0700) US [0] Priority
(0000,0800) US [0] CommandDataSetType

19:18:09,121 DEBUG - Dataset:
(0008,0005) CS [ISO_IR 126] SpecificCharacterSet
(0008,0052) CS [STUDY] QueryRetrieveLevel
(0010,0010) PN [???at?p????????sta?t???????????????a?] PatientName

19:18:09,249 INFO  - FINDSCU->scp(1) >> 1:C-FIND-RSP[pcid=1, status=0H
  cuid=1.2.840.10008.5.1.4.1.2.2.1 - Study Root Query/Retrieve Information Model - FIND
  tsuid=1.2.840.10008.1.2 - Implicit VR Little Endian
19:18:09,250 DEBUG - Command:
(0000,0002) UI [1.2.840.10008.5.1.4.1.2.2.1] AffectedSOPClassUID
(0000,0100) US [32800] CommandField
(0000,0120) US [1] MessageIDBeingRespondedTo
(0000,0800) US [257] CommandDataSetType
(0000,0900) US [0] Status

19:18:09,262 INFO  - FINDSCU->scp(1) << A-RELEASE-RQ
19:18:09,262 DEBUG - FINDSCU->scp(1): enter state: Sta7 - Awaiting A-RELEASE-RP PDU
19:18:09,264 INFO  - FINDSCU->scp(1) >> A-RELEASE-RP
19:18:09,270 INFO  - FINDSCU->scp(1): close Socket[addr=localhost/127.0.0.1,port=1112,localport=63610]
19:18:09,273 DEBUG - FINDSCU->scp(1): enter state: Sta1 - Idle

Not able to query any studies.


in the SCP, the characterset is ISO_IR 126 and patient name is set to Ακρατόπουλος^Κωνσταντίνος^Ιωάννης^Πάγκας. in dicom files.

will this suffice or should i do any other change?

Please help.

Gunter Zeilinger

unread,
May 4, 2021, 10:08:50 AM5/4/21
to dcm4che
C:\Users\320035705\Downloads\dcm4che-5.22.6-bin\dcm4che-5.22.6\bin>findscu -c scp@localhost:1112  -m "SpecificCharacterSet=ISO_IR 126" -m PatientName=Διον*
findscu: dcm2dcm
java.lang.IllegalArgumentException: dcm2dcm
        at org.dcm4che3.tool.common.CLIUtils.toTag(CLIUtils.java:689)
        at org.dcm4che3.tool.common.CLIUtils.toTags(CLIUtils.java:679)
        at org.dcm4che3.tool.common.CLIUtils.addAttributes(CLIUtils.java:807)
        at org.dcm4che3.tool.findscu.FindSCU.configureKeys(FindSCU.java:423)
        at org.dcm4che3.tool.findscu.FindSCU.main(FindSCU.java:354)

may be caused by Windows command interpreter. Edit the first line of bin/findscu.bat to

@echo on

to see, what it actually pass to the java application. You may need to quote "PatientName=Διον*".

(0010,0010) PN [???at?p????????sta?t???????????????a?] PatientName

may be caused by the character set of your console.


Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
Message has been deleted
0 new messages