Package org.dcm4che3.net.pdu

Examples of org.dcm4che3.net.pdu.PresentationContext


        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


        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));
View Full Code Here

           PresentationContext rqpc) {
       String as = rqpc.getAbstractSyntax();
       TransferCapability tc = roleSelection(rq, ac, as);
       int pcid = rqpc.getPCID();
       if (tc == null)
           return new PresentationContext(pcid,
                   PresentationContext.ABSTRACT_SYNTAX_NOT_SUPPORTED,
                   rqpc.getTransferSyntax());

       for (String ts : rqpc.getTransferSyntaxes())
           if (tc.containsTransferSyntax(ts)) {
               byte[] info = negotiate(rq.getExtNegotiationFor(as), tc);
               if (info != null)
                   ac.addExtendedNegotiation(new ExtendedNegotiation(as, info));
               return new PresentationContext(pcid,
                       PresentationContext.ACCEPTANCE, ts);
           }

       return new PresentationContext(pcid,
                PresentationContext.TRANSFER_SYNTAX_NOT_SUPPORTED,
                rqpc.getTransferSyntax());
    }
View Full Code Here

                break;
            default:
                skip(subItemLen);
            }
        }
        return new PresentationContext(pcid, result, as,
                tss.toArray(new String[tss.size()]));
    }
View Full Code Here

        if (pcid != - 1)
            return; // already inside decodeDIMSE

        nextPDV(PDVType.COMMAND, -1);

        PresentationContext pc = as.getPresentationContext(pcid);
        if (pc == null) {
            Association.LOG.warn(
                    "{}: No Presentation Context with given ID - {}",
                    as, pcid);
            throw new AAbort();
        }

        if (!pc.isAccepted()) {
            Association.LOG.warn(
                    "{}: No accepted Presentation Context with given ID - {}",
                    as, pcid);
            throw new AAbort();
        }

        Attributes cmd = readCommand();
        Dimse dimse = dimseOf(cmd);
        String tsuid = pc.getTransferSyntax();
        if (Dimse.LOG.isInfoEnabled()) {
            Dimse.LOG.info("{} >> {}", as, dimse.toString(cmd, pcid, tsuid));
            Dimse.LOG.debug("Command:\n{}", cmd);
        }
        if (dimse == Dimse.C_CANCEL_RQ) {
View Full Code Here

        this.discontinuationReason = attrs;
    }

    public void setTransferSyntaxes(String[] tss) {
        rq.addPresentationContext(
                new PresentationContext(1, UID.VerificationSOPClass,
                        UID.ImplicitVRLittleEndian));
        rq.addPresentationContext(
                new PresentationContext(3,
                        UID.ModalityPerformedProcedureStepSOPClass,
                        tss));
    }
View Full Code Here

        ArrayList<PresentationContext> allACPCs = new ArrayList<PresentationContext>();

        for (TransferCapability tc : tcs)
            if(tcs.size()>127)
            for (String ts : tc.getTransferSyntaxes()) {
                fullListSingleTS.add(new PresentationContext(pcID, tc
                        .getSopClass(), ts));
                pcID++;
                if (fullListSingleTS.size() > 127) {
                    lst.add(fullListSingleTS);
                    pcID = 1;
                    fullListSingleTS = new ArrayList<PresentationContext>();
                }
            }
            else{
                for (String ts : tc.getTransferSyntaxes()) {
                    fullListSingleTS.add(new PresentationContext(pcID, tc
                            .getSopClass(), ts));
                    pcID++;
                }
                lst.add(fullListSingleTS);
            }
View Full Code Here

    }

    public final void setInformationModel(InformationModel model, String[] tss,
            boolean relational) {
       this.model = model;
       rq.addPresentationContext(new PresentationContext(1, model.cuid, tss));
       if (relational)
           rq.addExtendedNegotiation(new ExtendedNegotiation(model.cuid, new byte[]{1}));
       if (model.level != null)
           addLevel(model.level);
    }
View Full Code Here

    }

     public void addOfferedStorageSOPClass(String cuid, String... tsuids) {
        if (!rq.containsPresentationContextFor(cuid))
            rq.addRoleSelection(new RoleSelection(cuid, false, true));
        rq.addPresentationContext(new PresentationContext(
                2 * rq.getNumberOfPresentationContexts() + 1, cuid, tsuids));
    }
View Full Code Here

        HashMap<String, PresentationContext> tsMap = pcMap.get(cuid);
        if (tsMap == null)
            throw new NoPresentationContextException(cuid);
        if (tsuid == null)
            return tsMap.values().iterator().next();
        PresentationContext pc = tsMap.get(tsuid);
        if (pc == null)
            throw new NoPresentationContextException(cuid, tsuid);
        return pc;
    }
View Full Code Here

TOP

Related Classes of org.dcm4che3.net.pdu.PresentationContext

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.