DCMQR problems

957 views
Skip to first unread message

Infopid Infopidsl

unread,
May 27, 2015, 3:28:27 AM5/27/15
to dcm...@googlegroups.com
Hello, I want to get /c-move images to my workstation.

I use command line and I can c-move images correctly, but when I try to do this with this java code it returns this error:

org.dcm4che2.net.NoPresentationContextException: 1.2.840.10008.5.1.4.1.2.1.2/Patient Root Query/Retrieve Information Model - MOVE not supported by DCM4CHEE
at org.dcm4che2.tool.dcmqr.DcmQR.move(DcmQR.java:1732)
at Init$2.run(Init.java:280)
at java.lang.Thread.run(Thread.java:724)


JAVA CODE:

                            DcmQR dcmqr = new DcmQR("DCMQR");
                            dcmqr.setCalledAET("DCM4CHEE", false);
                            dcmqr.setRemoteHost("IPDCM4CHEE");
                            dcmqr.setRemotePort(11112); 
                            
                            dcmqr.setQueryLevel(DcmQR.QueryRetrieveLevel.PATIENT);
                            dcmqr.addMatchingKey(Tag.toTagPath("PatientID"),"1540594");

                            //dcmqr.setCFind(true);
                            dcmqr.setCGet(true);
                            dcmqr.configureTransferCapability(true);                   
                            
                            List<DicomObject> result=null;

                            dcmqr.start();
                            System.out.println("started");
                            dcmqr.open();
                            System.out.println("opened");
                            result = dcmqr.query();                            
                            dcmqr.setMoveDest("MYWORKSTATION");
                            dcmqr.move(result);
                            System.out.println("List Size = " + result.size());
                            dcmqr.stop();
                            dcmqr.close();

I see that dcm4chee accepts c-move, i don't understand the error...

Dave Franken

unread,
May 27, 2015, 3:58:23 AM5/27/15
to dcm...@googlegroups.com
Try using IMAGE root instead of Patient?

Infopid Infopidsl

unread,
May 27, 2015, 4:44:41 AM5/27/15
to dcm...@googlegroups.com
The error is the same:

Patient Root Query/Retrieve Information Model - MOVE not supported by DCM4CHEE




El dimecres, 27 maig de 2015 9:58:23 UTC+2, Dave Franken va escriure:

Devishree.V

unread,
May 27, 2015, 5:48:52 AM5/27/15
to dcm...@googlegroups.com

 Hi,

  Add the move destination before configuring transfer capability.


                            DcmQR dcmqr = new DcmQR("DCMQR");
                            dcmqr.setCalledAET("DCM4CHEE", false);
                            dcmqr.setRemoteHost("IPDCM4CHEE");
                            dcmqr.setRemotePort(11112); 
                            
                            dcmqr.setQueryLevel(DcmQR.QueryRetrieveLevel.PATIENT);
                            dcmqr.addMatchingKey(Tag.toTagPath("PatientID"),"1540594");

                            //dcmqr.setCFind(true);
                            dcmqr.setCGet(true);
                            dcmqr.setMoveDest("MYWORKSTATION");
                            dcmqr.configureTransferCapability(true);                   
                            
                            List<DicomObject> result=null;
                            .....

  should work.

Infopid Infopidsl

unread,
May 27, 2015, 6:45:29 AM5/27/15
to dcm...@googlegroups.com
Perfect! it works! Thank you!


El dimecres, 27 maig de 2015 11:48:52 UTC+2, Devishree.V va escriure:

Enrique ruiz

unread,
Jun 21, 2016, 2:42:07 AM6/21/16
to dcm4che
I'm trying to do query-retrieve. Query is alright, but the retrieve have not success. Console no shows any error. Below the code and messages of the console.

        DcmQR dcmqr = new DcmQR("DCMQR");


        dcmqr
.setCalledAET("NHFE_PACSWFM01", false);
        dcmqr
.setRemoteHost("10.193.89.106");
        dcmqr
.setRemotePort(104);
       
        dcmqr
.setCalling("CEIB_06");
        dcmqr
.setLocalHost("10.193.88.11");
        dcmqr
.setLocalPort(104);


        dcmqr
.setCGet(true);
       
        dcmqr
.setMoveDest("CEIB_06");
        dcmqr
.setStoreDestination("E:\\");


        dcmqr
.setQueryLevel(DcmQR.QueryRetrieveLevel.IMAGE);
        dcmqr
.addMatchingKey(new int[]{Tag.StudyDate},"20160613" );
        dcmqr
.addMatchingKey(new int[]{Tag.StationName},"NHFE_XA_03" );
       
        dcmqr
.configureTransferCapability(true);

       
List<DicomObject> result=null;
       
try {

            dcmqr
.start();
           
System.out.println("started");
            dcmqr
.open();
           
System.out.println("opened");
            result
= dcmqr.query();

           
System.out.println("List Size = " + result.size());

           
           
if (dcmqr.isCMove()) {
               
System.out.println("is move");
                dcmqr
.move(result);
           
} else{
               
System.out.println("not move");
                dcmqr
.get(result);
           
}
            dcmqr
.stop();
            dcmqr
.close();          
           
System.out.println("done");
         
} catch (Exception e) {
           
System.out.println("error: "+e);
       
}

Start Server listening on port 104
started
log4j:WARN No appenders could be found for logger (org.dcm4che2.net.NetworkConnection).
log4j:WARN Please initialize the log4j system properly.
opened
List Size = 48
is move
done
BUILD SUCCESSFUL (total time: 4 minutes 5 seconds)

Devishree Kalaiselvi

unread,
Jun 21, 2016, 8:34:19 AM6/21/16
to dcm...@googlegroups.com
     You need to specify a unique key attribute depending on the Q/R level in Matching key to perform retrieval (Note:- Its important only to perform retrieval not for query).  

      For example, If the Q/R level is PATIENT, the unique key attribute PATIENT ID should be passed. In your case SOP Instance UID (0008,0018) must be added since the Q/R level is IMAGE.

      Additionally, you have to add the storage transfer capability before the line dcmqr.configureTransferCapability(true),
   
       Ex:- CT storage capability with default transfer syntax
   
   dcmqr.addStoreTransferCapability(UID.CTImageStorage, new String[]{UID.ImplicitVRLittleEndian});

Thanks,
 Devishree V 

--
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+u...@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.

Reply all
Reply to author
Forward
0 new messages