예제 #1
0
        /// <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);
        }
예제 #2
0
        /// <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);
        }
예제 #3
0
        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);
            }
        }
예제 #4
0
        /// <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);
            }
        }
예제 #5
0
		/// <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);
			}


		}
예제 #6
0
		/// <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);
		}