/// <summary> /// Called when received associate accept. For StorageScu, we then attempt to send the first file. /// </summary> /// <param name="client">The client.</param> /// <param name="association">The association.</param> public override void OnReceiveAssociateAccept(DicomClient client, ClientAssociationParameters association) { base.OnReceiveAssociateAccept(client, association); Platform.Log(LogLevel.Info, "Association Accepted:\r\n{0}", association.ToString()); _fileListIndex = 0; SendCStoreUntilSuccess(client, association); }
/// <summary> /// Called when received associate accept. For StorageScu, we then attempt to send the first file. /// </summary> /// <param name="client">The client.</param> /// <param name="association">The association.</param> public override void OnReceiveAssociateAccept(DicomClient client, ClientAssociationParameters association) { base.OnReceiveAssociateAccept(client, association); LogAdapter.Logger.InfoWithFormat("Association Accepted:\r\n{0}", association.ToString()); _fileListIndex = 0; SendCStoreUntilSuccess(client, association); }
public void OnReceiveAssociateAccept(DicomClient client, ClientAssociationParameters association) { Logger.LogInfo("Association Accepted:\r\n{0}", association.ToString()); _fileListIndex = 0; bool ok = SendCStore(client, association); while (ok == false) { _fileListIndex++; if (_fileListIndex >= _fileList.Count) { Logger.LogInfo("Completed sending C-STORE-RQ messages, releasing association."); client.SendReleaseRequest(); return; } ok = SendCStore(client, association); } }
/// <summary> /// Called when received associate accept. For StorageScu, we then attempt to send the first file. /// </summary> /// <param name="client">The client.</param> /// <param name="association">The association.</param> public override void OnReceiveAssociateAccept(DicomClient client, ClientAssociationParameters association) { base.OnReceiveAssociateAccept(client, association); LogAdapter.Logger.Info("Association Accepted:\r\n{0}", association.ToString()); byte pcid = association.FindAbstractSyntaxWithTransferSyntax(SopClass.StorageCommitmentPushModelSopClass, TransferSyntax.ExplicitVrLittleEndian); if (pcid == 0) { pcid = association.FindAbstractSyntaxWithTransferSyntax(SopClass.StorageCommitmentPushModelSopClass, TransferSyntax.ImplicitVrLittleEndian); } if (pcid == 0) { client.SendAssociateAbort(DicomAbortSource.ServiceUser, DicomAbortReason.NotSpecified); return; } DicomMessage msg = new DicomMessage(); msg.RequestedSopInstanceUid = "1.2.840.10008.1.20.1.1"; msg.ActionTypeId = 1; msg.DataSet[DicomTags.TransactionUid].SetStringValue(DicomUid.GenerateUid().UID); foreach (StorageInstance instance in StorageInstanceList) { DicomSequenceItem item = new DicomSequenceItem(); msg.DataSet[DicomTags.ReferencedSopSequence].AddSequenceItem(item); item[DicomTags.ReferencedSopClassUid].SetStringValue(instance.SopClass.Uid); item[DicomTags.ReferencedSopInstanceUid].SetStringValue(instance.SopInstanceUid); } }
/// <summary> /// Called when received associate accept. For StorageScu, we then attempt to send the first file. /// </summary> /// <param name="client">The client.</param> /// <param name="association">The association.</param> public override void OnReceiveAssociateAccept(DicomClient client, ClientAssociationParameters association) { base.OnReceiveAssociateAccept(client, association); Platform.Log(LogLevel.Info, "Association Accepted:\r\n{0}", association.ToString()); byte pcid = association.FindAbstractSyntaxWithTransferSyntax(SopClass.StorageCommitmentPushModelSopClass, TransferSyntax.ExplicitVrLittleEndian); if (pcid == 0) pcid = association.FindAbstractSyntaxWithTransferSyntax(SopClass.StorageCommitmentPushModelSopClass, TransferSyntax.ImplicitVrLittleEndian); if (pcid == 0) { client.SendAssociateAbort(DicomAbortSource.ServiceUser, DicomAbortReason.NotSpecified); return; } DicomMessage msg = new DicomMessage(); msg.RequestedSopInstanceUid = "1.2.840.10008.1.20.1.1"; msg.ActionTypeId = 1; msg.DataSet[DicomTags.TransactionUid].SetStringValue(DicomUid.GenerateUid().UID); foreach (StorageInstance instance in StorageInstanceList) { DicomSequenceItem item = new DicomSequenceItem(); msg.DataSet[DicomTags.ReferencedSopSequence].AddSequenceItem(item); item[DicomTags.ReferencedSopClassUid].SetStringValue(instance.SopClass.Uid); item[DicomTags.ReferencedSopInstanceUid].SetStringValue(instance.SopInstanceUid); } }
/// <summary> /// Called when received associate accept. For StorageScu, we then attempt to send the first file. /// </summary> /// <param name="client">The client.</param> /// <param name="association">The association.</param> public override void OnReceiveAssociateAccept(DicomClient client, ClientAssociationParameters association) { base.OnReceiveAssociateAccept(client, association); Platform.Log(LogLevel.Info, "Association Accepted:\r\n{0}", association.ToString()); _fileListIndex = 0; SendCStoreUntilSuccess(client,association); }