本文整理汇总了C#中ClearCanvas.Dicom.Network.DicomServer类的典型用法代码示例。如果您正苦于以下问题:C# DicomServer类的具体用法?C# DicomServer怎么用?C# DicomServer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DicomServer类属于ClearCanvas.Dicom.Network命名空间,在下文中一共展示了DicomServer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: OnReceiveRequestMessage
public void OnReceiveRequestMessage(DicomServer server, ServerAssociationParameters association, byte presentationID, ClearCanvas.Dicom.DicomMessage message)
{
foreach (byte pcid in association.GetPresentationContextIDs())
{
DicomPresContext context = association.GetPresentationContext(pcid);
if (context.Result == DicomPresContextResult.Accept)
{
if (context.AbstractSyntax == SopClass.StudyRootQueryRetrieveInformationModelFind)
{
DicomMessage response = new DicomMessage();
response.DataSet[DicomTags.StudyInstanceUid].SetStringValue("1.2.3");
response.DataSet[DicomTags.PatientId].SetStringValue("1");
response.DataSet[DicomTags.PatientsName].SetStringValue("test");
response.DataSet[DicomTags.StudyId].SetStringValue("1");
response.DataSet[DicomTags.StudyDescription].SetStringValue("dummy");
server.SendCFindResponse(presentationID, message.MessageId, response, DicomStatuses.Pending);
DicomMessage finalResponse = new DicomMessage();
server.SendCFindResponse(presentationID, message.MessageId, finalResponse, DicomStatuses.Success);
}
else if (context.AbstractSyntax == SopClass.VerificationSopClass)
{
server.SendCEchoResponse(presentationID, message.MessageId, DicomStatuses.Success);
}
}
}
}
开发者ID:nhannd,项目名称:Xian,代码行数:27,代码来源:Form1.cs
示例2: OnReceiveAssociateRequest
public void OnReceiveAssociateRequest(DicomServer server, ServerAssociationParameters association)
{
if (_delayAssociationAccept.Checked)
Thread.Sleep(TimeSpan.FromSeconds(35));
if (_rejectAssociation.Checked)
server.SendAssociateReject(DicomRejectResult.Permanent, DicomRejectSource.ServiceUser, DicomRejectReason.CallingAENotRecognized);
else
server.SendAssociateAccept(association);
}
开发者ID:nhannd,项目名称:Xian,代码行数:10,代码来源:Form1.cs
示例3: CompleteStream
public bool CompleteStream(DicomServer server, ServerAssociationParameters assoc, byte presentationId, DicomMessage message)
{
DicomProcessingResult result;
try
{
if (_fileStream != null)
{
_fileStream.Flush(true);
_fileStream.Close();
_fileStream.Dispose();
_fileStream = null;
}
var importer = new SopInstanceImporter(_importContext);
result = importer.ImportFile(message, _sourceFilename);
if (result.Successful)
{
if (!String.IsNullOrEmpty(result.AccessionNumber))
Platform.Log(LogLevel.Info, "Received SOP Instance {0} from {1} to {2} (A#:{3} StudyUid:{4})",
result.SopInstanceUid, assoc.CallingAE, assoc.CalledAE, result.AccessionNumber,
result.StudyInstanceUid);
else
Platform.Log(LogLevel.Info, "Received SOP Instance {0} from {1} to {2} (StudyUid:{3})",
result.SopInstanceUid, assoc.CallingAE, assoc.CalledAE,
result.StudyInstanceUid);
}
}
catch (Exception e)
{
result = new DicomProcessingResult { DicomStatus = DicomStatuses.ProcessingFailure, ErrorMessage = e.Message };
}
if (!result.Successful)
{
Platform.Log(LogLevel.Warn, "Failure importing sop: {0}", result.ErrorMessage);
}
CleanupDirectory();
server.SendCStoreResponse(presentationId, message.MessageId, message.AffectedSopInstanceUid, result.DicomStatus);
return true;
}
开发者ID:jfphilbin,项目名称:ClearCanvas,代码行数:44,代码来源:StorageFilestreamHandler.cs
示例4: OnReceiveAbort
public void OnReceiveAbort(DicomServer server, ServerAssociationParameters association, DicomAbortSource source, DicomAbortReason reason)
{
throw new Exception("The method or operation is not implemented.");
}
开发者ID:tcchau,项目名称:ClearCanvas,代码行数:4,代码来源:AssociationTests.cs
示例5: OnReceiveResponseMessage
public void OnReceiveResponseMessage(DicomServer server, ServerAssociationParameters association, byte presentationID, DicomMessage message)
{
server.SendAssociateAbort(DicomAbortSource.ServiceUser, DicomAbortReason.NotSpecified);
Assert.Fail("Unexpected OnReceiveResponseMessage");
}
开发者ID:tcchau,项目名称:ClearCanvas,代码行数:5,代码来源:AssociationTests.cs
示例6: OnReceiveAssociateRequest
public void OnReceiveAssociateRequest(DicomServer server, ServerAssociationParameters association)
{
server.SendAssociateAccept(association);
}
开发者ID:tcchau,项目名称:ClearCanvas,代码行数:4,代码来源:AssociationTests.cs
示例7: OnNetworkError
public void OnNetworkError(DicomServer server, ServerAssociationParameters association, Exception e)
{
Assert.Fail("Unexpected network error: " + e.Message);
}
开发者ID:tcchau,项目名称:ClearCanvas,代码行数:4,代码来源:AssociationTests.cs
示例8: OnReceiveSeriesLevelQuery
/// <summary>
/// Method for processing Series level queries.
/// </summary>
/// <param name="server"></param>
/// <param name="presentationId"></param>
/// <param name="message"></param>
/// <returns></returns>
private void OnReceiveSeriesLevelQuery(DicomServer server, byte presentationId, DicomMessage message)
{
//Read context for the query.
using (IReadContext read = PersistentStoreRegistry.GetDefaultStore().OpenReadContext())
{
var tagList = new List<DicomTag>();
var selectSeries = read.GetBroker<ISeriesEntityBroker>();
var criteria = new SeriesSelectCriteria();
criteria.ServerPartitionKey.EqualTo(Partition.GetKey());
DicomAttributeCollection data = message.DataSet;
foreach (DicomAttribute attrib in message.DataSet)
{
tagList.Add(attrib.Tag);
if (!attrib.IsNull)
switch (attrib.Tag.TagValue)
{
case DicomTags.StudyInstanceUid:
List<ServerEntityKey> list =
LoadStudyKey(read, (string[]) data[DicomTags.StudyInstanceUid].Values);
if (list.Count == 0)
{
server.SendCFindResponse(presentationId, message.MessageId, new DicomMessage(),
DicomStatuses.Success);
AuditLog(server.AssociationParams, EventIdentificationContentsEventOutcomeIndicator.Success, message);
return;
}
QueryHelper.SetKeyCondition(criteria.StudyKey, list.ToArray());
break;
case DicomTags.SeriesInstanceUid:
QueryHelper.SetStringArrayCondition(criteria.SeriesInstanceUid,
(string[]) data[DicomTags.SeriesInstanceUid].Values);
break;
case DicomTags.Modality:
QueryHelper.SetStringCondition(criteria.Modality, data[DicomTags.Modality].GetString(0, string.Empty));
break;
case DicomTags.SeriesNumber:
QueryHelper.SetStringCondition(criteria.SeriesNumber, data[DicomTags.SeriesNumber].GetString(0, string.Empty));
break;
case DicomTags.SeriesDescription:
QueryHelper.SetStringCondition(criteria.SeriesDescription,
data[DicomTags.SeriesDescription].GetString(0, string.Empty));
break;
case DicomTags.PerformedProcedureStepStartDate:
QueryHelper.SetRangeCondition(criteria.PerformedProcedureStepStartDate,
data[DicomTags.PerformedProcedureStepStartDate].GetString(0, string.Empty));
break;
case DicomTags.PerformedProcedureStepStartTime:
QueryHelper.SetRangeCondition(criteria.PerformedProcedureStepStartTime,
data[DicomTags.PerformedProcedureStepStartTime].GetString(0, string.Empty));
break;
case DicomTags.RequestAttributesSequence: // todo
break;
default:
foreach (var q in _queryExtensions)
q.OnReceiveSeriesLevelQuery(message, attrib.Tag, criteria);
break;
}
}
int resultCount = 0;
try
{
// Open a second read context, in case other queries are required.
using (IReadContext subRead = PersistentStoreRegistry.GetDefaultStore().OpenReadContext())
{
selectSeries.Find(criteria, delegate(Series row)
{
if (CancelReceived)
throw new DicomException("DICOM C-Cancel Received");
resultCount++;
if (DicomSettings.Default.MaxQueryResponses != -1
&& DicomSettings.Default.MaxQueryResponses < resultCount)
{
SendBufferedResponses(server, presentationId, message);
throw new DicomException("Maximum Configured Query Responses Exceeded: " + resultCount);
}
var response = new DicomMessage();
PopulateSeries(subRead, message, response, tagList, row);
_responseQueue.Enqueue(response);
if (_responseQueue.Count >= DicomSettings.Default.BufferedQueryResponses)
SendBufferedResponses(server, presentationId, message);
});
SendBufferedResponses(server, presentationId, message);
}
}
catch (Exception e)
{
//.........这里部分代码省略.........
开发者ID:UIKit0,项目名称:ClearCanvas,代码行数:101,代码来源:QueryScpExtension.cs
示例9:
void IDicomServerHandler.OnReceiveAbort(DicomServer server, ServerAssociationParameters association, DicomAbortSource source, DicomAbortReason reason)
{
_cancelReceived = true;
Platform.Log(LogLevel.Info,string.Format("Unexpected association abort received."));
//_sessionDebug.DumpSession();
}
开发者ID:khaha2210,项目名称:radio,代码行数:7,代码来源:MWLScp.cs
示例10: 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;
}
开发者ID:khaha2210,项目名称:radio,代码行数:50,代码来源:MWLScp.cs
示例11: CheckForMissingRequiredMatchingKey
private bool CheckForMissingRequiredMatchingKey(DicomServer server, byte presentationID, DicomMessage message)
{
DicomAttribute attrib;
bool requiredMatchingKeyMissing = false;
string comment=""; // will receive a description of the first encountred missing r key.
// we don't need to collect all missing keys to speed up processing.
do
{
attrib = message.DataSet[DicomTags.ScheduledProcedureStepSequence];
if (attrib.IsNull)
{
requiredMatchingKeyMissing = true;
comment = "Missing Scheduled Procedure Step Sequence";
break;
}
DicomAttributeSQ sequence = attrib as DicomAttributeSQ;
if (attrib.Count == 0)
{
requiredMatchingKeyMissing = true;
comment = "Scheduled Procedure Step Sequence is empty";
break;
}
if (attrib.Count > 1)
{
requiredMatchingKeyMissing = true;
comment = "Found Multiple Items in Scheduled Procedure Step Sequence";
break;
}
DicomSequenceItem sequenceSubItems = sequence[0];
if (sequenceSubItems[DicomTags.ScheduledStationAeTitle].IsNull)
{
requiredMatchingKeyMissing = true;
comment = "Missing Scheduled Station Ae Title";
break;
}
if (sequenceSubItems[DicomTags.Modality].IsNull)
{
requiredMatchingKeyMissing = true;
comment = "Missing Modality";
break;
}
if (sequenceSubItems[DicomTags.ScheduledPerformingPhysiciansName].IsNull)
{
requiredMatchingKeyMissing = true;
comment = "Missing Scheduled Performing Physicians Name";
break;
}
if (sequenceSubItems[DicomTags.ScheduledProcedureStepStartDate].IsNull)
{
requiredMatchingKeyMissing = true;
comment = "Missing ScheduledProcedureStepStartDate";
break;
}
if (sequenceSubItems[DicomTags.ScheduledProcedureStepStartTime].IsNull)
{
requiredMatchingKeyMissing = true;
comment = "Missing Scheduled Procedure Step Start Time";
break;
}
} while (false);
// send specific error status to the calling AE
if (requiredMatchingKeyMissing)
{
Platform.Log(LogLevel.Error, "Required matching key missing on query from {0},"+
"\n Sending Failure Status Identifier Does Not Match SOPClass.",
server.AssociationParams.CallingAE);
Platform.Log(LogLevel.Error, "Error Details : {0},"+ comment);
DicomMessage errorResponse = new DicomMessage();
server.SendCFindResponse(presentationID, message.MessageId, errorResponse,
DicomStatuses.QueryRetrieveIdentifierDoesNotMatchSOPClass);
}
return requiredMatchingKeyMissing;
}
开发者ID:khaha2210,项目名称:radio,代码行数:82,代码来源:MWLScp.cs
示例12: CheckForUnSupportedOptionalMatchingKey
private bool CheckForUnSupportedOptionalMatchingKey(DicomServer server, byte presentationID, DicomMessage message,
bool logFirstUnsupportedAttributeOnly)
{
DicomAttribute attrib;
bool UnsupportedOptionalMatchingDetected = false;
string comments = "";
do
{
// ModalityWorklistIod modalityWorklistIod = new ModalityWorklistIod(message.DataSet);
attrib = message.DataSet[DicomTags.ScheduledProcedureStepSequence];
DicomAttributeSQ sequence = attrib as DicomAttributeSQ;
DicomSequenceItem sequenceSubItems = sequence[0]; //sequence supposed non empty as
// it have to be checked by the function
// CheckForMissingRequiredMatchingKey() first.
if (!sequenceSubItems[DicomTags.ScheduledProcedureStepDescription].IsNull)
{
UnsupportedOptionalMatchingDetected = true;
comments+= "Scheduled Procedure Step Description\n";
if (logFirstUnsupportedAttributeOnly) break;
}
if (!sequenceSubItems[DicomTags.ScheduledStationName].IsNull)
{
UnsupportedOptionalMatchingDetected = true;
comments += "Scheduled Station Name\n";
if (logFirstUnsupportedAttributeOnly) break;
}
if (!sequenceSubItems[DicomTags.ScheduledProcedureStepLocation].IsNull)
{
UnsupportedOptionalMatchingDetected = true;
comments+="Scheduled Procedure Step Location\n";
if (logFirstUnsupportedAttributeOnly) break;
}
if (!sequenceSubItems[DicomTags.ScheduledProtocolCodeSequence].IsNull)
{
UnsupportedOptionalMatchingDetected = true;
comments+="Scheduled Protocol Code Sequence\n";
if (logFirstUnsupportedAttributeOnly) break;
}
if (!sequenceSubItems[DicomTags.PreMedication].IsNull)
{
UnsupportedOptionalMatchingDetected = true;
comments+="PreMedication\n";
if (logFirstUnsupportedAttributeOnly) break;
}
if (!sequenceSubItems[DicomTags.RequestedContrastAgent].IsNull)
{
UnsupportedOptionalMatchingDetected = true;
comments+="Requested Contrast Agent\n";
if (logFirstUnsupportedAttributeOnly) break;
}
if (!sequenceSubItems[DicomTags.RequestedContrastAgent].IsNull)
{
UnsupportedOptionalMatchingDetected = true;
comments+="Requested Contrast Agent\n";
if (logFirstUnsupportedAttributeOnly) break;
}
if (!sequenceSubItems[DicomTags.ScheduledProcedureStepStatus].IsNull)
{
UnsupportedOptionalMatchingDetected = true;
comments+="Scheduled Procedure Step Status\n";
if (logFirstUnsupportedAttributeOnly) break;
}
if (!sequenceSubItems[DicomTags.CommentsOnTheScheduledProcedureStep].IsNull)
{
UnsupportedOptionalMatchingDetected = true;
comments+="Comments On The Scheduled Procedure Step\n";
if (logFirstUnsupportedAttributeOnly) break;
}
//TODO: verify the rest of the Optional Matching keys against your database existing fields in order
// to send appropriate status.
} while (false);
// send specific error status to the calling AE
if (UnsupportedOptionalMatchingDetected)
{
Platform.Log(LogLevel.Warn, "One or more Optional matching Sent by {0} key are note supported." ,
server.AssociationParams.CallingAE);
Platform.Log(LogLevel.Warn, "Unsupported Optional Matching Key Attributes Details : {0}," + comments);
}
return UnsupportedOptionalMatchingDetected;
}
开发者ID:khaha2210,项目名称:radio,代码行数:97,代码来源:MWLScp.cs
示例13: OnReceivePatientQuery
/// <summary>
/// Method for processing Patient level queries.
/// </summary>
/// <param name="server"></param>
/// <param name="presentationId"></param>
/// <param name="message">The Patient level query message.</param>
/// <returns></returns>
private void OnReceivePatientQuery(DicomServer server, byte presentationId, DicomMessage message)
{
var tagList = new List<DicomTag>();
using (IReadContext read = PersistentStoreRegistry.GetDefaultStore().OpenReadContext())
{
var find = read.GetBroker<IPatientEntityBroker>();
var criteria = new PatientSelectCriteria();
criteria.ServerPartitionKey.EqualTo(Partition.GetKey());
DicomAttributeCollection data = message.DataSet;
var studySelect = new StudySelectCriteria();
bool studySubSelect = false;
foreach (DicomAttribute attrib in message.DataSet)
{
tagList.Add(attrib.Tag);
if (!attrib.IsNull)
switch (attrib.Tag.TagValue)
{
case DicomTags.PatientsName:
QueryHelper.SetStringCondition(criteria.PatientsName, data[DicomTags.PatientsName].GetString(0, string.Empty));
break;
case DicomTags.PatientId:
QueryHelper.SetStringCondition(criteria.PatientId, data[DicomTags.PatientId].GetString(0, string.Empty));
break;
case DicomTags.IssuerOfPatientId:
QueryHelper.SetStringCondition(criteria.IssuerOfPatientId,
data[DicomTags.IssuerOfPatientId].GetString(0, string.Empty));
break;
case DicomTags.PatientsSex:
// Specify a subselect on Patients Sex in Study
QueryHelper.SetStringArrayCondition(studySelect.PatientsSex,
(string[])data[DicomTags.PatientsSex].Values);
if (!studySubSelect)
{
criteria.StudyRelatedEntityCondition.Exists(studySelect);
studySubSelect = true;
}
break;
case DicomTags.PatientsBirthDate:
// Specify a subselect on Patients Birth Date in Study
QueryHelper.SetStringArrayCondition(studySelect.PatientsBirthDate,
(string[])data[DicomTags.PatientsBirthDate].Values);
if (!studySubSelect)
{
criteria.StudyRelatedEntityCondition.Exists(studySelect);
studySubSelect = true;
}
break;
default:
foreach (var q in _queryExtensions)
{
bool extensionSubSelect;
q.OnReceivePatientLevelQuery(message, attrib.Tag, criteria, studySelect, out extensionSubSelect);
if (extensionSubSelect && !studySubSelect)
{
criteria.StudyRelatedEntityCondition.Exists(studySelect);
studySubSelect = true;
}
}
break;
}
}
int resultCount = 0;
try
{
find.Find(criteria, delegate(Patient row)
{
if (CancelReceived)
throw new DicomException("DICOM C-Cancel Received");
resultCount++;
if (DicomSettings.Default.MaxQueryResponses != -1
&& DicomSettings.Default.MaxQueryResponses < resultCount)
{
SendBufferedResponses(server, presentationId, message);
throw new DicomException("Maximum Configured Query Responses Exceeded: " + resultCount);
}
var response = new DicomMessage();
PopulatePatient(response, tagList, row);
_responseQueue.Enqueue(response);
if (_responseQueue.Count >= DicomSettings.Default.BufferedQueryResponses)
SendBufferedResponses(server, presentationId, message);
});
SendBufferedResponses(server, presentationId, message);
}
//.........这里部分代码省略.........
开发者ID:UIKit0,项目名称:ClearCanvas,代码行数:101,代码来源:QueryScpExtension.cs
示例14: OnReceiveStudyLevelQuery
/// <summary>
/// Method for processing Study level queries.
/// </summary>
/// <param name="server"></param>
/// <param name="presentationId"></param>
/// <param name="message"></param>
/// <returns></returns>
private void OnReceiveStudyLevelQuery(DicomServer server, byte presentationId, DicomMessage message)
{
var tagList = new List<DicomTag>();
using (IReadContext read = PersistentStoreRegistry.GetDefaultStore().OpenReadContext())
{
var find = read.GetBroker<IStudyEntityBroker>();
var criteria = new StudySelectCriteria();
criteria.ServerPartitionKey.EqualTo(Partition.GetKey());
DicomAttributeCollection data = message.DataSet;
foreach (DicomAttribute attrib in message.DataSet)
{
tagList.Add(attrib.Tag);
if (!attrib.IsNull)
switch (attrib.Tag.TagValue)
{
case DicomTags.StudyInstanceUid:
QueryHelper.SetStringArrayCondition(criteria.StudyInstanceUid,
(string[]) data[DicomTags.StudyInstanceUid].Values);
break;
case DicomTags.PatientsName:
QueryHelper.SetStringCondition(criteria.PatientsName, data[DicomTags.PatientsName].GetString(0, string.Empty));
break;
case DicomTags.PatientId:
QueryHelper.SetStringCondition(criteria.PatientId, data[DicomTags.PatientId].GetString(0, string.Empty));
break;
case DicomTags.PatientsBirthDate:
QueryHelper.SetRangeCondition(criteria.PatientsBirthDate,
data[DicomTags.PatientsBirthDate].GetString(0, string.Empty));
break;
case DicomTags.PatientsSex:
QueryHelper.SetStringCondition(criteria.PatientsSex, data[DicomTags.PatientsSex].GetString(0, string.Empty));
break;
case DicomTags.StudyDate:
QueryHelper.SetRangeCondition(criteria.StudyDate, data[DicomTags.StudyDate].GetString(0, string.Empty));
break;
case DicomTags.StudyTime:
QueryHelper.SetRangeCondition(criteria.StudyTime, data[DicomTags.StudyTime].GetString(0, string.Empty));
break;
case DicomTags.AccessionNumber:
QueryHelper.SetStringCondition(criteria.AccessionNumber,
data[DicomTags.AccessionNumber].GetString(0, string.Empty));
break;
case DicomTags.StudyId:
QueryHelper.SetStringCondition(criteria.StudyId, data[DicomTags.StudyId].GetString(0, string.Empty));
break;
case DicomTags.StudyDescription:
QueryHelper.SetStringCondition(criteria.StudyDescription,
data[DicomTags.StudyDescription].GetString(0, string.Empty));
break;
case DicomTags.ReferringPhysiciansName:
QueryHelper.SetStringCondition(criteria.ReferringPhysiciansName,
data[DicomTags.ReferringPhysiciansName].GetString(0, string.Empty));
break;
case DicomTags.ModalitiesInStudy:
// Specify a subselect on Modality in series
var seriesSelect = new SeriesSelectCriteria();
QueryHelper.SetStringArrayCondition(seriesSelect.Modality,
(string[]) data[DicomTags.ModalitiesInStudy].Values);
criteria.SeriesRelatedEntityCondition.Exists(seriesSelect);
break;
default:
foreach (var q in _queryExtensions)
q.OnReceiveStudyLevelQuery(message, attrib.Tag, criteria);
break;
}
}
int resultCount = 0;
try
{
// Open another read context, in case additional queries are required.
using (IReadContext subRead = PersistentStoreRegistry.GetDefaultStore().OpenReadContext())
{
// First find the Online studies
var storageCriteria = new StudyStorageSelectCriteria();
storageCriteria.StudyStatusEnum.NotEqualTo(StudyStatusEnum.Nearline);
storageCriteria.QueueStudyStateEnum.NotIn(new[] {QueueStudyStateEnum.DeleteScheduled, QueueStudyStateEnum.WebDeleteScheduled, QueueStudyStateEnum.EditScheduled});
criteria.StudyStorageRelatedEntityCondition.Exists(storageCriteria);
find.Find(criteria, delegate(Study row)
{
if (CancelReceived)
throw new DicomException("DICOM C-Cancel Received");
resultCount++;
if (DicomSettings.Default.MaxQueryResponses != -1
&& DicomSettings.Default.MaxQueryResponses < resultCount)
{
SendBufferedResponses(server, presentationId, message);
throw new DicomException("Maximum Configured Query Responses Exceeded: " + resultCount);
//.........这里部分代码省略.........
开发者ID:UIKit0,项目名称:ClearCanvas,代码行数:101,代码来源:QueryScpExtension.cs
示例15: OnClientClosed
public void OnClientClosed(DicomServer server, ServerAssociationParameters association)
{
}
开发者ID:tcchau,项目名称:ClearCanvas,代码行数:3,代码来源:AssociationTests.cs
示例16: OnDimseTimeout
public void OnDimseTimeout(DicomServer client, ServerAssociationParameters association)
{
}
开发者ID:tcchau,项目名称:ClearCanvas,代码行数:3,代码来源:AssociationTests.cs
示例17: OnReceiveDimseCommand
public void OnReceiveDimseCommand(DicomServer server, ServerAssociationParameters association, byte presentationId,
DicomAttributeCollection command)
{
}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:4,代码来源:AssociationTests.cs
示例18: 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;
}
}
开发者ID:tcchau,项目名称:ClearCanvas,代码行数:44,代码来源:AssociationTests.cs
示例19: OnStartFilestream
public IDicomFilestreamHandler OnStartFilestream(DicomServer server, ServerAssociationParameters association,
byte presentationId, DicomMessage message)
{
throw new NotImplementedException();
}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:5,代码来源:AssociationTests.cs
示例20: OnReceiveReleaseRequest
public void OnReceiveReleaseRequest(DicomServer server, ServerAssociationParameters association)
{
}
开发者ID:tcchau,项目名称:ClearCanvas,代码行数:4,代码来源:AssociationTests.cs
注:本文中的ClearCanvas.Dicom.Network.DicomServer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论