Package org.dcm4che3.net

Examples of org.dcm4che3.net.TransferCapability


        rq.addPresentationContext(
                new PresentationContext(2,
                        UID.StorageCommitmentPushModelSOPClass,
                        tss));
        ae.addTransferCapability(
                new TransferCapability(null,
                        UID.VerificationSOPClass,
                        TransferCapability.Role.SCP,
                        UID.ImplicitVRLittleEndian));
        ae.addTransferCapability(
                new TransferCapability(null,
                        UID.StorageCommitmentPushModelSOPClass,
                        TransferCapability.Role.SCU,
                        tss));
    }
View Full Code Here


                        "resource:sop-classes.properties"),
                null);
        for (String cuid : p.stringPropertyNames()) {
            String ts = p.getProperty(cuid);
            ae.addTransferCapability(
                    new TransferCapability(null,
                            CLIUtils.toUID(cuid),
                            TransferCapability.Role.SCP,
                            CLIUtils.toUIDs(ts)));
        }
    }
View Full Code Here

        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(
                    cl.getOptionValue("storage-sop-classes",
View Full Code Here

    private static void addTransferCapabilities(ApplicationEntity ae,
            Properties p, TransferCapability.Role role,
            EnumSet<QueryOption> queryOptions) {
        for (String cuid : p.stringPropertyNames()) {
            String ts = p.getProperty(cuid);
            TransferCapability tc = new TransferCapability(null,
                    CLIUtils.toUID(cuid), role, CLIUtils.toUIDs(ts));
            tc.setQueryOptions(queryOptions);
            ae.addTransferCapability(tc);
        }
    }
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,
                                tc.getTransferSyntaxes()));
        aarq.addRoleSelection(
                new RoleSelection(UID.StorageCommitmentPushModelSOPClass, false, true));
        return aarq;
    }
View Full Code Here

        for (TransferCapability tc : prevAE.getTransferCapabilitiesWithRole(role))
            if (ae.getTransferCapabilityFor(tc.getSopClass(), role) == null)
                roleNode.node(tc.getSopClass()).removeNode();
        for (TransferCapability tc : ae.getTransferCapabilitiesWithRole(role)) {
            Preferences tcNode = roleNode.node(tc.getSopClass());
            TransferCapability prev =
                    prevAE.getTransferCapabilityFor(tc.getSopClass(), role);
            if (prev == null)
                storeTo(tc, tcNode);
            else
                storeDiffs(tcNode, prev, tc);
View Full Code Here

        return opts;
    }

    private TransferCapability loadTransferCapability(Preferences prefs,
            String cuid, Role role) {
        TransferCapability tc = new TransferCapability(null, cuid, role,
                UID.ImplicitVRLittleEndian);
        loadFrom(tc, prefs);
        return tc;
    }
View Full Code Here

    }

    private TransferCapability loadTransferCapability(SearchResult sr)
            throws NamingException {
        Attributes attrs = sr.getAttributes();
        TransferCapability tc = new TransferCapability();
        loadFrom(tc, attrs);
        return tc;
    }
View Full Code Here

            if (findByDN(aeDN, tcs, dn) == null)
                destroySubcontext(dn);
        }
        for (TransferCapability tc : tcs) {
            String dn = dnOf(tc, aeDN);
            TransferCapability prev = findByDN(aeDN, prevs, dn);
            if (prev == null)
                createSubcontext(dn, storeTo(tc, new BasicAttributes(true)));
            else
                modifyAttributes(dn, storeDiffs(prev, tc, new ArrayList<ModificationItem>()));
        }
View Full Code Here

        config.persist(device);
        ApplicationEntity ae = config.findApplicationEntity("TEST-AET1");
        assertFalse(ae.isAssociationInitiator());
        assertTrue(ae.isAssociationAcceptor());
        assertTrue(ae.getConnections().get(0).isServer());
        TransferCapability echoSCP = ae.getTransferCapabilityFor(
                UID.VerificationSOPClass, TransferCapability.Role.SCP);
        assertNotNull(echoSCP);
        assertArrayEquals(new String[] { UID.ImplicitVRLittleEndian }, echoSCP.getTransferSyntaxes());
        TransferCapability ctSCP = ae.getTransferCapabilityFor(
                UID.CTImageStorage, TransferCapability.Role.SCP);
        assertNotNull(ctSCP);
        assertArrayEquals(new String[] { UID.ImplicitVRLittleEndian, UID.ExplicitVRLittleEndian },
                sort(ctSCP.getTransferSyntaxes()));
        assertNull(ctSCP.getStorageOptions());
        TransferCapability findSCP = ae.getTransferCapabilityFor(
                UID.StudyRootQueryRetrieveInformationModelFIND, TransferCapability.Role.SCP);
        assertNotNull(findSCP);
        assertArrayEquals(new String[] { UID.ImplicitVRLittleEndian }, findSCP.getTransferSyntaxes());
        assertEquals(EnumSet.of(QueryOption.RELATIONAL), findSCP.getQueryOptions());
        assertEquals(1, config.listDeviceInfos(deviceInfo("Test-Device-1")).length);
        try {
            config.persist(createDevice("Test-Device-1", "TEST-AET1"));
            fail("ConfigurationAlreadyExistsException expected");
        } catch (ConfigurationAlreadyExistsException e) {}
View Full Code Here

TOP

Related Classes of org.dcm4che3.net.TransferCapability

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.