Package org.dcm4che3.net

Examples of org.dcm4che3.net.StorageOptions


            throws IncompatibleConnectionException {
        ActiveConnection activeConnection = this.activeConnection;
        if (activeConnection != null)
            return activeConnection;

        Device arrDev = this.arrDevice;
        if (arrDevice == null)
            throw new IllegalStateException("No AuditRecordRepositoryDevice initalized");

        AuditRecordRepository arr = arrDev.getDeviceExtension(AuditRecordRepository.class);
        if (arr == null)
            throw new IllegalStateException("AuditRecordRepositoryDevice "
                    + arrDevice.getDeviceName()
                    + " does not provide Audit Record Repository");
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));
View Full Code Here

            sendRequest(makeActionInfo(refSOPs));
    }

    private void sendRequest(Attributes actionInfo) throws IOException, InterruptedException {
        final String tuid = actionInfo.getString(Tag.TransactionUID);
        DimseRSPHandler rspHandler = new DimseRSPHandler(as.nextMessageID()) {

            @Override
            public void onDimseRSP(Association as, Attributes cmd, Attributes data) {
                if (cmd.getInt(Tag.Status, -1) != Status.Success)
                    removeOutstandingResult(tuid );
View Full Code Here

        main.setRspHandlerFactory(new MppsSCU.RSPHandlerFactory() {

            @Override
            public DimseRSPHandler createDimseRSPHandlerForNCreate(final MppsSCU.MppsWithIUID mppsWithUID) {

                return new DimseRSPHandler(0) {

                    @Override
                    public void onDimseRSP(Association as, Attributes cmd,
                            Attributes data) {
                       
                        switch(cmd.getInt(Tag.Status, -1)) {
                        case Status.Success:
                        case Status.AttributeListError:
                        case Status.AttributeValueOutOfRange:
                            mppsWithUID.iuid = cmd.getString(
                                    Tag.AffectedSOPInstanceUID, mppsWithUID.iuid);
                            main.addCreatedMpps(mppsWithUID);
                        }
                       
                        super.onDimseRSP(as, cmd, data);
                        MppsTest.this.onNCreateRSP(cmd);
                    }
                };
            }
           
            @Override
            public DimseRSPHandler createDimseRSPHandlerForNSet() {
               
                return new DimseRSPHandler(0) {
                   
                    @Override
                    public void onDimseRSP(Association as, Attributes cmd, Attributes data) {
                       
                        super.onDimseRSP(as, cmd, data);
View Full Code Here

        main.setRspHandlerFactory(new StoreSCU.RSPHandlerFactory() {

            @Override
            public DimseRSPHandler createDimseRSPHandler(final File f) {

                return new DimseRSPHandler(0) {

                    @Override
                    public void onDimseRSP(Association as, Attributes cmd,
                            Attributes data) {
                        super.onDimseRSP(as, cmd, data);
View Full Code Here

                        return (this.activeConnection =
                                conn.getProtocol().isTCP()
                                ? new TCPConnection(conn, remoteConn)
                                : new UDPConnection(conn, remoteConn));
                     }
        throw new IncompatibleConnectionException(
                "No compatible connection to " + arr + " available on " + this);
    }
View Full Code Here

            PreferencesUtils.storeNotDef(prefs, "dcmFuzzySemanticMatching",
                    queryOpts.contains(QueryOption.FUZZY), false);
            PreferencesUtils.storeNotDef(prefs, "dcmTimezoneQueryAdjustment",
                    queryOpts.contains(QueryOption.TIMEZONE), false);
        }
        StorageOptions storageOpts = tc.getStorageOptions();
        if (storageOpts != null) {
            prefs.putInt("dcmStorageConformance",
                    storageOpts.getLevelOfSupport().ordinal());
            prefs.putInt("dcmDigitalSignatureSupport",
                    storageOpts.getDigitalSignatureSupport().ordinal());
            prefs.putInt("dcmDataElementCoercion",
                    storageOpts.getElementCoercion().ordinal());
        }
    }
View Full Code Here

        int levelOfSupport = prefs.getInt("dcmStorageConformance", -1);
        int signatureSupport = prefs.getInt("dcmDigitalSignatureSupport", -1);
        int coercion = prefs.getInt("dcmDataElementCoercion", -1);
        if (levelOfSupport == -1 && signatureSupport == -1 && coercion == -1)
            return null;
        StorageOptions opts = new StorageOptions();
        if (levelOfSupport != -1)
            opts.setLevelOfSupport(StorageOptions.LevelOfSupport.valueOf(levelOfSupport));
        if (signatureSupport != -1)
            opts.setDigitalSignatureSupport(
                    StorageOptions.DigitalSignatureSupport.valueOf(signatureSupport));
        if (coercion != -1)
            opts.setElementCoercion(StorageOptions.ElementCoercion.valueOf(coercion));
        return opts;
    }
View Full Code Here

            LdapUtils.storeNotDef(attrs, "dcmFuzzySemanticMatching",
                    queryOpts.contains(QueryOption.FUZZY), false);
            LdapUtils.storeNotDef(attrs, "dcmTimezoneQueryAdjustment",
                    queryOpts.contains(QueryOption.TIMEZONE), false);
        }
        StorageOptions storageOpts = tc.getStorageOptions();
        if (storageOpts != null) {
            LdapUtils.storeInt(attrs, "dcmStorageConformance",
                    storageOpts.getLevelOfSupport().ordinal());
            LdapUtils.storeInt(attrs, "dcmDigitalSignatureSupport",
                    storageOpts.getDigitalSignatureSupport().ordinal());
            LdapUtils.storeInt(attrs, "dcmDataElementCoercion",
                    storageOpts.getElementCoercion().ordinal());
        }
        return attrs;
    }
View Full Code Here

        Attribute levelOfSupport = attrs.get("dcmStorageConformance");
        Attribute signatureSupport = attrs.get("dcmDigitalSignatureSupport");
        Attribute coercion = attrs.get("dcmDataElementCoercion");
        if (levelOfSupport == null && signatureSupport == null && coercion == null)
            return null;
        StorageOptions opts = new StorageOptions();
        opts.setLevelOfSupport(
                StorageOptions.LevelOfSupport.valueOf(LdapUtils.intValue(levelOfSupport, 3)));
        opts.setDigitalSignatureSupport(
                StorageOptions.DigitalSignatureSupport.valueOf(LdapUtils.intValue(signatureSupport, 0)));
        opts.setElementCoercion(
                StorageOptions.ElementCoercion.valueOf(LdapUtils.intValue(coercion, 2)));
        return opts;
    }
View Full Code Here

TOP

Related Classes of org.dcm4che3.net.StorageOptions

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.