Package org.dcm4che3.net

Examples of org.dcm4che3.net.ApplicationEntity


    private static JSONReader parseJSON(String fname, Attributes attrs)
            throws IOException {
        @SuppressWarnings("resource")
        InputStream in = fname.equals("-") ? System.in : new FileInputStream(fname);
        try {
            JSONReader reader = new JSONReader(
                    Json.createParser(new InputStreamReader(in, "UTF-8")));
            reader.readDataset(attrs);
            return reader;
        } finally {
            if (in != System.in)
                SafeClose.close(in);
        }
View Full Code Here


        try {
            CommandLine cl = parseComandLine(args);
            Device device = new Device("stgcmtscu");
            Connection conn = new Connection();
            device.addConnection(conn);
            ApplicationEntity ae = new ApplicationEntity("STGCMTSCU");
            device.addApplicationEntity(ae);
            ae.addConnection(conn);
            final StgCmtSCU stgcmtscu = new StgCmtSCU(ae);
            CLIUtils.configureConnect(stgcmtscu.remote, stgcmtscu.rq, cl);
            CLIUtils.configureBind(conn, stgcmtscu.ae, cl);
            CLIUtils.configure(conn, cl);
            stgcmtscu.remote.setTlsProtocols(conn.getTlsProtocols());
View Full Code Here

                file.exists());

        Device device = new Device("mppsscu");
        Connection conn = new Connection();
        device.addConnection(conn);
        ApplicationEntity ae = new ApplicationEntity("MPPSSCU");
        device.addApplicationEntity(ae);
        ae.addConnection(conn);

        final MppsSCU main = new MppsSCU(ae);
       
        main.setRspHandlerFactory(new MppsSCU.RSPHandlerFactory() {
View Full Code Here

                file.exists());

        Device device = new Device("storescu");
        Connection conn = new Connection();
        device.addConnection(conn);
        ApplicationEntity ae = new ApplicationEntity("STORESCU");
        device.addApplicationEntity(ae);
        ae.addConnection(conn);

        StoreSCU main = new StoreSCU(ae);

        main.setRspHandlerFactory(new StoreSCU.RSPHandlerFactory() {
View Full Code Here

        return conf.findApplicationEntity(key);
    }

    public ApplicationEntity findApplicationEntity(String aet)
            throws ConfigurationException {
        ApplicationEntity ae = get(aet);
        if (ae == null)
            throw new ConfigurationNotFoundException(
                    "Unknown AE: " + aet);
        return ae;
    }
View Full Code Here

    @Test
    public void testReconfigure() throws Exception {
        Device d1 = createDevice("test", "AET1");
        Device d2 = createDevice("test", "AET2");
        d1.reconfigure(d2);
        ApplicationEntity ae = d1.getApplicationEntity("AET2");
        assertNotNull(ae);
        List<Connection> conns = ae.getConnections();
        assertEquals(1, conns.size());
    }
View Full Code Here

    private Device createDevice(String name, String aet) {
        Device dev = new Device(name);
        Connection conn = new Connection("dicom", "localhost", 11112);
        dev.addConnection(conn);
        ApplicationEntity ae = new ApplicationEntity(aet);
        dev.addApplicationEntity(ae);
        ae.addConnection(conn);
        return dev;
    }
View Full Code Here

                        Integer.parseInt(cl.getOptionValue("pending-cmove")));
    }

    private static void configureTransferCapability(DcmQRSCP main, CommandLine cl)
            throws IOException {
        ApplicationEntity ae = main.ae;
        EnumSet<QueryOption> queryOptions = cl.hasOption("relational")
                ? EnumSet.of(QueryOption.RELATIONAL)
                : EnumSet.noneOf(QueryOption.class);
        boolean storage = !cl.hasOption("no-storage") && main.isWriteable();
        if (storage && cl.hasOption("all-storage")) {
            TransferCapability tc = new TransferCapability(null,
                    "*",
                    TransferCapability.Role.SCP,
                    "*");
            tc.setQueryOptions(queryOptions);
            ae.addTransferCapability(tc);
        } else {
            ae.addTransferCapability(
                    new TransferCapability(null,
                            UID.VerificationSOPClass,
                            TransferCapability.Role.SCP,
                            UID.ImplicitVRLittleEndian));
            Properties storageSOPClasses = CLIUtils.loadProperties(
View Full Code Here

    private AAssociateRQ makeAAssociateRQ() {
        AAssociateRQ aarq = new AAssociateRQ();
        aarq.setCallingAET(as.getLocalAET());
        aarq.setCalledAET(as.getRemoteAET());
        ApplicationEntity ae = as.getApplicationEntity();
        TransferCapability tc = ae.getTransferCapabilityFor(
                UID.StorageCommitmentPushModelSOPClass, TransferCapability.Role.SCP);
        aarq.addPresentationContext(
                        new PresentationContext(
                                1,
                                UID.StorageCommitmentPushModelSOPClass,
View Full Code Here

            Preferences aeNode = aesNode.node(aet);
            if (!prevAETs.contains(aet)) {
                storeTo(ae, aeNode, devConns);
                storeChilds(ae, aeNode);
            } else {
                ApplicationEntity prevAE = prevDev.getApplicationEntity(aet);
                storeDiffs(aeNode, prevAE, ae);
                mergeChilds(prevAE, ae, aeNode);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.dcm4che3.net.ApplicationEntity

Copyright © 2018 www.massapicom. 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.