how to fetch dcm files from remote DCM4CHE and process them?

1,905 views
Skip to first unread message

norbi771

unread,
Dec 29, 2014, 6:22:05 PM12/29/14
to dcm...@googlegroups.com
Hi,
I am trying to manipulate dcm data from my java app, based on dcm4che-toolkit

1. I was able to send data to dcm4che using "modality" script
d:\dcm4che-3.3.3\bin\modality -b SEN...@10.10.10.1:11115 -c DCM4...@10.10.10.67:11112 DCM-Samples-folder
When the operation is completed the dcm files are available via dcm4chee-web3 console, which I believe is OK.
The question is if using "modality" Is that right approach and good starting point for doing the same in my java app following the code from "modality"?
My need is to just store dcm files on a dicom "node".

2. I was able to receive data via the following command:
a). have a "dicom listener" dcmqrscp -b A...@10.10.10.1:11116 --dicomdir D:\tmp\dicom\DICOMDIR
b). and by using dcm4chee-web3 console export function
Again - question is - is that right approach, but I believe it is.


3. Now I am trying to do some more sophisticated work.
I would like to query remote DCM4CHEE node for some data, and then based on response fetch selected DICOM files to my local app.
a) I believe the first step based on dcm4che toolkit would be to something  like that
findscu  --relational -c DCM4CHEE@10.1.0.204:11112 -m 00080060=CT -m StudyDate=19500101- -r 00100040 -r 00081030 -r 0020000D -r 0020000E -r 00100020 -r Numb
erOfStudyRelatedSeries
-r PatientName -r 00080060

The above command is sending C-FIND query. Not sure regarding "--relational" parameter but with this added the output seems to be more detailed.
Also my doubts are related to what to put in -r or any other parameter in order to get some kind of file ID I could request with C-MOVE and have it delivered to my local app.

for now I am having this:

23:29:03,550 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 [0] CommandDataSetType
(0000,0900) US [65281] Status

23:29:03,562 DEBUG - Dataset:
(0008,0005) CS [ISO 2022 IR 13\ISO 2022 IR 87] SpecificCharacterSet
(0008,0020) DA [19890203] StudyDate
(0008,0052) CS [STUDY] QueryRetrieveLevel
(0008,0054) AE [DCM4CHEE] RetrieveAETitle
(0008,0056) CS [ONLINE] InstanceAvailability
(0008,0060) CS [] Modality
(0008,1030) LO [KNEE] StudyDescription
(0010,0010) PN [Si Polan] PatientName
(0010,0020) LO [2001] PatientID
(0010,0040) CS [M] PatientSex
(0020,000D) UI [1.2.392.200224.2.3000.3145728001.0915.21352511527470000] Study
(0020,000E) UI [] SeriesInstanceUID
(0020,1206) IS [1] NumberOfStudyRelatedSeries
(0088,0130) SH [] StorageMediaFileSetID
(0088,0140) UI [] StorageMediaFileSetUID



The above output doesn't seem to contain unique data I could use with C-MOVE command that I would like to issue in next step, or maybe the approach is wrong and I am missing something.
Also I don't understand why the above output doesn't contain modality ... if I check the file via dcm4chee-web3, the modality is returned correctly

4. CMOVE should be issued based on what C-FIND returned, e.g.
getscu -c DCM4CHEE@10.1.0.204:11112 -m 0020000D=2.16.840.1.113669.632.20.1211.10000324479

but when I issued the below I received plenty of files even if I expected only one
getscu -c DCM4CHEE@10.1.0.204:11112 -m 00200013=2 -m 00200010=A10026587077 -m 0020000D=2.16.840.1.113669.632.20.1211.10000329900

So the above didn't make query asking for unique file and I don't know how to achieve that


I would appreciate very much if someone could comment and/or shed some light on this.

Thank you.

fleetwoodfc

unread,
Dec 31, 2014, 5:01:49 AM12/31/14
to dcm...@googlegroups.com
There is a good tutorial here - look at chapters 7 and 8

norbi771

unread,
Jan 2, 2015, 8:04:31 AM1/2/15
to dcm...@googlegroups.com
Thank you, I know that site and based on what I've read there I get some understanding how does this DICOM work.
But reading that I didn't find the answer of how to query for specific dicom file. Is this possible at all?

Lets imagine the following:

I issued c-find and get results of 20 files.
Now I'd like to get 5 of them.
Is there a specific attribute (unique for every file) I can get and than issue c-move with that specific attribute in order to have only selected files sent to my local dicom node?
or based on specific unique attribute I can issue getscu and get that data as blob?



fleetwoodfc

unread,
Jan 2, 2015, 5:58:56 PM1/2/15
to dcm...@googlegroups.com
You can use the SOP Instance UID (image UID). DICOM does not use file names.

norbi771

unread,
Jan 3, 2015, 7:52:42 PM1/3/15
to dcm...@googlegroups.com
Thank you,
SOP Instance UID is the key I was looking for.
Reply all
Reply to author
Forward
0 new messages