Examples of PreferencesDicomConfiguration


Examples of org.dcm4che3.conf.prefs.PreferencesDicomConfiguration

    private PreferencesDicomConfiguration config;
    private PreferencesHL7Configuration hl7Ext;

    @Before
    public void setUp() throws Exception {
        config = new PreferencesDicomConfiguration(Preferences.userRoot()
                .node("PreferencesHL7ConfigurationTest"));
        hl7Ext = new PreferencesHL7Configuration();
        config.addDicomConfigurationExtension(hl7Ext);
    }
View Full Code Here

Examples of org.dcm4che3.conf.prefs.PreferencesDicomConfiguration

    private PreferencesDicomConfiguration config;

    @Before
    public void setUp() throws Exception {
        config = new PreferencesDicomConfiguration(Preferences.userRoot()
                .node("PreferencesDicomConfigurationTest"));
    }
View Full Code Here

Examples of org.dcm4che3.conf.prefs.PreferencesDicomConfiguration

    private PreferencesDicomConfiguration config;

    @Before
    public void setUp() throws Exception {
        config = new PreferencesDicomConfiguration(Preferences.userRoot()
                .node("PreferencesAuditLoggerConfigurationTest"));
        config.addDicomConfigurationExtension(new PreferencesAuditLoggerConfiguration());
        config.addDicomConfigurationExtension(new PreferencesAuditRecordRepositoryConfiguration());
    }
View Full Code Here

Examples of org.dcm4che3.conf.prefs.PreferencesDicomConfiguration

*/
public class PreferencesConfigurationFactory {

    @Produces @ApplicationScoped
    public DicomConfiguration dicomConfiguration() {
            return new PreferencesDicomConfiguration();
    }
View Full Code Here

Examples of org.dcm4che3.conf.prefs.PreferencesDicomConfiguration

                LOG.error("Configuration backend error - {}", e);
            }
        } else {

            try {
                PreferencesDicomConfiguration conf = new PreferencesDicomConfiguration();
                LOG.info("Started Loading LDAP configuration");
                ApplicationEntity sourceAE = conf
                        .findApplicationEntity(instance.sourceAET);
                ArrayList<TransferCapability> tcs = (ArrayList<TransferCapability>) sourceAE
                        .getTransferCapabilities();
                ArrayList<PresentationContext> pcs = addChunkedPCsandSend(ae,
                        device, instance, tcs);
                // print accepted ones
                ArrayList<PresentationContext> acceptedPCs = new ArrayList<PresentationContext>();
                for (PresentationContext pc : pcs)
                    if (pc.isAccepted())
                        acceptedPCs.add(pc);

                ApplicationEntity destinationAE = conf
                        .findApplicationEntity(instance.destinationAET);
                Device toStore = destinationAE.getDevice();
                TransferCapability[] TCs = mergeTCs(acceptedPCs);
                for (TransferCapability tc : TCs)
                    toStore.getApplicationEntity(instance.destinationAET)
                            .addTransferCapability(tc);

                conf.merge(toStore);
                conf.close();
                return;
            } catch (ConfigurationException e) {
                LOG.error("Configuration backend error - {}", e);
            }
        }
View Full Code Here

Examples of org.dcm4che3.conf.prefs.PreferencesDicomConfiguration

                    LOG.error("Configuration backend error - {}", e);
                }
            } else if (cl.hasOption("prefs")) {
                // prefs
                try {
                    PreferencesDicomConfiguration conf = new PreferencesDicomConfiguration();
                    LOG.info("Started Loading LDAP configuration");
                    ArrayList<TransferCapability> tcs = null;
                    if(cl.hasOption("s")){
                    ApplicationEntity sourceAE = conf
                            .findApplicationEntity(instance.sourceAET);
                    tcs = (ArrayList<TransferCapability>) sourceAE
                            .getTransferCapabilities();
                    }
                    else
                    {
                        tcs = loadTCFile();
                    }
                    ArrayList<PresentationContext> pcs = addChunkedPCsandSend(
                            ae, device, instance, tcs);
                    // print accepted ones
                    ArrayList<PresentationContext> acceptedPCs = new ArrayList<PresentationContext>();
                    for (PresentationContext pc : pcs)
                        if (pc.isAccepted())
                            acceptedPCs.add(pc);

                    LOG.info("Probed the source ae and found the following accepted presentation contexts");
                    for (PresentationContext pc : acceptedPCs) {
                        LOG.info("PC[" + pc.getPCID() + "]\tAbstractSyntax:"
                                + pc.getAbstractSyntax() + "\n with "
                                + " the following Transfer-Syntax:["
                                + pc.getTransferSyntax() + "]");

                    }
                    LOG.info("finished probing TCs");
                    if(instance.destinationAET!=null){
                    LOG.info("Adding Accepted TCs to configuration backend");
                    ApplicationEntity destinationAE = conf
                            .findApplicationEntity(instance.destinationAET);
                   
                    Device toStore = destinationAE.getDevice();
                    TransferCapability[] TCs = mergeTCs(acceptedPCs);
                    for (TransferCapability tc : TCs)
                        toStore.getApplicationEntity(instance.destinationAET)
                                .addTransferCapability(tc);

                    conf.merge(toStore);
                    logAddedTCs(TCs, destinationAE);
                    conf.close();
                    }
                    System.exit(1);
                } catch (ConfigurationException e) {
                    LOG.error("Configuration backend error - {}", e);
                }
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.