Package org.dcm4che3.conf.prefs

Examples of org.dcm4che3.conf.prefs.PreferencesDicomConfiguration


    private static void configureTransferCapability(ApplicationEntity ae,
            CommandLine cl) throws IOException {
        if (cl.hasOption("accept-unknown")) {
            ae.addTransferCapability(
                    new TransferCapability(null,
                            "*",
                            TransferCapability.Role.SCP,
                            "*"));
        } else {
            Properties p = CLIUtils.loadProperties(
                    cl.getOptionValue("sop-classes",
                            "resource:sop-classes.properties"),
                    null);
            for (String cuid : p.stringPropertyNames()) {
                String ts = p.getProperty(cuid);
                TransferCapability tc = new TransferCapability(null,
                        CLIUtils.toUID(cuid),
                        TransferCapability.Role.SCP,
                        CLIUtils.toUIDs(ts));
                ae.addTransferCapability(tc);
            }
View Full Code Here


        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

        assertEquals(SPOOL_DIRECTORY, logger.getSpoolDirectory());
        assertTrue(logger.isIncludeInstanceUID());
        validate(logger.getAuditSuppressCriteriaList());
        Device arrDevice = logger.getAuditRecordRepositoryDevice();
        assertNotNull(arrDevice);
        AuditRecordRepository arr = arrDevice.getDeviceExtension(AuditRecordRepository.class);
        assertNotNull(arr);
        assertEquals(2, arr.getConnections().size());
    }
View Full Code Here

        logger.setIncludeInstanceUID(true);
        logger.addAuditSuppressCriteria(createAuditSuppressCriteria());
    }

    private AuditSuppressCriteria createAuditSuppressCriteria() {
        AuditSuppressCriteria criteria = new AuditSuppressCriteria("AuditSuppressCriteria");
        criteria.setEventIDs(AuditMessages.EventID.ApplicationActivity);
        criteria.setEventActionCodes(AuditMessages.EventActionCode.Execute);
        criteria.setEventTypeCodes(AuditMessages.EventTypeCode.ApplicationStart,
                AuditMessages.EventTypeCode.ApplicationStop);
        criteria.setEventOutcomeIndicators(AuditMessages.EventOutcomeIndicator.Success);
        criteria.setUserIDs("UserID");
        criteria.setAlternativeUserIDs("AltUserID");
        criteria.setNetworkAccessPointIDs("127.0.0.1");
        criteria.setUserRoleIDCodes(AuditMessages.RoleIDCode.ApplicationLauncher);
        criteria.setUserIsRequestor(true);
        return criteria;
    }
View Full Code Here

        assertEquals(2, arr.getConnections().size());
    }

    private void validate(List<AuditSuppressCriteria> criteriaList) {
        assertEquals(1, criteriaList.size());
        AuditSuppressCriteria criteria = criteriaList.get(0);
        assertEquals("AuditSuppressCriteria", criteria.getCommonName());
        EventID[] eventIDs = criteria.getEventIDs();
        assertEquals(1, eventIDs.length);
        assertEquals(AuditMessages.EventID.ApplicationActivity.getCode(),
                eventIDs[0].getCode());
        assertEquals(AuditMessages.EventID.ApplicationActivity.getCodeSystemName(),
                eventIDs[0].getCodeSystemName());
        assertEquals(AuditMessages.EventID.ApplicationActivity.getDisplayName(),
                eventIDs[0].getDisplayName());
        String[] eventActionCodes = criteria.getEventActionCodes();
        assertEquals(1, eventActionCodes.length);
        assertEquals(AuditMessages.EventActionCode.Execute, eventActionCodes[0]);
        EventTypeCode[] eventTypeCodes = criteria.getEventTypeCodes();
        assertEquals(2, eventTypeCodes.length);
        String[] eventOutcomeIndicators = criteria.getEventOutcomeIndicators();
        assertEquals(1, eventOutcomeIndicators.length);
        assertEquals(AuditMessages.EventOutcomeIndicator.Success, eventOutcomeIndicators[0]);
        String[] userIDs = criteria.getUserIDs();
        assertEquals(1, userIDs.length);
        assertEquals("UserID", userIDs[0]);
        String[] altUserIDs = criteria.getAlternativeUserIDs();
        assertEquals(1, altUserIDs.length);
        assertEquals("AltUserID", altUserIDs[0]);
        String[] networkAccessPointIDs = criteria.getNetworkAccessPointIDs();
        assertEquals(1, networkAccessPointIDs.length);
        assertEquals("127.0.0.1", networkAccessPointIDs[0]);
        RoleIDCode[] userRoleIDCodes = criteria.getUserRoleIDCodes();
        assertEquals(1, userRoleIDCodes.length);
        assertEquals(AuditMessages.RoleIDCode.ApplicationLauncher.getCode(),
                userRoleIDCodes[0].getCode());
        assertEquals(AuditMessages.RoleIDCode.ApplicationLauncher.getCodeSystemName(),
                userRoleIDCodes[0].getCodeSystemName());
        assertEquals(AuditMessages.RoleIDCode.ApplicationLauncher.getDisplayName(),
                userRoleIDCodes[0].getDisplayName());
        assertEquals(true, criteria.getUserIsRequestor());
    }
View Full Code Here

        this.status = status;
    }

    public void setTransferSyntaxes(String[] tss) {
        rq.addPresentationContext(
                new PresentationContext(1, UID.VerificationSOPClass,
                        UID.ImplicitVRLittleEndian));
        rq.addPresentationContext(
                new PresentationContext(2,
                        UID.StorageCommitmentPushModelSOPClass,
                        tss));
        ae.addTransferCapability(
                new TransferCapability(null,
                        UID.VerificationSOPClass,
View Full Code Here

            LOG.warn("{}: M-DELETE {} failed!", as, file);
    }

    private DicomServiceRegistry createServiceRegistry() {
        DicomServiceRegistry serviceRegistry = new DicomServiceRegistry();
        serviceRegistry.addDicomService(new BasicCEchoSCP());
        serviceRegistry.addDicomService(cstoreSCP);
        return serviceRegistry;
    }
View Full Code Here

    public StgCmtSCU(ApplicationEntity ae) throws IOException {
        this.remote = new Connection();
        this.ae = ae;
        DicomServiceRegistry serviceRegistry = new DicomServiceRegistry();
        serviceRegistry.addDicomService(new BasicCEchoSCP());
        serviceRegistry.addDicomService(stgcmtResultHandler);
        ae.setDimseRQHandler(serviceRegistry);
    }
View Full Code Here

                    Attributes.createFileMetaInformation(iuid, cuid,
                            UID.ExplicitVRLittleEndian),
                    eventInfo);
        } catch (IOException e) {
            LOG.warn(as + ": Failed to store Storage Commitment Result:", e);
            throw new DicomServiceException(Status.ProcessingFailure, e);
        } finally {
            SafeClose.close(out);
        }
        return null;
    }
View Full Code Here

    @Override
    public void process(Exchange exchange) throws Exception {
        DicomMessage in = exchange.getIn(DicomMessage.class);
        Dimse dimse = in.getHeader("dimse", Dimse.class);
        if (dimse != Dimse.C_ECHO_RQ)
            throw new DicomServiceException(Status.UnrecognizedOperation);
        DicomMessage out = new DicomMessage(
                Dimse.C_ECHO_RSP,
                Commands.mkEchoRSP(in.getCommand(), Status.Success));
        exchange.setOut(out);
    }
View Full Code Here

TOP

Related Classes of org.dcm4che3.conf.prefs.PreferencesDicomConfiguration

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.