DcmWado utility

71 views
Skip to first unread message

Steve Pillar

unread,
Jul 18, 2018, 11:24:31 AM7/18/18
to dcm4che
I have run the dcmwado utility from the command prompt, to successfully retrieve a dicom image from the dcm4chee server:

C:\Users\admin.admin\Desktop\dcm4che-2.0.29-bin\dcm4che-2.0.29\bin>dcmwado http://127.0.0.1:8080/wado -dcm -uid 2.25.240468945672263016633883999541661954910:2.25.171705801528397292829103631098573581807:2.25.161854141366276950217156545004367678707 -dir c:\users\admin.admin\desktop

So I now have this file, as a .dcm file, and view the image and all associated dicom tags through my dicom viewer.

I would like to replicate this through java code, as follows:

public class Dicom_SR 
{
    public static void main(String[] args) 
    {
        try
        {
            DcmWado dcmwado = new DcmWado();
            dcmwado.setBaseURL("http://127.0.0.1:8080/wado");
            File localDir = new File("c:\\users\\admin.admin\\desktop\\");
            dcmwado.setDirectory(localDir);
            String uidArray[] = new String[3];
            uidArray[0] = "2.25.240468945672263016633883999541661954910";
            uidArray[1] = "2.25.171705801528397292829103631098573581807";
            uidArray[2] = "2.25.161854141366276950217156545004367678707";
            dcmwado.setUIDs(uidArray);

            dcmwado.fetchObjects();
            
        }
        catch(Exception ex)
        {
            
        }
    }
}

Running this, I only retrieve the image, and not any dicom tags

Do i have to include the equivalent of the -dcm option? If so how?

Or am I missing another method/property?

Would anyone be able to point me in the right direction?

Thanks in anticipation...

manick

unread,
Jul 19, 2018, 6:37:02 AM7/19/18
to dcm4che

Specify the content type , dcmwado.addContentType("application/dicom"); 

Steve Pillar

unread,
Jul 19, 2018, 6:39:53 AM7/19/18
to dcm4che
Excellent!

Thats sorted it

Thanks for your help...
Reply all
Reply to author
Forward
0 new messages