本文整理汇总了C#中ClearCanvas.Dicom.Network.DicomServer.SendAssociateAbort方法的典型用法代码示例。如果您正苦于以下问题:C# DicomServer.SendAssociateAbort方法的具体用法?C# DicomServer.SendAssociateAbort怎么用?C# DicomServer.SendAssociateAbort使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ClearCanvas.Dicom.Network.DicomServer
的用法示例。
在下文中一共展示了DicomServer.SendAssociateAbort方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnReceiveResponseMessage
public void OnReceiveResponseMessage(DicomServer server, ServerAssociationParameters association, byte presentationID, DicomMessage message)
{
server.SendAssociateAbort(DicomAbortSource.ServiceUser, DicomAbortReason.NotSpecified);
Assert.Fail("Unexpected OnReceiveResponseMessage");
}
示例2:
void IDicomServerHandler.OnReceiveResponseMessage(DicomServer server, ServerAssociationParameters association, byte presentationID, DicomMessage message)
{
Platform.Log(LogLevel.Info,string.Format("Unexpectedly received response mess on server."));
server.SendAssociateAbort(DicomAbortSource.ServiceUser, DicomAbortReason.UnrecognizedPDU);
//_sessionDebug.DumpSession();
}
示例3: OnReceiveRequestMessage
public void OnReceiveRequestMessage(DicomServer server, ServerAssociationParameters association, byte presentationID, DicomMessage message)
{
if (_type == TestTypes.SendMR)
{
DicomAttributeCollection testSet = new DicomAttributeCollection();
_test.SetupMR(testSet);
bool same = testSet.Equals(message.DataSet);
string studyId = message.DataSet[DicomTags.StudyId].GetString(0, "");
Assert.AreEqual(studyId, "1933");
DicomUid sopInstanceUid;
bool ok = message.DataSet[DicomTags.SopInstanceUid].TryGetUid(0, out sopInstanceUid);
if (!ok)
{
server.SendAssociateAbort(DicomAbortSource.ServiceUser, DicomAbortReason.NotSpecified);
return;
}
server.SendCStoreResponse(presentationID, message.MessageId, sopInstanceUid.UID, DicomStatuses.Success);
}
else if (_type == TestTypes.Receive)
{
DicomUid sopInstanceUid;
bool ok = message.DataSet[DicomTags.SopInstanceUid].TryGetUid(0, out sopInstanceUid);
if (!ok)
{
server.SendAssociateAbort(DicomAbortSource.ServiceUser, DicomAbortReason.InvalidPDUParameter);
return;
}
server.SendCStoreResponse(presentationID, message.MessageId, sopInstanceUid.UID, DicomStatuses.Success);
}
else
{
Platform.Log(LogLevel.Error,"Unexpected test type mode");
server.SendAssociateAbort(DicomAbortSource.ServiceUser, DicomAbortReason.InvalidPDUParameter);
return;
}
}
示例4: OnReceiveMWLQuery
void IDicomServerHandler.OnReceiveRequestMessage(DicomServer server, ServerAssociationParameters association, byte presentationID, DicomMessage message)
{
//_sessionDebug.SetAssociationDumpString(association);
//_sessionDebug._request = message.Dump();
#region Cancel request
if (message.CommandField == DicomCommandField.CCancelRequest)
{
Platform.Log(LogLevel.Info,string.Format("Received CANCEL-RQ message from {0}.", association.CallingAE));
_cancelReceived = true;
return;
}
#endregion
#region CEcho request
if (message.CommandField == DicomCommandField.CEchoRequest)
{
server.SendCEchoResponse(presentationID, message.MessageId, DicomStatuses.Success);
Platform.Log(LogLevel.Info,string.Format("Received ECHO-RQ message from {0}.", association.CallingAE));
return;
}
#endregion
#region MWL C-FIND request
if (message.CommandField == DicomCommandField.CFindRequest)
{
Platform.Log(LogLevel.Info,string.Format("Message Dumped :\n" + message.Dump("", DicomDumpOptions.KeepGroupLengthElements)));
String level = message.DataSet[DicomTags.QueryRetrieveLevel].GetString(0, string.Empty);
_cancelReceived = false;
if (message.AffectedSopClassUid.Equals(SopClass.ModalityWorklistInformationModelFindUid))
OnReceiveMWLQuery(server, presentationID, message);
else
// Not supported message type, send a failure status.
server.SendCFindResponse(presentationID, message.MessageId, new DicomMessage(),
DicomStatuses.QueryRetrieveIdentifierDoesNotMatchSOPClass);
return;
}
#endregion
//ignore all unsupported request
server.SendAssociateAbort(DicomAbortSource.ServiceProvider, DicomAbortReason.UnexpectedPDU);
Platform.Log(LogLevel.Info,string.Format("Unexpected Command. Send Associate Abort message from server to {0}.", association.CallingAE));
return;
}
示例5:
// Create the Bitmap object and populate its pixel data with the stored pixel values.
void IDicomServerHandler.OnReceiveResponseMessage(DicomServer server, ServerAssociationParameters association,
byte presentationId, DicomMessage message)
{
VBLogger.LogError("Unexpectedly received response mess on server.");
server.SendAssociateAbort(DicomAbortSource.ServiceUser, DicomAbortReason.UnrecognizedPDU);
}
示例6: OnReceiveResponseMessage
public void OnReceiveResponseMessage(DicomServer server, ServerAssociationParameters association, byte presentationID, ClearCanvas.Dicom.DicomMessage message)
{
server.SendAssociateAbort(DicomAbortSource.ServiceUser, DicomAbortReason.UnexpectedPDU);
}
示例7: ModalityPerformedProcedureStepIod
//.........这里部分代码省略.........
string cacheKeyId = message.DataSet[DicomTags.AffectedSopInstanceUid].GetString(0, string.Empty);
bool alreadyCached;
MPPSScp.CacheMppsEntity(association, cacheKeyId, mppsIod, out alreadyCached);
if (alreadyCached)
{
server.SendNCreateResponse(presentationID, message.MessageId, new DicomMessage(), DicomStatuses.DuplicateSOPInstance);
Platform.Log(LogLevel.Error, "Recieved duplicated N-Create Request.");
return;
}
if (!ProcessNCreateRequest(server, presentationID, message))
{
server.SendNCreateResponse(presentationID, message.MessageId, new DicomMessage(), DicomStatuses.ProcessingFailure);
Platform.Log(LogLevel.Error, "Sending Processing due to NCreate request Failure.");
return;
}
server.SendNCreateResponse(presentationID, message.MessageId, new DicomMessage(), DicomStatuses.Success);
return;
}
#endregion
#region MPPS NSet Request
if (message.CommandField == DicomCommandField.NSetRequest)
{
// june -1st-2009 :
// Unlike the "ModalityWorklistIod" class, the ModalityPerformedProcedureStepIod is fully implemented
// we can use it here.
ModalityPerformedProcedureStepIod mppsIod = new ModalityPerformedProcedureStepIod(message.DataSet);
Platform.Log(LogLevel.Info, "Message Dumped :\n" + message.Dump("", DicomDumpOptions.KeepGroupLengthElements));
// check if pps already in cache (duplicated step)
string cacheKeyId = message.DataSet[DicomTags.AffectedSopInstanceUid].GetString(0, string.Empty);
if (!IsMppsEntitycached(association, cacheKeyId))
{
server.SendNCreateResponse(presentationID, message.MessageId, new DicomMessage(), DicomStatuses.NoSuchObjectInstance);
Platform.Log(LogLevel.Error, "Received Unknown NSset SOP.");
return;
}
// status diffrent from in progress
if (mppsIod.PerformedProcedureStepInformation.PerformedProcedureStepStatus == ClearCanvas.Dicom.Iod.Modules.PerformedProcedureStepStatus.InProgress)
{
server.SendNCreateResponse(presentationID, message.MessageId, new DicomMessage(), DicomStatuses.InvalidAttributeValue);
Platform.Log(LogLevel.Error, "Recieved N-Set Request with In Progress status.");
return;
}
// checking the received mppsiod against cached one
ModalityPerformedProcedureStepIod cachedMppsIod = GetCachedMppsIod(association, cacheKeyId);
//assuming cachedMppsIod not null.
bool conform = CheckNSetDataSetConformance(server, association, presentationID, cachedMppsIod, mppsIod, true);
if (!conform)
{
server.SendNCreateResponse(presentationID, message.MessageId, new DicomMessage(), DicomStatuses.InvalidAttributeValue);
Platform.Log(LogLevel.Error, "Sending Failure Response.");
return;
}
string studyInstanceUID = mppsIod.
PerformedProcedureStepRelationship.
DicomAttributeProvider[DicomTags.StudyInstanceUid].
GetString(0,"");
XmlElement performedSeriesSQ = GenerateXmlForPerformedSeriesSQ(message,studyInstanceUID);
bool success = true;
if (mppsIod.PerformedProcedureStepInformation.PerformedProcedureStepStatus
== ClearCanvas.Dicom.Iod.Modules.PerformedProcedureStepStatus.Completed)
{
success = ProcessNSetRequestForCompleted(server, presentationID, message, performedSeriesSQ);
}
if (mppsIod.PerformedProcedureStepInformation.PerformedProcedureStepStatus
== ClearCanvas.Dicom.Iod.Modules.PerformedProcedureStepStatus.Discontinued)
{
success = ProcessNSetRequestForDiscontinued(server, presentationID, message, performedSeriesSQ);
}
if (success)
server.SendNSetResponse(presentationID, message.MessageId, new DicomMessage(), DicomStatuses.Success);
else
server.SendNSetResponse(presentationID, message.MessageId, new DicomMessage(), DicomStatuses.ProcessingFailure);
MPPSScp.RemoveMppsEntityFromCache(association, cacheKeyId);
return;
}
#endregion
//ignore all unsupported request
server.SendAssociateAbort(DicomAbortSource.ServiceProvider, DicomAbortReason.UnexpectedPDU);
Platform.Log(LogLevel.Info, "Unexpected Command. Send Associate Abort message from server to {0}.", association.CallingAE);
return;
}
示例8:
void IDicomServerHandler.OnReceiveResponseMessage(DicomServer server, ServerAssociationParameters association, byte presentationID, DicomMessage message)
{
ClearCanvas.Common.Platform.Log(LogLevel.Error, "Unexpectedly received response mess on server.");
server.SendAssociateAbort(DicomAbortSource.ServiceUser, DicomAbortReason.UnrecognizedPDU);
}