Use dcm4che api to query a DICOM server for a DicomObject and store in memory, not on disk.

1,279 views
Skip to first unread message

innoDcmDM

unread,
Mar 3, 2014, 8:28:03 AM3/3/14
to dcm...@googlegroups.com
Hi,
 
I have used DcmQR to query a dcm4chee DICOM server for a DICOM file and move that file to a temp directory.
 
I then used the code in the following blog to list the headers in the retrieved DICOM file:
 
 
Is is possible to use the dcm4che api to query the server for a DICOM file and store the file as a DicomObject in the application memory, without first writing the file to disk?
 
 
Thanks
 
 
 
 
 
 
 

qwe

unread,
Mar 3, 2014, 8:54:12 AM3/3/14
to dcm...@googlegroups.com
Hi innoDcmDM,

I try to solve similiar problem. I went further because I try to get full image data, store them memory and then process  them..
Check out link:

http://stackoverflow.com/questions/22126774/dcm4che-getting-images-from-pacs

And i still wait for an answer..
I tried to ask for help writing comments of the follwing subject:

http://samucs.blogspot.com/2008/03/converting-dicom-to-jpeg-using-dcm4che.html

I hope someone give as an answer...

thanks
qwe

pma...@hggm.es

unread,
Mar 3, 2014, 12:37:29 PM3/3/14
to dcm...@googlegroups.com
Not sure what you mean. I use the dcm4che3 code (findscu) with a small modification for getting all the matched objects in a simple List<attributes>  so I work with these objects in my app as I wish (or almost ;) ) I can find the code snippet if you are looking for something similar.
Probably there are smarter solutions but I do not have the time usually,lol.

innoDcmDM

unread,
Mar 3, 2014, 3:34:52 PM3/3/14
to dcm...@googlegroups.com
Hi qwe,

I was able to retrieve a subset of about 15 headers by following your example on stackoverflow.

The application exits without error, but I am not using the toByteArray method.

Next I want to work out why I am only getting a subset of the headers.


Thanks

innoDcmDM

unread,
Mar 3, 2014, 3:39:38 PM3/3/14
to dcm...@googlegroups.com
Hi pma,

If you could post the code snippet that would be great. I am using dcm4che2, but I could think about upgrading if need be.

Thanks.

qwe

unread,
Mar 3, 2014, 4:36:41 PM3/3/14
to dcm...@googlegroups.com
Hi pma,

I'm very intersted in your code snippet too... Please post it as soon as possible...

qwe


pma...@hggm.es

unread,
Mar 4, 2014, 10:38:56 AM3/4/14
to
Hello; 

As I told you I reused the findscu code for a quick solution the first week I was working with DICOM and the library. After a few weeks I am working in a smarter solution. 
What I did:
I set a new attribute for the findscu class --> List<Attributes> dataBack = new ArrayList<Attributes>();
and I added a new element to the list each with each query response, this is in the method --> public void onDimseRSP(Association as, Attributes cmd,Attributes data) where is defined what to do with the RSP, the data attributes are what you are looking for.

Again, this is by far not an optimal solution is "quite easy" to implement something better.  

venkatesh p

unread,
Feb 6, 2017, 5:37:49 AM2/6/17
to dcm4che
CAn u just help me ,how to do the FindSCU in Java to get the details based on patientlevel query?
Reply all
Reply to author
Forward
0 new messages