• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Network.DcmStatus类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Dicom.Network.DcmStatus的典型用法代码示例。如果您正苦于以下问题:C# DcmStatus类的具体用法?C# DcmStatus怎么用?C# DcmStatus使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DcmStatus类属于Dicom.Network命名空间,在下文中一共展示了DcmStatus类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: SendCEchoResponse

 protected void SendCEchoResponse(byte presentationID, ushort messageIdRespondedTo, DcmStatus status)
 {
     DicomUID affectedClass = Associate.GetAbstractSyntax(presentationID);
     DcmCommand command = CreateResponse(messageIdRespondedTo, DcmCommandField.CEchoResponse, affectedClass, status, false);
     Log.Info("{0} -> C-Echo response [id: {1}]", LogID, messageIdRespondedTo);
     SendDimse(presentationID, command, null);
 }
开发者ID:JeanLedesma,项目名称:mdcm,代码行数:7,代码来源:DcmNetworkBase.cs


示例2: SendCFindResponse

 protected void SendCFindResponse(byte presentationID, ushort messageIdRespondedTo, DcmStatus status)
 {
     SendCFindResponse(presentationID, messageIdRespondedTo, null, status);
 }
开发者ID:JeanLedesma,项目名称:mdcm,代码行数:4,代码来源:DcmNetworkBase.cs


示例3: OnReceiveCMoveResponse

 protected virtual void OnReceiveCMoveResponse(byte presentationID, ushort messageIdRespondedTo, DcmDataset dataset, 
     DcmStatus status, ushort remain, ushort complete, ushort warning, ushort failure)
 {
     SendAbort(DcmAbortSource.ServiceProvider, DcmAbortReason.NotSpecified);
 }
开发者ID:JeanLedesma,项目名称:mdcm,代码行数:5,代码来源:DcmNetworkBase.cs


示例4: OnReceiveNSetResponse

 protected virtual void OnReceiveNSetResponse(byte presentationID, ushort messageIdRespondedTo, DicomUID affectedClass, DicomUID affectedInstance,
     DcmDataset dataset, DcmStatus status)
 {
     SendAbort(DcmAbortSource.ServiceProvider, DcmAbortReason.NotSpecified);
 }
开发者ID:JeanLedesma,项目名称:mdcm,代码行数:5,代码来源:DcmNetworkBase.cs


示例5: SendNSetResponse

 protected void SendNSetResponse(byte presentationID, ushort messageIdRespondedTo, DicomUID affectedClass, DicomUID affectedInstance,
     DcmDataset dataset, DcmStatus status)
 {
     DcmCommand command = new DcmCommand();
     command.AffectedSOPClassUID = affectedClass;
     command.CommandField = DcmCommandField.NSetResponse;
     command.MessageIDBeingRespondedTo = messageIdRespondedTo;
     command.HasDataset = (dataset != null);
     command.Status = status;
     command.AffectedSOPInstanceUID = affectedInstance;
     Log.Info("{0} -> N-Set response [id: {1}; class: {2}]: {3}", LogID, messageIdRespondedTo, affectedClass.Description, status);
     SendDimse(presentationID, command, dataset);
 }
开发者ID:JeanLedesma,项目名称:mdcm,代码行数:13,代码来源:DcmNetworkBase.cs


示例6: DcmStatus

 /// <summary>
 /// Initializes a new instance of the <see cref="DcmStatus"/> class.
 /// </summary>
 /// <param name="status">The status.</param>
 /// <param name="comment">The comment.</param>
 public DcmStatus(DcmStatus status, string comment)
     : this(String.Format("{0:x4}", status.Code), status.State, status.Description, comment)
 {
 }
开发者ID:JeanLedesma,项目名称:mdcm,代码行数:9,代码来源:DcmStatus.cs


示例7: OnReceiveCMoveResponse

        protected override void OnReceiveCMoveResponse(byte presentationID, ushort messageID, DcmDataset dataset, 
			DcmStatus status, ushort remain, ushort complete, ushort warning, ushort failure)
        {
            if (OnCMoveResponse != null) {
                OnCMoveResponse(_current, dataset, status, remain, complete, warning, failure);
            }
            if (remain == 0 && status != DcmStatus.Pending) {
                PerformQueryOrRelease();
            }
        }
开发者ID:fo-dicom,项目名称:mdcm,代码行数:10,代码来源:CMoveClient.cs


示例8: SendCMoveResponse

 protected void SendCMoveResponse(byte presentationID, ushort messageIdRespondedTo, DcmDataset dataset, DcmStatus status,
     ushort remain, ushort complete, ushort warning, ushort failure)
 {
     DicomUID affectedClass = Associate.GetAbstractSyntax(presentationID);
     DcmCommand command = CreateResponse(messageIdRespondedTo, DcmCommandField.CMoveResponse, affectedClass, status, dataset != null);
     command.NumberOfRemainingSuboperations = remain;
     command.NumberOfCompletedSuboperations = complete;
     command.NumberOfWarningSuboperations = warning;
     command.NumberOfFailedSuboperations = failure;
     Log.Info("{0} -> C-Move response [id: {1}; remain: {2}; complete: {3}; warning: {4}; failure: {5}]: {6}",
         LogID, messageIdRespondedTo, remain, complete, warning, failure, status);
     SendDimse(presentationID, command, dataset);
 }
开发者ID:JeanLedesma,项目名称:mdcm,代码行数:13,代码来源:DcmNetworkBase.cs


示例9: OnReceiveNGetResponse

        protected override void OnReceiveNGetResponse(byte presentationID, ushort messageIdRespondedTo, DicomUID affectedClass, DicomUID affectedInstance,
            DcmDataset dataset, DcmStatus status)
        {
            if (OnPrintGetPrinterStatusResponse != null)
            {
                DcmPrinterStatus printerstatus = new DcmPrinterStatus(dataset);
                _acceptedPrinterStatus = OnPrintGetPrinterStatusResponse(printerstatus, status);
            }

            if (_acceptedPrinterStatus == false)
            {
                SendReleaseRequest();
                return;
            }

            CreateFilmSession();
        }
开发者ID:hide1980,项目名称:mdcm,代码行数:17,代码来源:PrintClient.cs


示例10: OnReceiveNSetResponse

        protected override void OnReceiveNSetResponse(byte presentationID, ushort messageIdRespondedTo, DicomUID affectedClass, DicomUID affectedInstance,
            DcmDataset dataset, DcmStatus status)
        {
            if (_filmSession != null)
            {
                if (affectedClass == DicomUID.BasicColorImageBoxSOPClass ||
                    affectedClass == DicomUID.BasicGrayscaleImageBoxSOPClass)
                {
                    if (status == DcmStatus.Success)
                    {
                        DcmImageBox imageBox = _filmSession.FindImageBox(affectedInstance);
                        if (imageBox != null)
                        {
                            _pendingImageBoxResponses.Remove(imageBox);
                            if (_pendingImageBoxResponses.Count == 0)
                            {
                                byte pcid = Associate.FindAbstractSyntax(DicomUID.PrinterSOPClass);
                                SendNActionRequest(pcid, NextMessageID(), DicomUID.BasicFilmSessionSOPClass, _filmSession.SOPInstanceUID, 0x0001, null);
                            }
                            return;
                        }
                    }
                }
            }

            SendAbort(DcmAbortSource.ServiceUser, DcmAbortReason.NotSpecified);
        }
开发者ID:hide1980,项目名称:mdcm,代码行数:27,代码来源:PrintClient.cs


示例11: OnReceiveNDeleteResponse

        protected override void OnReceiveNDeleteResponse(byte presentationID, ushort messageIdRespondedTo, DicomUID affectedClass, DicomUID affectedInstance, DcmStatus status)
        {
            if (_filmSession != null)
            {
                if (affectedClass == DicomUID.BasicFilmBoxSOPClass)
                {
                    if (status == DcmStatus.Success)
                    {
                        DcmFilmBox filmBox = _filmSession.FindFilmBox(affectedInstance);
                        if (filmBox != null)
                        {
                            _pendingFilmBoxResponses.Remove(filmBox);
                            if (_pendingFilmBoxResponses.Count == 0)
                            {
                                byte pcid = Associate.FindAbstractSyntax(DicomUID.PrinterSOPClass);
                                SendNDeleteRequest(pcid, NextMessageID(), DicomUID.BasicFilmSessionSOPClass, _filmSession.SOPInstanceUID);
                            }
                            return;
                        }
                    }
                }

                if (affectedClass == DicomUID.BasicFilmSessionSOPClass)
                {
                    if (status == DcmStatus.Success)
                    {
                        SendReleaseRequest();
                        return;
                    }
                }
            }

            SendAbort(DcmAbortSource.ServiceUser, DcmAbortReason.NotSpecified);
        }
开发者ID:hide1980,项目名称:mdcm,代码行数:34,代码来源:PrintClient.cs


示例12: OnReceiveNCreateResponse

        protected override void OnReceiveNCreateResponse(byte presentationID, ushort messageIdRespondedTo, DicomUID affectedClass, DicomUID affectedInstance,
            DcmDataset dataset, DcmStatus status)
        {
            if (_filmSession != null)
            {
                if (affectedClass == DicomUID.BasicFilmSessionSOPClass)
                {
                    if (status == DcmStatus.Success)
                    {
                        int filmBoxesCount = CalculateRequiredImageBoxes();
                        if (filmBoxesCount == 0)
                        {
                            SendReleaseRequest();
                            return;
                        }

                        for (int i = 0; i < filmBoxesCount; i++)
                        {
                            DicomUID uid = DicomUID.Generate();
                            DcmDataset filmBoxDataset = new DcmDataset(DicomTransferSyntax.ImplicitVRLittleEndian);
                            DcmFilmBox filmBox = _filmSession.CreateFilmBox(uid, filmBoxDataset.Clone());

                            filmBox.AnnotationDisplayFormatID = _annotationDisplayFormatID;
                            filmBox.BorderDensity = _borderDensity;
                            filmBox.ConfigurationInformation = _configurationInformation;
                            filmBox.EmptyImageDensity = _emptyImageDensity;
                            filmBox.FilmOrientation = _filmOrientation;
                            filmBox.FilmSizeID = _filmSizeID;
                            filmBox.Illumination = _illumination;
                            filmBox.ImageDisplayFormat = _imageDisplayFormat;
                            filmBox.MagnificationType = _magnificationType;
                            filmBox.MaxDensity = _maxDensity;
                            filmBox.MinDensity = _minDensity;
                            filmBox.ReflectedAmbientLight = _reflectedAmbientLight;
                            filmBox.RequestedResolutionID = _requestedResolutionID;
                            filmBox.SmoothingType = _smoothingType;
                            filmBox.Trim = _trim;

                            byte pcid = Associate.FindAbstractSyntax(DicomUID.BasicGrayscalePrintManagementMetaSOPClass);
                            SendNCreateRequest(pcid, NextMessageID(), DicomUID.BasicFilmBoxSOPClass, filmBox.SOPInstanceUID, filmBox.Dataset);
                        }
                        return;
                    }
                }

                if (affectedClass == DicomUID.BasicFilmBoxSOPClass)
                {
                    if (status == DcmStatus.Success)
                    {
                        DcmFilmBox filmBox = _filmSession.FindFilmBox(affectedInstance);
                        int filmBoxIndex = _filmSession.BasicFilmBoxes.IndexOf(filmBox);
                        if (filmBox != null)
                        {
                            DcmItemSequence referencedImageBoxSequenceList = null;
                            referencedImageBoxSequenceList = dataset.GetSQ(DicomTags.ReferencedImageBoxSequence);
                            if (referencedImageBoxSequenceList != null)
                            {
                                foreach (DcmItemSequenceItem item in referencedImageBoxSequenceList.SequenceItems)
                                {
                                    DicomUID referencedSOPInstanceUID = item.Dataset.GetUID(DicomTags.ReferencedSOPInstanceUID);
                                    if (referencedSOPInstanceUID != null)
                                    {
                                        DcmImageBox imageBox = new DcmImageBox(filmBox, DcmImageBox.GraySOPClassUID, referencedSOPInstanceUID);
                                        filmBox.BasicImageBoxes.Add(imageBox);
                                    }
                                }
                            }

                            _pendingImageBoxResponses.Clear();
                            if (filmBox.BasicImageBoxes.Count > 0)
                            {
                                int imageBoxIndex = 0;
                                int imagesPerFilmbox = CalculateImagesPreFilmBox();
                                foreach (DcmImageBox imageBox in filmBox.BasicImageBoxes)
                                {
                                    if (imagesPerFilmbox * filmBoxIndex + imageBoxIndex < _files.Count)
                                    {
                                        UpdateImageBox(imageBox, _files[imagesPerFilmbox * filmBoxIndex + imageBoxIndex], imageBoxIndex);
                                    }
                                    _pendingImageBoxResponses.Add(imageBox);
                                    imageBoxIndex++;

                                    byte pcid = Associate.FindAbstractSyntax(DicomUID.PrinterSOPClass);
                                    SendNSetRequest(pcid, NextMessageID(), imageBox.SOPClassUID, imageBox.SOPInstanceUID, imageBox.Dataset);
                                }
                            }
                            return;
                        }
                    }
                }
            }

            SendAbort(DcmAbortSource.ServiceUser, DcmAbortReason.NotSpecified);
        }
开发者ID:hide1980,项目名称:mdcm,代码行数:94,代码来源:PrintClient.cs


示例13: OnReceiveNActionResponse

        protected override void OnReceiveNActionResponse(byte presentationID, ushort messageIdRespondedTo, DicomUID affectedClass, DicomUID affectedInstance,
            ushort actionTypeID, DcmDataset dataset, DcmStatus status)
        {
            if (_filmSession != null)
            {
                if (affectedClass == DicomUID.BasicFilmSessionSOPClass)
                {
                    if (status == DcmStatus.Success)
                    {
                        _pendingFilmBoxResponses.Clear();
                        byte pcid = Associate.FindAbstractSyntax(DicomUID.PrinterSOPClass);
                        foreach (DcmFilmBox filmBox in _filmSession.BasicFilmBoxes)
                        {
                            _pendingFilmBoxResponses.Add(filmBox);
                            SendNDeleteRequest(pcid, NextMessageID(), DicomUID.BasicFilmBoxSOPClass, filmBox.SOPInstanceUID);
                        }
                        return;
                    }

                }
            }

            SendAbort(DcmAbortSource.ServiceUser, DcmAbortReason.NotSpecified);
        }
开发者ID:hide1980,项目名称:mdcm,代码行数:24,代码来源:PrintClient.cs


示例14: OnReceiveNEventReportResponse

        protected override void OnReceiveNEventReportResponse(byte presentationID, ushort messageIdRespondedTo, 
            DicomUID affectedClass, DicomUID affectedInstance, ushort eventTypeID, DcmDataset dataset, DcmStatus status)
        {
            if (affectedClass == DicomUID.PrintJobSOPClass) {
                DcmPrintJob job = null;

                foreach (DcmPrintJob pj in _jobs) {
                    if (pj.SOPInstanceUID == affectedInstance) {
                        job = pj;
                        break;
                    }
                }

                if (job != null && (job.ExecutionStatus == "DONE" || job.ExecutionStatus == "FAILURE"))
                    _jobs.Remove(job);

                return;
            }
        }
开发者ID:k11hao,项目名称:mdcm-printscp,代码行数:19,代码来源:NPrintService.cs


示例15: CreateResponse

 private DcmCommand CreateResponse(ushort messageIdRespondedTo, DcmCommandField commandField, DicomUID affectedClass, DcmStatus status, bool hasDataset)
 {
     DcmCommand command = new DcmCommand();
     command.AffectedSOPClassUID = affectedClass;
     command.CommandField = commandField;
     command.MessageIDBeingRespondedTo = messageIdRespondedTo;
     command.HasDataset = hasDataset;
     command.Status = status;
     if (!String.IsNullOrEmpty(status.ErrorComment))
         command.ErrorComment = status.ErrorComment;
     return command;
 }
开发者ID:JeanLedesma,项目名称:mdcm,代码行数:12,代码来源:DcmNetworkBase.cs


示例16: SendCStoreResponse

 protected void SendCStoreResponse(byte presentationID, ushort messageIdRespondedTo, DicomUID affectedInstance, DcmStatus status)
 {
     DicomUID affectedClass = Associate.GetAbstractSyntax(presentationID);
     DcmCommand command = CreateResponse(messageIdRespondedTo, DcmCommandField.CStoreResponse, affectedClass, status, false);
     command.AffectedSOPInstanceUID = affectedInstance;
     Log.Info("{0} -> C-Store response [id: {1}]: {2}", LogID, messageIdRespondedTo, status);
     SendDimse(presentationID, command, null);
 }
开发者ID:JeanLedesma,项目名称:mdcm,代码行数:8,代码来源:DcmNetworkBase.cs


示例17: OnReceiveCEchoResponse

 protected virtual void OnReceiveCEchoResponse(byte presentationID, ushort messageIdRespondedTo, DcmStatus status)
 {
     SendAbort(DcmAbortSource.ServiceProvider, DcmAbortReason.NotSpecified);
 }
开发者ID:JeanLedesma,项目名称:mdcm,代码行数:4,代码来源:DcmNetworkBase.cs


示例18: OnReceiveCEchoResponse

 protected override void OnReceiveCEchoResponse(byte presentationID, ushort messageID, DcmStatus status)
 {
     if (OnCEchoResponse != null)
         OnCEchoResponse(presentationID, messageID, status);
     SendReleaseRequest();
 }
开发者ID:GMZ,项目名称:mdcm,代码行数:6,代码来源:CEchoClient.cs


示例19: CreateResponse

		private DcmCommand CreateResponse(ushort messageIdRespondedTo, DcmCommandField commandField, DicomUID affectedClass, DcmStatus status, bool hasDataset) {
			DcmCommand command = new DcmCommand();
			command.AffectedSOPClassUID = affectedClass;
			command.CommandField = commandField;
			command.MessageIDBeingRespondedTo = messageIdRespondedTo;
			command.HasDataset = hasDataset;
			command.Status = status;
			return command;
		}
开发者ID:mcmssupereditor,项目名称:mdcm,代码行数:9,代码来源:DcmNetworkBase.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Network.RawPDU类代码示例发布时间:2022-05-24
下一篇:
C# Network.DcmCommand类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap