当前位置: 首页>>代码示例>>C#>>正文


C# DicomClient.NextMessageID方法代码示例

本文整理汇总了C#中DicomClient.NextMessageID方法的典型用法代码示例。如果您正苦于以下问题:C# DicomClient.NextMessageID方法的具体用法?C# DicomClient.NextMessageID怎么用?C# DicomClient.NextMessageID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DicomClient的用法示例。


在下文中一共展示了DicomClient.NextMessageID方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SendVerificationRequest

		/// <summary>
		/// Generic routine to send the next C-ECHO-RQ message.
		/// </summary>
		/// <param name="client">DICOM Client class</param>
		/// <param name="association">Association Parameters</param>
		private void SendVerificationRequest(DicomClient client, ClientAssociationParameters association)
		{
			byte pcid = association.FindAbstractSyntax(SopClass.VerificationSopClass);

			client.SendCEchoRequest(pcid, client.NextMessageID());
		}
开发者ID:khaha2210,项目名称:radio,代码行数:11,代码来源:VerificationScu.cs

示例2: SendMoveRequest

        /// <summary>
        /// Sends the move request (called after the association is accepted).
        /// </summary>
        /// <param name="client">The client.</param>
        /// <param name="association">The association.</param>
        private void SendMoveRequest(DicomClient client, ClientAssociationParameters association)
        {
            byte pcid = association.FindAbstractSyntaxOrThrowException(MoveSopClass);

            DicomMessage dicomMessage = new DicomMessage();
            foreach (DicomAttribute dicomAttribute in _dicomAttributeCollection)
            {
                // Need to do it this way in case the attribute is blank
                DicomAttribute dicomAttribute2 = dicomMessage.DataSet[dicomAttribute.Tag];
                if (dicomAttribute.Values != null)
                    dicomAttribute2.Values = dicomAttribute.Values;
            }

            client.SendCMoveRequest(pcid, client.NextMessageID(), _destinationAe, dicomMessage);
        }
开发者ID:scottshea,项目名称:monodicom,代码行数:20,代码来源:MoveScu.cs

示例3: SendRequest

 /// <summary>
 /// Sends the find request.
 /// </summary>
 /// <param name="client">The client.</param>
 /// <param name="association">The association.</param>
 private static void SendRequest(DicomClient client, ClientAssociationParameters association)
 {
     DicomMessage newRequestMessage = new DicomMessage();
     PrinterModuleIod.SetCommonTags(newRequestMessage.DataSet);
     byte pcid = association.FindAbstractSyntax(SopClass.PrinterSopClass);
     if (pcid > 0)
     {
         client.SendNGetRequest(DicomUids.PrinterSOPInstance, pcid, client.NextMessageID(), newRequestMessage);
     }
 }
开发者ID:nhannd,项目名称:Xian,代码行数:15,代码来源:PrinterStatusScu.cs

示例4: SendDeleteFilmSessionRequest

        private void SendDeleteFilmSessionRequest(DicomClient client, ClientAssociationParameters association)
        {
            DicomMessage newRequestMessage = new DicomMessage(null, null);
            newRequestMessage.RequestedSopInstanceUid = _filmSessionUid;
            newRequestMessage.RequestedSopClassUid = SopClass.BasicFilmSessionSopClassUid;

            _nextRequestType = RequestType.Close;
            byte pcid = association.FindAbstractSyntaxOrThrowException(SopClass.BasicGrayscalePrintManagementMetaSopClass);
            client.SendNDeleteRequest(pcid, client.NextMessageID(), newRequestMessage);
        }
开发者ID:khaha2210,项目名称:radio,代码行数:10,代码来源:BasicGrayscalePrintScu.cs

示例5: SendOnPresentationContext

        private void SendOnPresentationContext(DicomClient client, ClientAssociationParameters association, byte pcid, StorageInstance fileToSend, DicomMessage msg)
        {
            var presContext = association.GetPresentationContext(pcid);
            if (msg.TransferSyntax.Encapsulated
                && presContext.AcceptedTransferSyntax.Encapsulated
                && !msg.TransferSyntax.Equals(presContext.AcceptedTransferSyntax))
            {
                // Compressed in different syntaxes, decompress here first, ChangeTransferSyntax does not convert syntaxes properly in this case.
                msg.ChangeTransferSyntax(TransferSyntax.ExplicitVrLittleEndian);
            }

            fileToSend.SentMessageId = client.NextMessageID();

            if (_moveOriginatorAe == null)
                client.SendCStoreRequest(pcid, fileToSend.SentMessageId, DicomPriority.Medium, msg);
            else
                client.SendCStoreRequest(pcid, fileToSend.SentMessageId, DicomPriority.Medium, _moveOriginatorAe,
                                         _moveOriginatorMessageId, msg);
        }
开发者ID:emmandeb,项目名称:ClearCanvas-1,代码行数:19,代码来源:StorageScu.cs

示例6: SendSetImageBoxRequest

        private void SendSetImageBoxRequest(DicomClient client, ClientAssociationParameters association)
        {
            if (_currentImageBoxIndex >= _imageBoxPixelModuleIods.Count)
            {
                // done sending images box - send print request
                _nextRequestType = RequestType.PrintAction;
                SendActionPrintRequest(client, association);
            }
            else
            {
                // want to get first film box response - although not sure if CC is using .net 3.5.. prolly not so do it old way
                IEnumerator<DicomAttributeCollection> filmBoxResponseEnumerator = _filmBoxResponseMessages.Values.GetEnumerator();
                filmBoxResponseEnumerator.Reset();
                filmBoxResponseEnumerator.MoveNext();

                BasicFilmBoxModuleIod basicFilmBoxModuleIod = new BasicFilmBoxModuleIod(filmBoxResponseEnumerator.Current);

                if (_currentImageBoxIndex > basicFilmBoxModuleIod.ReferencedImageBoxSequenceList.Count)
                {
                    throw new DicomException("Current Image Box Index is greater than number of Referenced ImageBox Sequences - set image box data");
                }

                ImageBoxPixelModuleIod imageBoxPixelModuleIod = _imageBoxPixelModuleIods[_currentImageBoxIndex];

                DicomMessage newRequestMessage = new DicomMessage(null, (DicomAttributeCollection)imageBoxPixelModuleIod.DicomAttributeProvider);
                newRequestMessage.RequestedSopClassUid = SopClass.BasicGrayscaleImageBoxSopClassUid;
                newRequestMessage.RequestedSopInstanceUid = basicFilmBoxModuleIod.ReferencedImageBoxSequenceList[_currentImageBoxIndex].ReferencedSopInstanceUid;

                byte pcid = association.FindAbstractSyntax(SopClass.BasicGrayscalePrintManagementMetaSopClass);

                _currentImageBoxIndex++;
                client.SendNSetRequest(pcid, client.NextMessageID(), newRequestMessage);
            }

        }
开发者ID:khaha2210,项目名称:radio,代码行数:35,代码来源:BasicGrayscalePrintScu.cs

示例7: SendDeleteFilmBoxRequest

        private void SendDeleteFilmBoxRequest(DicomClient client, ClientAssociationParameters association, DicomMessage responseMessage)
        {
            if (_filmBoxUids.Count == 0)
            {
                // no more film boxes left to delete - so send delete film session
                SendDeleteFilmSessionRequest(client, association);
            }
            else
            {
                string currentFilmBoxUid = _filmBoxUids[0];
                _filmBoxUids.Remove(currentFilmBoxUid);

                DicomMessage newRequestMessage = new DicomMessage(null, null);
                newRequestMessage.RequestedSopInstanceUid = currentFilmBoxUid;
                newRequestMessage.RequestedSopClassUid = SopClass.BasicFilmBoxSopClassUid;
                newRequestMessage.Priority = DicomPriority.Medium;

                _nextRequestType = RequestType.DeleteFilmBox;

                byte pcid = association.FindAbstractSyntaxOrThrowException(SopClass.BasicGrayscalePrintManagementMetaSopClass);
                client.SendNDeleteRequest(pcid, client.NextMessageID(), newRequestMessage);
            }
        }
开发者ID:khaha2210,项目名称:radio,代码行数:23,代码来源:BasicGrayscalePrintScu.cs

示例8: SendCreateFilmBoxRequest

        private void SendCreateFilmBoxRequest(DicomClient client, ClientAssociationParameters association, DicomMessage responseMessage)
        {

            ReferencedInstanceSequenceIod referencedFilmSessionSequence = new ReferencedInstanceSequenceIod();
            referencedFilmSessionSequence.ReferencedSopClassUid = SopClass.BasicFilmSessionSopClassUid;
            referencedFilmSessionSequence.ReferencedSopInstanceUid = responseMessage.AffectedSopInstanceUid;
            _basicFilmBoxModuleIod.ReferencedFilmSessionSequenceList.Add(referencedFilmSessionSequence);

            DicomMessage newRequestMessage = new DicomMessage(null, (DicomAttributeCollection)_basicFilmBoxModuleIod.DicomAttributeProvider);

            byte pcid = association.FindAbstractSyntaxOrThrowException(SopClass.BasicGrayscalePrintManagementMetaSopClass);

            _nextRequestType = RequestType.ImageBox;
            client.SendNCreateRequest(DicomUid.GenerateUid(), pcid, client.NextMessageID(), newRequestMessage, DicomUids.BasicFilmBoxSOP);
        }
开发者ID:khaha2210,项目名称:radio,代码行数:15,代码来源:BasicGrayscalePrintScu.cs

示例9: SendCreateFilmSessionRequest

        private void SendCreateFilmSessionRequest(DicomClient client, ClientAssociationParameters association)
        {
            DicomMessage newRequestMessage = new DicomMessage(null, (DicomAttributeCollection)_basicFilmSessionModuleIod.DicomAttributeProvider);

            byte pcid = association.FindAbstractSyntaxOrThrowException(SopClass.BasicGrayscalePrintManagementMetaSopClass);
            _nextRequestType = RequestType.FilmBox;
            client.SendNCreateRequest(DicomUid.GenerateUid(), pcid, client.NextMessageID(), newRequestMessage, DicomUids.BasicFilmSession);
        }
开发者ID:khaha2210,项目名称:radio,代码行数:8,代码来源:BasicGrayscalePrintScu.cs

示例10: SendCStore

		/// <summary>
		/// Generic routine to send the next C-STORE-RQ message in the <see cref="StorageInstanceList"/>.
		/// </summary>
		/// <param name="client">DICOM Client class</param>
		/// <param name="association">Association Parameters</param>
		private bool SendCStore(DicomClient client, ClientAssociationParameters association)
		{
			StorageInstance fileToSend = _storageInstanceList[_fileListIndex];

			OnImageStoreStarted(fileToSend);

			DicomFile dicomFile;

			try
			{
				// Check to see if image does not exist or is corrupted
				if (fileToSend.SendStatus == DicomStatuses.ProcessingFailure)
				{
					_failureSubOperations++;
					_remainingSubOperations--;
					OnImageStoreCompleted(fileToSend);
					return false;
				}

				dicomFile = fileToSend.LoadFile();
			}
			catch (DicomException e)
			{
				Platform.Log(LogLevel.Error, e, "Unexpected exception when loading DICOM file {0}", fileToSend.Filename);

				fileToSend.ExtendedFailureDescription = e.GetType().Name + " " + e.Message;
				_failureSubOperations++;
				_remainingSubOperations--;
				OnImageStoreCompleted(fileToSend);
				return false;
			}

			DicomMessage msg = new DicomMessage(dicomFile);

			byte pcid = 0;

			if (fileToSend.TransferSyntax.Encapsulated)
			{
				pcid = association.FindAbstractSyntaxWithTransferSyntax(fileToSend.SopClass, fileToSend.TransferSyntax);

				if (DicomCodecRegistry.GetCodec(fileToSend.TransferSyntax) != null)
				{
					if (pcid == 0)
						pcid = association.FindAbstractSyntaxWithTransferSyntax(fileToSend.SopClass,
						                                                        TransferSyntax.ExplicitVrLittleEndian);
					if (pcid == 0)
						pcid = association.FindAbstractSyntaxWithTransferSyntax(fileToSend.SopClass,
						                                                        TransferSyntax.ImplicitVrLittleEndian);
				}
			}
			else
			{
				if (pcid == 0)
					pcid = association.FindAbstractSyntaxWithTransferSyntax(fileToSend.SopClass,
					                                                        TransferSyntax.ExplicitVrLittleEndian);
				if (pcid == 0)
					pcid = association.FindAbstractSyntaxWithTransferSyntax(fileToSend.SopClass,
					                                                        TransferSyntax.ImplicitVrLittleEndian);
			}

			if (pcid == 0)
			{
				fileToSend.SendStatus = DicomStatuses.SOPClassNotSupported;
				fileToSend.ExtendedFailureDescription = "No valid presentation contexts for file.";
				OnImageStoreCompleted(fileToSend);
				_failureSubOperations++;
				_remainingSubOperations--;
				return false;
			}

			try
			{
				if (_moveOriginatorAe == null)
					client.SendCStoreRequest(pcid, client.NextMessageID(), DicomPriority.Medium, msg);
				else
					client.SendCStoreRequest(pcid, client.NextMessageID(), DicomPriority.Medium, _moveOriginatorAe,
					                         _moveOriginatorMessageId, msg);
			}
			catch(DicomNetworkException)
			{
				throw; //This is a DicomException-derived class that we want to throw.
			}
			catch(DicomCodecException e)
			{
				Platform.Log(LogLevel.Error, e, "Unexpected exception when compressing or decompressing file before send {0}", fileToSend.Filename);

				fileToSend.SendStatus = DicomStatuses.ProcessingFailure;
				fileToSend.ExtendedFailureDescription = "Error decompressing or compressing file before send.";
				OnImageStoreCompleted(fileToSend);
				_failureSubOperations++;
				_remainingSubOperations--;
				return false;

			}
			catch(DicomException e)
//.........这里部分代码省略.........
开发者ID:khaha2210,项目名称:radio,代码行数:101,代码来源:StorageScu.cs

示例11: SendFilePresentationContext

		private void SendFilePresentationContext(DicomClient client, byte pcid, StorageInstance fileToSend)
		{
			fileToSend.SentMessageId = client.NextMessageID();

			if (fileToSend.MetaInfoFileLength == 0)
			{
				DicomFile theFile = new DicomFile(fileToSend.Filename);
				theFile.Load(DicomTags.RelatedGeneralSopClassUid, DicomReadOptions.Default);
				fileToSend.MetaInfoFileLength = theFile.MetaInfoFileLength;
			}

			using (var fs = FileStreamOpener.OpenForRead(fileToSend.Filename, FileMode.Open))
			{
				// Seek to the Dataset
				fs.Seek(fileToSend.MetaInfoFileLength, SeekOrigin.Begin);

				if (_moveOriginatorAe == null)
					client.SendCStoreRequest(pcid, fileToSend.SentMessageId, DicomPriority.Medium, null, 0, fileToSend.SopInstanceUid,
					                         fileToSend.SopClass.Uid, fs);
				else
					client.SendCStoreRequest(pcid, fileToSend.SentMessageId, DicomPriority.Medium, _moveOriginatorAe, _moveOriginatorMessageId, fileToSend.SopInstanceUid,
											 fileToSend.SopClass.Uid, fs);
			}
		}
开发者ID:yjsyyyjszf,项目名称:ClearCanvas-1,代码行数:24,代码来源:StorageScu.cs

示例12: SendFilePresentationContext

		private void SendFilePresentationContext(DicomClient client, byte pcid, StorageInstance fileToSend)
		{
			fileToSend.SentMessageId = client.NextMessageID();

			fileToSend.ParseMetaInfo();

			using (var fs = fileToSend.StreamOpener.Open())
			{
				// Seek to the Dataset
				fs.Seek(fileToSend.MetaInfoFileLength, SeekOrigin.Begin);

				if (_moveOriginatorAe == null)
					client.SendCStoreRequest(pcid, fileToSend.SentMessageId, DicomPriority.Medium, null, 0, fileToSend.SopInstanceUid,
					                         fileToSend.SopClass.Uid, fs);
				else
					client.SendCStoreRequest(pcid, fileToSend.SentMessageId, DicomPriority.Medium, _moveOriginatorAe, _moveOriginatorMessageId, fileToSend.SopInstanceUid,
					                         fileToSend.SopClass.Uid, fs);
			}
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:19,代码来源:StorageScu.cs


注:本文中的DicomClient.NextMessageID方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。