dcmqr retrieve problem

817 views
Skip to first unread message

Marko

unread,
Jan 19, 2017, 11:17:45 AM1/19/17
to dcm4che
Hello,

I'm having a prblem getting some studies from a pacs. I don't have access to the pacs so I can't see the errors there.
99% of the studies are retrievable bu some not.

Here is an example that fails to retrieve (but the query is successful)


$dcmqr A...@1.2.3.4:104 -qStudyDate=20170118 -qStudyInstanceUID=1.2.276.0.37.1.164.20094528621 -r ModalitiesInStudy -r StudyDescription -r Modality -r PatientName -r StudyDate -r StudyID -L dcm -cget -cstore MR CR CT US NM PET SC XA XRF DX MG PR KO SR  -cstoredest ./tmp/

16:53:51,775 INFO   - Association(1) initiated Socket[addr=/1.2.3.4,port=104,localport=56041]
16:53:51,775 INFO   - AET(1): A-ASSOCIATE-RQ AET << dcm
16:53:51,782 INFO   - AET(1): A-ASSOCIATE-AC dcm >> AET
16:53:51,782 INFO   - Connected to A...@1.2.3.4:104 in 0.023 s
16:53:51,812 INFO   - Send Query Request using 1.2.840.10008.5.1.4.1.2.2.1/Study Root Query/Retrieve Information Model - FIND:
(0008,0020) DA #8 [20170118] Study Date
(0008,0030) TM #0 [] Study Time
(0008,0050) SH #0 [] Accession Number
(0008,0052) CS #6 [STUDY] Query/Retrieve Level
(0008,0060) CS #0 [] Modality
(0008,0061) CS #0 [] Modalities in Study
(0008,1030) LO #0 [] Study Description
(0010,0010) PN #0 [] Patient?s Name
(0020,000D) UI #30 [1.2.276.0.37.1.164.20094528621] Study Instance UID
(0020,0010) SH #0 [] Study ID
(0020,1206) IS #0 [] Number of Study Related Series
(0020,1208) IS #0 [] Number of Study Related Instances

16:53:51,815 INFO   - AET(1) << 1:C-FIND-RQ[pcid=13, prior=0
cuid=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.1/Explicit VR Little Endian]
16:53:51,837 INFO   - AET(1) >> 1:C-FIND-RSP[pcid=13, status=ff00H
cuid=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.1/Explicit VR Little Endian]
16:53:51,838 INFO   - Query Response #1:
(0008,0020) DA #8 [20170118] Study Date
(0008,0030) TM #6 [193229] Study Time
(0008,0050) SH #10 [U-ID28621] Accession Number
(0008,0052) CS #6 [STUDY] Query/Retrieve Level
(0008,0054) AE #10 [AET] Retrieve AE Title
(0008,0056) CS #6 [ONLINE] Instance Availability
(0008,0060) CS #0 [] Modality
(0008,0061) CS #2 [SR] Modalities in Study
(0008,1030) LO #24 [MR angio ] Study Description
(0010,0010) PN #20 [PATIENT, NAME] Patient?s Name
(0020,000D) UI #30 [1.2.276.0.37.1.164.20094528621] Study Instance UID
(0020,0010) SH #6 [37347] Study ID
(0020,1206) IS #2 [1] Number of Study Related Series
(0020,1208) IS #2 [7] Number of Study Related Instances

16:53:51,873 INFO   - AET(1) >> 1:C-FIND-RSP[pcid=13, status=0H
cuid=1.2.840.10008.5.1.4.1.2.2.1/Study Root Query/Retrieve Information Model - FIND]
16:53:51,873 INFO   - Received 1 matching entries in 0.091 s
16:53:51,875 INFO   - Send Retrieve Request using 1.2.840.10008.5.1.4.1.2.2.3/Study Root Query/Retrieve Information Model - GET:
(0008,0052) CS #6 [STUDY] Query/Retrieve Level
(0020,000D) UI #30 [1.2.276.0.37.1.164.20094528621] Study Instance UID

16:53:51,875 INFO   - AET(1) << 2:C-GET-RQ[pcid=19, prior=0
cuid=1.2.840.10008.5.1.4.1.2.2.3/Study Root Query/Retrieve Information Model - GET
ts=1.2.840.10008.1.2.1/Explicit VR Little Endian]
16:53:51,899 INFO   - AET(1) >> 2:C-GET-RSP[pcid=19, remaining=6, completed=0, failed=1, warning=0, status=ff00H
cuid=1.2.840.10008.5.1.4.1.2.2.3/Study Root Query/Retrieve Information Model - GET]
16:53:51,937 INFO   - AET(1) >> 2:C-GET-RSP[pcid=19, remaining=5, completed=0, failed=2, warning=0, status=ff00H
cuid=1.2.840.10008.5.1.4.1.2.2.3/Study Root Query/Retrieve Information Model - GET]
16:53:51,937 INFO   - AET(1) >> 2:C-GET-RSP[pcid=19, remaining=4, completed=0, failed=3, warning=0, status=ff00H
cuid=1.2.840.10008.5.1.4.1.2.2.3/Study Root Query/Retrieve Information Model - GET]
16:53:51,946 INFO   - AET(1) >> 2:C-GET-RSP[pcid=19, remaining=3, completed=0, failed=4, warning=0, status=ff00H
cuid=1.2.840.10008.5.1.4.1.2.2.3/Study Root Query/Retrieve Information Model - GET]
16:53:51,961 INFO   - AET(1) >> 2:C-GET-RSP[pcid=19, remaining=2, completed=0, failed=5, warning=0, status=ff00H
cuid=1.2.840.10008.5.1.4.1.2.2.3/Study Root Query/Retrieve Information Model - GET]
16:53:51,977 INFO   - AET(1) >> 2:C-GET-RSP[pcid=19, remaining=1, completed=0, failed=6, warning=0, status=ff00H
cuid=1.2.840.10008.5.1.4.1.2.2.3/Study Root Query/Retrieve Information Model - GET]
16:53:51,994 INFO   - AET(1) >> 2:C-GET-RSP[pcid=19, remaining=0, completed=0, failed=7, warning=0, status=ff00H
cuid=1.2.840.10008.5.1.4.1.2.2.3/Study Root Query/Retrieve Information Model - GET]
16:53:51,995 INFO   - AET(1) >> 2:C-GET-RSP[pcid=19, remaining=null, completed=null, failed=null, warning=null, status=b000H
cuid=1.2.840.10008.5.1.4.1.2.2.3/Study Root Query/Retrieve Information Model - GET]
16:53:51,995 INFO   - Retrieved 0 objects (warning: 0, failed: 0) in 0.122s
16:53:51,995 INFO   - AET(1) << A-RELEASE-RQ
16:53:51,996 INFO   - AET(1) >> A-RELEASE-RP
16:53:51,996 INFO   - Released connection to A...@1.2.3.4:104
16:53:51,996 INFO   - AET(1): close Socket[addr=/1.2.3.4,port=104,localport=56041]

Gunter Zeilinger

unread,
Jan 19, 2017, 11:23:55 AM1/19/17
to dcm...@googlegroups.com
You may have not offered the necessary Storage SOP Classes in A-ASSOCIATION RQ, to retrieve the requested objects.

--
You received this message because you are subscribed to the Google Groups "dcm4che" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dcm4che+unsubscribe@googlegroups.com.
To post to this group, send email to dcm...@googlegroups.com.
Visit this group at https://groups.google.com/group/dcm4che.
For more options, visit https://groups.google.com/d/optout.

Marko

unread,
Jan 19, 2017, 11:29:24 AM1/19/17
to dcm4che
is there a way to find out which storage SOP class to use by quering the pacs?
To unsubscribe from this group and stop receiving emails from it, send an email to dcm4che+u...@googlegroups.com.

Gunter Zeilinger

unread,
Jan 19, 2017, 2:34:06 PM1/19/17
to dcm...@googlegroups.com
If the Q/R SCP supports to return SOP Classes in Study (0008,0062), you can already get it by a query on Study level. Otherwise you have to query on Composite Object Instance Level with the SOP Class UID (0008,0016) as return key.

To unsubscribe from this group and stop receiving emails from it, send an email to dcm4che+unsubscribe@googlegroups.com.

Marko

unread,
Jan 19, 2017, 4:29:04 PM1/19/17
to dcm4che
Thank you!

At the study level I didn't get any SOP IDs however at the instance level I got the SOPClassUID which I then used it for the retrieve.

Marko

unread,
Jan 23, 2017, 10:46:28 AM1/23/17
to dcm4che
It seems there is a problem defining more than 7 or 8 cstore SOPs. the queries fail as if it cannot parse more than 8 arguments in the cstore option.

Marko

unread,
Jan 24, 2017, 3:30:33 AM1/24/17
to dcm4che
There is still an issue with just a few studies. Thanks to gunterze I've find a way to put the correct cstore SOP class in the query, however here is an example of a retrieve still failing:

$ dcmqr PA...@1.2.3.4:104  -qStudyInstanceUID=1.3.12.2.1107.5.3.7.0.1.20170118110943  -r StudyDescription -r Modality -r PatientName -r StudyDate -r StudyID  -L dcm -cget -cstore 1.2.840.10008.5.1.4.1.1.12.2  -cstoredest ./tmp1

09:27:16,939 INFO   - Association(1) initiated Socket[addr=/1.2.3.4,port=104,localport=44943]
09:27:16,940 INFO   - PACS1(1): A-ASSOCIATE-RQ PACS1 << dcm
09:27:16,947 INFO   - PACS1(1): A-ASSOCIATE-AC dcm >> PACS1
09:27:16,948 INFO   - Connected to PA...@1.2.3.4:104 in 0.023 s
09:27:16,977 INFO   - Send Query Request using 1.2.840.10008.5.1.4.1.2.2.1/Study Root Query/Retrieve Information Model - FIND:
(0008,0020) DA #0 [] Study Date
(0008,0030) TM #0 [] Study Time
(0008,0050) SH #0 [] Accession Number
(0008,0052) CS #6 [STUDY] Query/Retrieve Level
(0008,0060) CS #0 [] Modality
(0008,1030) LO #0 [] Study Description
(0010,0010) PN #0 [] Patient?s Name
(0020,000D) UI #38 [1.3.12.2.1107.5.3.7.0.1.20170118110943] Study Instance UID
(0020,0010) SH #0 [] Study ID
(0020,1206) IS #0 [] Number of Study Related Series
(0020,1208) IS #0 [] Number of Study Related Instances

09:27:16,979 INFO   - PACS1(1) << 1:C-FIND-RQ[pcid=15, prior=0
cuid=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.1/Explicit VR Little Endian]
09:27:17,004 INFO   - PACS1(1) >> 1:C-FIND-RSP[pcid=15, status=ff00H
cuid=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.1/Explicit VR Little Endian]
09:27:17,004 INFO   - Query Response #1:
(0008,0020) DA #8 [20170118] Study Date
(0008,0030) TM #6 [113623] Study Time
(0008,0050) SH #0 [] Accession Number
(0008,0052) CS #6 [STUDY] Query/Retrieve Level
(0008,0054) AE #10 [PACS1] Retrieve AE Title
(0008,0056) CS #6 [ONLINE] Instance Availability
(0008,0060) CS #0 [] Modality
(0008,1030) LO #6 [HEART] Study Description
(0010,0010) PN #12 [TEST PATIENT] Patient?s Name
(0020,000D) UI #38 [1.3.12.2.1107.5.3.7.0.1.20170118110943] Study Instance UID
(0020,0010) SH #0 [] Study ID
(0020,1206) IS #2 [9] Number of Study Related Series
(0020,1208) IS #2 [9] Number of Study Related Instances

09:27:17,039 INFO   - PACS1(1) >> 1:C-FIND-RSP[pcid=15, status=0H
cuid=1.2.840.10008.5.1.4.1.2.2.1/Study Root Query/Retrieve Information Model - FIND]
09:27:17,039 INFO   - Received 1 matching entries in 0.091 s
09:27:17,041 INFO   - Send Retrieve Request using 1.2.840.10008.5.1.4.1.2.2.3/Study Root Query/Retrieve Information Model - GET:
(0008,0052) CS #6 [STUDY] Query/Retrieve Level
(0020,000D) UI #38 [1.3.12.2.1107.5.3.7.0.1.20170118110943] Study Instance UID

09:27:17,041 INFO   - PACS1(1) << 2:C-GET-RQ[pcid=21, prior=0
cuid=1.2.840.10008.5.1.4.1.2.2.3/Study Root Query/Retrieve Information Model - GET
ts=1.2.840.10008.1.2.1/Explicit VR Little Endian]
09:27:17,065 INFO   - PACS1(1) >> 2:C-GET-RSP[pcid=21, remaining=8, completed=0, failed=1, warning=0, status=ff00H
cuid=1.2.840.10008.5.1.4.1.2.2.3/Study Root Query/Retrieve Information Model - GET]
09:27:17,103 INFO   - PACS1(1) >> 2:C-GET-RSP[pcid=21, remaining=7, completed=0, failed=2, warning=0, status=ff00H
cuid=1.2.840.10008.5.1.4.1.2.2.3/Study Root Query/Retrieve Information Model - GET]
09:27:17,104 INFO   - PACS1(1) >> 2:C-GET-RSP[pcid=21, remaining=6, completed=0, failed=3, warning=0, status=ff00H
cuid=1.2.840.10008.5.1.4.1.2.2.3/Study Root Query/Retrieve Information Model - GET]
09:27:17,112 INFO   - PACS1(1) >> 2:C-GET-RSP[pcid=21, remaining=5, completed=0, failed=4, warning=0, status=ff00H
cuid=1.2.840.10008.5.1.4.1.2.2.3/Study Root Query/Retrieve Information Model - GET]
09:27:17,128 INFO   - PACS1(1) >> 2:C-GET-RSP[pcid=21, remaining=4, completed=0, failed=5, warning=0, status=ff00H
cuid=1.2.840.10008.5.1.4.1.2.2.3/Study Root Query/Retrieve Information Model - GET]
09:27:17,175 INFO   - PACS1(1) >> 29592:C-STORE-RQ[pcid=39, prior=0
cuid=1.2.840.10008.5.1.4.1.1.12.2/X-Ray Radiofluoroscopic Image Storage
iuid=1.3.12.2.1107.5.3.7.0.4.201701181149560985
ts=1.2.840.10008.1.2.4.90/JPEG 2000 Image Compression (Lossless Only)]
09:27:17,571 INFO   - PACS1(1) << 29592:C-STORE-RSP[pcid=39, status=0H]
09:27:17,573 INFO   - PACS1(1) >> 2:C-GET-RSP[pcid=21, remaining=3, completed=1, failed=5, warning=0, status=ff00H
cuid=1.2.840.10008.5.1.4.1.2.2.3/Study Root Query/Retrieve Information Model - GET]
09:27:17,612 INFO   - PACS1(1) >> 29593:C-STORE-RQ[pcid=39, prior=0
cuid=1.2.840.10008.5.1.4.1.1.12.2/X-Ray Radiofluoroscopic Image Storage
iuid=1.3.12.2.1107.5.3.7.0.4.201701181150450469
ts=1.2.840.10008.1.2.4.90/JPEG 2000 Image Compression (Lossless Only)]
09:27:17,669 INFO   - PACS1(1) << 29593:C-STORE-RSP[pcid=39, status=0H]
09:27:17,670 INFO   - PACS1(1) >> 2:C-GET-RSP[pcid=21, remaining=2, completed=2, failed=5, warning=0, status=ff00H
cuid=1.2.840.10008.5.1.4.1.2.2.3/Study Root Query/Retrieve Information Model - GET]
09:27:17,705 INFO   - PACS1(1) >> 29594:C-STORE-RQ[pcid=39, prior=0
cuid=1.2.840.10008.5.1.4.1.1.12.2/X-Ray Radiofluoroscopic Image Storage
iuid=1.3.12.2.1107.5.3.7.0.4.201701181157450844
ts=1.2.840.10008.1.2.4.90/JPEG 2000 Image Compression (Lossless Only)]
09:27:17,736 INFO   - PACS1(1) << 29594:C-STORE-RSP[pcid=39, status=0H]
09:27:17,737 INFO   - PACS1(1) >> 2:C-GET-RSP[pcid=21, remaining=1, completed=3, failed=5, warning=0, status=ff00H
cuid=1.2.840.10008.5.1.4.1.2.2.3/Study Root Query/Retrieve Information Model - GET]
09:27:17,783 INFO   - PACS1(1) >> 29595:C-STORE-RQ[pcid=39, prior=0
cuid=1.2.840.10008.5.1.4.1.1.12.2/X-Ray Radiofluoroscopic Image Storage
iuid=1.3.12.2.1107.5.3.7.0.4.201701181159240532
ts=1.2.840.10008.1.2.4.90/JPEG 2000 Image Compression (Lossless Only)]
09:27:17,848 INFO   - PACS1(1) << 29595:C-STORE-RSP[pcid=39, status=0H]
09:27:17,849 INFO   - PACS1(1) >> 2:C-GET-RSP[pcid=21, remaining=0, completed=4, failed=5, warning=0, status=ff00H
cuid=1.2.840.10008.5.1.4.1.2.2.3/Study Root Query/Retrieve Information Model - GET]
09:27:17,888 INFO   - PACS1(1) >> 2:C-GET-RSP[pcid=21, remaining=null, completed=null, failed=null, warning=null, status=b000H
cuid=1.2.840.10008.5.1.4.1.2.2.3/Study Root Query/Retrieve Information Model - GET]
09:27:17,888 INFO   - Retrieved 0 objects (warning: 0, failed: 0) in 0.849s
09:27:17,888 INFO   - PACS1(1) << A-RELEASE-RQ
09:27:17,889 INFO   - PACS1(1) >> A-RELEASE-RP
09:27:17,889 INFO   - Released connection to PA...@1.2.3.4:104
09:27:17,889 INFO   - PACS1(1): close Socket[addr=/1.2.3.4,port=104,localport=44943]

Gunter Zeilinger

unread,
Jan 24, 2017, 3:47:52 AM1/24/17
to dcm...@googlegroups.com
Are you sure that the failing instances to retrieve are really of SOP Class 1.2.840.10008.5.1.4.1.1.12.2/X-Ray Radiofluoroscopic Image Storage ?

--
You received this message because you are subscribed to the Google Groups "dcm4che" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dcm4che+unsubscribe@googlegroups.com.

Marko

unread,
Jan 24, 2017, 4:03:51 AM1/24/17
to dcm4che
yes, if I query at instance level (dcmqr -I) that's the only SOP Class that I get and then I use it for the cstore
To unsubscribe from this group and stop receiving emails from it, send an email to dcm4che+u...@googlegroups.com.

Gunter Zeilinger

unread,
Jan 24, 2017, 4:18:35 AM1/24/17
to dcm...@googlegroups.com
Can you add an AET/host/port entry in the archive configuration, so you can use C-MOVE instead C-GET? Then you will see in the A-ASSOCIATE-RQ from the archive what Presentation Contexts are needed for the retrieve.

To unsubscribe from this group and stop receiving emails from it, send an email to dcm4che+unsubscribe@googlegroups.com.

Marko

unread,
Jan 24, 2017, 4:20:08 AM1/24/17
to dcm4che
here is the command I use to find out the SOP Class:

dcmqr PACS1@1.2.3.4:104  -qStudyInstanceUID=1.3.12.2.1107.5.3.7.0.1.20170118110943 -r StudyDescription -r Modality -r PatientName -r StudyDate -r StudyID -r SOPInstanceUID -r MediaStorageSOPInstanceUID -r ReferencedSOPInstanceUIDInFile -r FailedSOPInstanceUIDList -r ReferencedSOPInstanceUID -r SOPClassesInStudy -r SOPClassUID -r RelatedGeneralSOPClassUID -r ConceptNameCodeSequence -L dcm -cget -retall -cstoredest ./tmp1 -I | grep SOP | grep Class | sed -e 's/^.*\[//' -e 's/\].*//' | sort | uniq


That should spit out the SOP Classes, and in the case of this particular study it only gives: 1.2.840.10008.5.1.4.1.1.12.2


On Tuesday, January 24, 2017 at 9:47:52 AM UTC+1, gunterze wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to dcm4che+u...@googlegroups.com.

Marko

unread,
Jan 24, 2017, 4:22:57 AM1/24/17
to dcm4che
Unfortunately I can't add the AET/host/port on the remote PACS. This is why I'm trying the C-GET and dcmqr to retrieve stuff from it.

Marko

unread,
Jan 24, 2017, 4:26:14 AM1/24/17
to dcm4che
I have now written a script that tries all the SOPs listed here http://www.dicomlibrary.com/dicom/sop/  one by one to see if any succeeds. But I don't know if that is a comprehensive list


On Tuesday, January 24, 2017 at 10:18:35 AM UTC+1, gunterze wrote:

Gunter Zeilinger

unread,
Jan 24, 2017, 4:30:57 AM1/24/17
to dcm...@googlegroups.com
Perhaps some of the images are archived with a Transfer Syntax UID which is not offered in a presentation context in the A-ASSOCIATE-RQ and the archive does not support to transcode that images to an offered transfer syntax.
Reply all
Reply to author
Forward
0 new messages