Package org.dcm4che3.net

Examples of org.dcm4che3.net.TransferCapability


        ApplicationEntity ae2 = config.findApplicationEntity("TEST-AET2");
        ApplicationEntity ae = ae2.getDevice().getApplicationEntity("TEST-AET1");
        assertTrue(ae.isAssociationInitiator());
        assertFalse(ae.isAssociationAcceptor());
        assertFalse(ae.getConnections().get(0).isServer());
        TransferCapability echoSCP = ae.getTransferCapabilityFor(
                UID.VerificationSOPClass, TransferCapability.Role.SCP);
        assertNull(echoSCP);
        TransferCapability echoSCU = ae.getTransferCapabilityFor(
                UID.VerificationSOPClass, TransferCapability.Role.SCU);
        assertNotNull(echoSCU);
        TransferCapability ctSCP = ae.getTransferCapabilityFor(
                UID.CTImageStorage, TransferCapability.Role.SCP);
        assertEquals(STORAGE_OPTIONS, ctSCP.getStorageOptions());
        TransferCapability findSCP = ae.getTransferCapabilityFor(
                UID.StudyRootQueryRetrieveInformationModelFIND, TransferCapability.Role.SCP);
        assertEquals(EnumSet.of(QueryOption.RELATIONAL, QueryOption.DATETIME),
                findSCP.getQueryOptions());
        config.removeDevice("Test-Device-1");
    }
View Full Code Here


        conn.setPort(port);
        return conn;
    }

    private static TransferCapability echoSCP() {
        return new TransferCapability(null, UID.VerificationSOPClass, Role.SCP,
                UID.ImplicitVRLittleEndian);
    }
View Full Code Here

        return new TransferCapability(null, UID.VerificationSOPClass, Role.SCP,
                UID.ImplicitVRLittleEndian);
    }

    private static TransferCapability echoSCU() {
        return new TransferCapability(null, UID.VerificationSOPClass, Role.SCU,
                UID.ImplicitVRLittleEndian);
    }
View Full Code Here

        return new TransferCapability(null, UID.VerificationSOPClass, Role.SCU,
                UID.ImplicitVRLittleEndian);
    }

    private static final TransferCapability ctSCP() {
        return new TransferCapability(null, UID.CTImageStorage, Role.SCP,
                UID.ImplicitVRLittleEndian, UID.ExplicitVRLittleEndian);
    }
View Full Code Here

        return new TransferCapability(null, UID.CTImageStorage, Role.SCP,
                UID.ImplicitVRLittleEndian, UID.ExplicitVRLittleEndian);
    }
    private static final TransferCapability findSCP() {
        TransferCapability tc = new TransferCapability(null,
                UID.StudyRootQueryRetrieveInformationModelFIND, Role.SCP,
                UID.ImplicitVRLittleEndian);
        tc.setQueryOptions(EnumSet.of(QueryOption.RELATIONAL));
        return tc;
    }
View Full Code Here

        }
        for (String cuid : p.stringPropertyNames()) {
            String ts = p.getProperty(cuid);
            LOG.info(ts);
            tcs.add(
                    new TransferCapability(null, ts.split(":")[0],
                                TransferCapability.Role.SCP,
                                StringUtils.split(ts.split(":")[1], ',')));
        }
        return tcs;
    }
View Full Code Here

        for (PresentationContext pc : acceptedPCs) {
            String abstractSyntax = pc.getAbstractSyntax();
            if (containsAbstractSyntax(tmpTCs, abstractSyntax)) {
                continue;
            }
            TransferCapability tmpTC = new TransferCapability();
            tmpTC.setRole(Role.SCP);
            ArrayList<String> tmpTS = new ArrayList<String>();
            tmpTC.setSopClass(abstractSyntax);
            for (PresentationContext tmp : acceptedPCs) {

                if (tmp.getAbstractSyntax().compareToIgnoreCase(abstractSyntax) == 0) {
                    if (!tmpTS.contains(tmp.getTransferSyntax())) {
                        tmpTS.add(tmp.getTransferSyntax());
                    }
                }
            }
            String[] tmpTSStr = new String[tmpTS.size()];
            tmpTS.toArray(tmpTSStr);
            tmpTC.setTransferSyntaxes(tmpTSStr);
            tmpTCs.add(tmpTC);

        }
        TransferCapability[] TCs = new TransferCapability[tmpTCs.size()];
        tmpTCs.toArray(TCs);
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

        ApplicationEntity ae2 = config.findApplicationEntity("TEST-AET2");
        ApplicationEntity ae = ae2.getDevice().getApplicationEntity("TEST-AET1");
        assertTrue(ae.isAssociationInitiator());
        assertFalse(ae.isAssociationAcceptor());
        assertFalse(ae.getConnections().get(0).isServer());
        TransferCapability echoSCP = ae.getTransferCapabilityFor(
                UID.VerificationSOPClass, TransferCapability.Role.SCP);
        assertNull(echoSCP);
        TransferCapability echoSCU = ae.getTransferCapabilityFor(
                UID.VerificationSOPClass, TransferCapability.Role.SCU);
        assertNotNull(echoSCU);
        TransferCapability ctSCP = ae.getTransferCapabilityFor(
                UID.CTImageStorage, TransferCapability.Role.SCP);
        assertEquals(STORAGE_OPTIONS, ctSCP.getStorageOptions());
        TransferCapability findSCP = ae.getTransferCapabilityFor(
                UID.StudyRootQueryRetrieveInformationModelFIND, TransferCapability.Role.SCP);
        assertEquals(EnumSet.of(QueryOption.RELATIONAL, QueryOption.DATETIME),
                findSCP.getQueryOptions());
        config.removeDevice("Test-Device-1");
    }
View Full Code Here

        conn.setPort(port);
        return conn;
    }

    private static TransferCapability echoSCP() {
        return new TransferCapability(null, UID.VerificationSOPClass, Role.SCP,
                UID.ImplicitVRLittleEndian);
    }
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.