Examples of FindSCU


Examples of org.dcm4che3.tool.findscu.FindSCU

   
    private QueryResult query(String testDescription, boolean fuzzy) throws IOException,
            InterruptedException, IncompatibleConnectionException,
            GeneralSecurityException {

        FindSCU main = new FindSCU();
        main.getAAssociateRQ().setCalledAET(aeTitle);
        main.getRemoteConnection().setHostname(host);
        main.getRemoteConnection().setPort(port);

        ExecutorService executorService = Executors.newSingleThreadExecutor();
        ScheduledExecutorService scheduledExecutorService = Executors
                .newSingleThreadScheduledExecutor();
        main.getDevice().setExecutor(executorService);
        main.getDevice().setScheduledExecutor(scheduledExecutorService);

        EnumSet<QueryOption> queryOptions = EnumSet.noneOf(QueryOption.class);
        if (fuzzy) queryOptions.add(QueryOption.FUZZY);
       
        main.setInformationModel(InformationModel.StudyRoot, IVR_LE_FIRST,queryOptions);

        main.getKeys().addAll(queryatts);

        long timeStart = System.currentTimeMillis();

        try {

            main.open();
            main.query(getDimseRSPHandler(main.getAssociation().nextMessageID()));

        } finally {
            main.close(); // is waiting for all the responsens to be complete
            executorService.shutdown();
            scheduledExecutorService.shutdown();

        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.