示例#1
0
        public DcmPresContext GetPresentationContext(byte pcid)
        {
            DcmPresContext ctx = null;

            if (!_presContexts.TryGetValue(pcid, out ctx))
            {
                throw new DicomNetworkException("Invalid Presentaion Context ID");
            }
            return(ctx);
        }
示例#2
0
        private static bool HandleEchoAssociationRequest(DcmPresContext pc)
        {
            if (pc.AbstractSyntax == DicomUID.VerificationSOPClass)
            {
                AcceptStandardTransferSyntaxes(pc);

                return true;
            }

            return false;
        }
示例#3
0
        private static bool HandleMoveAssociationRequest(DcmPresContext pc)
        {
            if (pc.AbstractSyntax == DicomUID.StudyRootQueryRetrieveInformationModelMOVE)
            {
                AcceptStandardTransferSyntaxes(pc);

                return true;
            }

            return false;
        }
示例#4
0
 private static void AcceptStandardTransferSyntaxes(DcmPresContext pc)
 {
     if (pc.HasTransfer(DicomTransferSyntax.ImplicitVRLittleEndian))
     {
         pc.SetResult(DcmPresContextResult.Accept, DicomTransferSyntax.ImplicitVRLittleEndian);
     }
     else if (pc.HasTransfer(DicomTransferSyntax.ExplicitVRLittleEndian))
     {
         pc.SetResult(DcmPresContextResult.Accept, DicomTransferSyntax.ExplicitVRLittleEndian);
     }
     else if (pc.HasTransfer(DicomTransferSyntax.ExplicitVRBigEndian))
     {
         pc.SetResult(DcmPresContextResult.Accept, DicomTransferSyntax.ExplicitVRBigEndian);
     }
 }