bioinformatics-ua / dicoogle

Dicoogle - Open Source PACS
http://www.dicoogle.com/
GNU General Public License v3.0
450 stars 133 forks source link

Unable to Retrieve from Dicoogle through 3D Slicer #466

Closed Acinate closed 3 years ago

Acinate commented 3 years ago

I have created a custom storage plugin that interacts with AWS S3. I'm able to successfully Index these DICOMS through dicoogle, and I'm also able to Query them from 3D slicer as seen below:

image

However, when I attempt to Retrieve these DICOMS to download them into 3D slicer, I get an error in CMoveServiceSCP.java

INFO  net.Association (Association.java:147) - Association(11) accepted Socket[addr=/127.0.0.1,port=59037,localport=1045]
INFO  net.Association (Association.java:964) - Association(11): A-ASSOCIATE-RQ CTKSTORE >> DICOOGLE-STORAGE
INFO  net.PDUEncoder (PDUEncoder.java:156) - CTKSTORE(11): A-ASSOCIATE-AC DICOOGLE-STORAGE << CTKSTORE
INFO  net.PDUDecoder (PDUDecoder.java:515) - CTKSTORE(11) >> 1:C-MOVE-RQ[pcid=1, aet=CTKSTORE/?, prior=0
    cuid=1.2.840.10008.5.1.4.1.2.2.2/Study Root Query/Retrieve Information Model - MOVE
    ts=1.2.840.10008.1.2/Implicit VR Little Endian]
INFO  queryretrieve.CMoveServiceSCP (CMoveServiceSCP.java:95) - Client association with CTKSTORE is permitted!
29
INFO  server.SearchDicomResult (SearchDicomResult.java:94) - QUERY: StudyInstanceUID:1.2.840.113745.101000.1008000.38446.6272.7138759
INFO  server.SearchDicomResult (SearchDicomResult.java:95) - QUERYLEVEL: IMAGE
INFO  lucene.LuceneQuery (LuceneQuery.java:119) - Finished opening result stream, Query: 0,1,StudyInstanceUID:1.2.840.113745.101000.1008000.38446.6272.7138759
Destination: CTKSTORE
Entered Retrieving: s3://DICOMS/FELIX/IM-0001-0074.dcmfe2f32c2-0564-45a2-9aa7-6c71c6a6913d.dcm
Plkugin: movora.S3StoragePlugin@4fe36100
rui.toString: movora.S3StoragePlugin@4fe36100
Retrieving: s3://DICOMS/FELIX/IM-0001-0074.dcmfe2f32c2-0564-45a2-9aa7-6c71c6a6913d.dcm
INFO  utils.S3Service (S3Service.java:46) - Retrieving S3 objects
INFO  utils.S3Service (S3Service.java:77) - Getting input stream
.Entered Retrieving: s3://DICOMS/FELIX/IM-0001-0075.dcm102c269a-fea2-4006-a8b5-b44abef428e8.dcm
Plkugin: movora.S3StoragePlugin@4fe36100
rui.toString: movora.S3StoragePlugin@4fe36100
Retrieving: s3://DICOMS/FELIX/IM-0001-0075.dcm102c269a-fea2-4006-a8b5-b44abef428e8.dcm
INFO  utils.S3Service (S3Service.java:46) - Retrieving S3 objects
INFO  utils.S3Service (S3Service.java:77) - Getting input stream
.Entered Retrieving: s3://DICOMS/FELIX/IM-0001-0075.dcm607a5bb9-1ca5-4c85-83ef-8b3d3c6f9de0.dcm
Plkugin: movora.S3StoragePlugin@4fe36100
rui.toString: movora.S3StoragePlugin@4fe36100
Retrieving: s3://DICOMS/FELIX/IM-0001-0075.dcm607a5bb9-1ca5-4c85-83ef-8b3d3c6f9de0.dcm
INFO  utils.S3Service (S3Service.java:46) - Retrieving S3 objects
INFO  utils.S3Service (S3Service.java:77) - Getting input stream
.Entered Retrieving: s3://DICOMS/FELIX/IM-0001-0075.dcmfaf20448-a0ee-46ff-9d3e-f0280bbefcce.dcm
Plkugin: movora.S3StoragePlugin@4fe36100
rui.toString: movora.S3StoragePlugin@4fe36100
Retrieving: s3://DICOMS/FELIX/IM-0001-0075.dcmfaf20448-a0ee-46ff-9d3e-f0280bbefcce.dcm
INFO  utils.S3Service (S3Service.java:46) - Retrieving S3 objects
INFO  utils.S3Service (S3Service.java:77) - Getting input stream
.Entered Retrieving: s3://DICOMS/FELIX/IM-0001-0076.dcm2b9a5f98-1f42-4698-be6f-e4edd0653dce.dcm
Plkugin: movora.S3StoragePlugin@4fe36100
rui.toString: movora.S3StoragePlugin@4fe36100
Retrieving: s3://DICOMS/FELIX/IM-0001-0076.dcm2b9a5f98-1f42-4698-be6f-e4edd0653dce.dcm
INFO  utils.S3Service (S3Service.java:46) - Retrieving S3 objects
INFO  utils.S3Service (S3Service.java:77) - Getting input stream
.Entered Retrieving: s3://DICOMS/FELIX/IM-0001-0076.dcm9b205fe0-f50f-4b20-9594-ea06651d04b0.dcm
Plkugin: movora.S3StoragePlugin@4fe36100
rui.toString: movora.S3StoragePlugin@4fe36100
Retrieving: s3://DICOMS/FELIX/IM-0001-0076.dcm9b205fe0-f50f-4b20-9594-ea06651d04b0.dcm
INFO  utils.S3Service (S3Service.java:46) - Retrieving S3 objects
INFO  utils.S3Service (S3Service.java:77) - Getting input stream
.ERROR queryretrieve.CMoveServiceSCP (CMoveServiceSCP.java:226) - Error Sending files to Storage Server! 
java.net.ConnectException: Connection refused: no further information
    at java.base/sun.nio.ch.Net.pollConnect(Native Method) ~[?:?]
    at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:669) ~[?:?]
    at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:542) ~[?:?]
    at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:597) ~[?:?]
    at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:333) ~[?:?]
    at java.base/java.net.Socket.connect(Socket.java:645) ~[?:?]
    at org.dcm4che2.net.NetworkConnection.connect(NetworkConnection.java:569) ~[dcm4che-net-2.0.29.jar:2.0.29]
    at org.dcm4che2.net.NetworkApplicationEntity.connect(NetworkApplicationEntity.java:963) ~[dcm4che-net-2.0.29.jar:2.0.29]
    at org.dcm4che2.net.NetworkApplicationEntity.connect(NetworkApplicationEntity.java:843) ~[dcm4che-net-2.0.29.jar:2.0.29]
    at pt.ua.dicoogle.server.queryretrieve.DcmSndV2.open(DcmSndV2.java:546) ~[classes/:?]
    at pt.ua.dicoogle.server.queryretrieve.CallDCMSend.<init>(CallDCMSend.java:109) ~[classes/:?]
    at pt.ua.dicoogle.server.queryretrieve.CMoveServiceSCP.doCMove(CMoveServiceSCP.java:224) [classes/:?]
    at pt.ua.dicoogle.server.queryretrieve.CMoveService.cmove(CMoveService.java:59) [classes/:?]
    at org.dcm4che2.net.DicomServiceRegistry.process(DicomServiceRegistry.java:255) [dcm4che-net-2.0.29.jar:2.0.29]
    at org.dcm4che2.net.NetworkApplicationEntity.perform(NetworkApplicationEntity.java:1185) [dcm4che-net-2.0.29.jar:2.0.29]
    at org.dcm4che2.net.Association.onDimseRQ(Association.java:1010) [dcm4che-net-2.0.29.jar:2.0.29]
    at org.dcm4che2.net.PDUDecoder.decodeDIMSE(PDUDecoder.java:530) [dcm4che-net-2.0.29.jar:2.0.29]
    at org.dcm4che2.net.Association.onPDataTF(Association.java:987) [dcm4che-net-2.0.29.jar:2.0.29]
    at org.dcm4che2.net.State$Sta6.receivedPDataTF(State.java:239) [dcm4che-net-2.0.29.jar:2.0.29]
    at org.dcm4che2.net.Association.receivedPDataTF(Association.java:983) [dcm4che-net-2.0.29.jar:2.0.29]
    at org.dcm4che2.net.PDUDecoder.nextPDU(PDUDecoder.java:231) [dcm4che-net-2.0.29.jar:2.0.29]
    at org.dcm4che2.net.Association.run(Association.java:882) [dcm4che-net-2.0.29.jar:2.0.29]
    at java.base/java.lang.Thread.run(Thread.java:831) [?:?]
INFO  net.PDUEncoder (PDUEncoder.java:379) - CTKSTORE(11) << 1:C-MOVE-RSP[pcid=1, remaining=null, completed=null, failed=null, warning=null, status=0H
    cuid=1.2.840.10008.5.1.4.1.2.2.2/Study Root Query/Retrieve Information Model - MOVE]
INFO  net.Association (Association.java:991) - CTKSTORE(11) >> A-RELEASE-RQ
INFO  net.PDUEncoder (PDUEncoder.java:120) - CTKSTORE(11) << A-RELEASE-RP
INFO  net.Association (Association.java:916) - CTKSTORE(11): close Socket[addr=/127.0.0.1,port=59037,localport=1045]

Here is what my Storage Servers looks like (its empty). I'm not sure if I should be doing something here.

image

Acinate commented 3 years ago

OH I managed to fix it! That java error means there was no service listening. So I looked around the 3D Slicer settings and managed to enable listening.

image

Also added the AETitle and Port from 3D Slicer Query/Retrieve window

image