public DcmPresContext GetPresentationContext(byte pcid) { DcmPresContext ctx = null; if (!_presContexts.TryGetValue(pcid, out ctx)) { throw new DicomNetworkException("Invalid Presentaion Context ID"); } return(ctx); }
private static bool HandleEchoAssociationRequest(DcmPresContext pc) { if (pc.AbstractSyntax == DicomUID.VerificationSOPClass) { AcceptStandardTransferSyntaxes(pc); return true; } return false; }
private static bool HandleMoveAssociationRequest(DcmPresContext pc) { if (pc.AbstractSyntax == DicomUID.StudyRootQueryRetrieveInformationModelMOVE) { AcceptStandardTransferSyntaxes(pc); return true; } return false; }
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); } }