• 大小: 9.19MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-08-22
  • 语言: C#
  • 标签: C#  SCP实例  c#  dicom  SCP实例  

资源简介

数据库使用的是SQLite Developer,如果要查询数据需要下载安装

资源截图

代码片段和文件信息

///using Dicom;
using Dicom.Network;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AppStorageSCU
{
    public class CFindSCU
    {

      private static  log4net.ILog _log = log4net.LogManager.GetLogger(“CFindSCU“);


        /// 
        /// CFind 根据 病人号 查询到StudyInstanceUID
        /// 

        /// 
        public static void Send(string patientId string Ip int port string callingAe string calledAe)
        {
            try
            {
                _log.Info(string.Format(“patientid:{0}“ patientId));

                var cfind = DicomCFindRequest.CreateStudyQuery(patientId: patientId);
                //当接收到对方发挥的响应消息时,进行相应的操作【注】:该操作在DICOM3.0协议
                //第7部分第8章中有说明,DIMSE协议并未对其做出规定,而应该有用户自己设定
                cfind.OnResponseReceived = (rq rsp) =>
                {
                    //此处我们只是简单的将查询到的结果输出到屏幕
                    //Console.WriteLine(“StudyInstanceUID:{0} “
                    //    rsp.Dataset.Get(DicomTag.StudyInstanceUID));

                    _log.Info(string.Format(“StudyInstanceUID:{0}“ rsp.Dataset.Get(Dicom.DicomTag.StudyInstanceUID)));

                    string studyId = rsp.Dataset.Get(Dicom.DicomTag.StudyInstanceUID);

                  //  DicomCMoveRequest req = new DicomCMoveRequest(“STORESCP“ studyId);
                    DicomCMoveRequest req = new DicomCMoveRequest(callingAe studyId);
                    var client1 = new DicomClient();
                    client1.NegotiateAsyncOps();
                    client1.AddRequest(req);
                    //这里的IP地址是C-MOVE SCP的地址,12345端口号是C-MOVE SCP提供C-MOVE服务的端口
                    //在C-MOVE SCP端发出的C-STORE-RQ子操作请求的是C-MOVE SCU端我们实现的C-STORE SCP,C-STORE SCP绑定的端口是22345
                    //client1.Send(“130.1.1.4“ 6000 false “STORESCP“ “HQUERY“);
                    client1.Send(Ip port false callingAe calledAe);
                };
                
                //发起C-FIND-RQ:
                //该部分就是利用A-ASSOCIATE服务来建立DICOM实体双方之间的连接。
                var client = new DicomClient();
                client.AddRequest(cfind);
                client.Send(host: Ip port: port useTls: false callingAe: callingAe calledAe: calledAe);
               // Console.ReadLine();

                //发起C-MOVE-RQ操作发送请求的StudyID是12

                // Console.ReadLine();
            }
            catch (Exception ex)
            {
                _log.Error(ex);
               // Console.WriteLine(ex);
                throw ex;
            }
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1215  2017-12-30 12:31  c# SCP接收DICOM文件实例源码\AppStorageSCU\obj\Release\AppStorageSCU.csproj.FileListAbsolute.txt

     文件       6143  2019-08-28 10:53  c# SCP接收DICOM文件实例源码\AppStorageSCU\obj\Debug\AppStorageSCU.csproj.FileListAbsolute.txt

     文件    1448387  2016-02-23 14:02  c# SCP接收DICOM文件实例源码\packages\log4net.2.0.5\lib\net10-full\log4net.xml

     文件    1449538  2016-02-23 14:02  c# SCP接收DICOM文件实例源码\packages\log4net.2.0.5\lib\net11-full\log4net.xml

     文件    1468119  2016-02-23 14:02  c# SCP接收DICOM文件实例源码\packages\log4net.2.0.5\lib\net20-full\log4net.xml

     文件    1522694  2016-02-23 14:02  c# SCP接收DICOM文件实例源码\packages\log4net.2.0.5\lib\net35-client\log4net.xml

     文件    1522694  2016-02-23 14:02  c# SCP接收DICOM文件实例源码\packages\log4net.2.0.5\lib\net40-client\log4net.xml

     文件    1533153  2016-02-23 14:02  c# SCP接收DICOM文件实例源码\AppStorageSCU\bin\Debug\log4net.xml

     文件    1533153  2016-02-23 14:02  c# SCP接收DICOM文件实例源码\AppStorageSCU\bin\Release\log4net.xml

     文件    1533153  2016-02-23 14:02  c# SCP接收DICOM文件实例源码\packages\log4net.2.0.5\lib\net35-full\log4net.xml

     文件    1533153  2016-02-23 14:02  c# SCP接收DICOM文件实例源码\packages\log4net.2.0.5\lib\net40-full\log4net.xml

     文件    1533153  2016-02-23 14:02  c# SCP接收DICOM文件实例源码\packages\log4net.2.0.5\lib\net45-full\log4net.xml

     文件       1503  2016-01-22 09:06  c# SCP接收DICOM文件实例源码\AppStorageSCU\bin\Debug\Nancy.Hosting.Wcf.xml

     文件       1503  2016-01-22 09:06  c# SCP接收DICOM文件实例源码\AppStorageSCU\bin\Release\Nancy.Hosting.Wcf.xml

     文件       1503  2016-01-22 09:06  c# SCP接收DICOM文件实例源码\packages\Nancy.Hosting.Wcf.1.4.1\lib\net40\Nancy.Hosting.Wcf.xml

     文件     765218  2016-01-22 09:06  c# SCP接收DICOM文件实例源码\AppStorageSCU\bin\Debug\Nancy.xml

     文件     765218  2016-01-22 09:06  c# SCP接收DICOM文件实例源码\AppStorageSCU\bin\Release\Nancy.xml

     文件     765218  2016-01-22 09:06  c# SCP接收DICOM文件实例源码\packages\Nancy.1.4.1\lib\net40\Nancy.xml

     文件     269727  2017-12-19 17:29  c# SCP接收DICOM文件实例源码\AppStorageSCU\bin\Release\log\Log_2017-12-19.read.log

     文件          0  2017-12-29 18:41  c# SCP接收DICOM文件实例源码\AppStorageSCU\bin\Release\log\Log_2017-12-29.read.log

     文件          0  2017-12-30 12:28  c# SCP接收DICOM文件实例源码\AppStorageSCU\bin\Release\log\Log_2017-12-30.read.log

     文件      64713  2018-01-11 11:10  c# SCP接收DICOM文件实例源码\AppStorageSCU\bin\Debug\log\Log_2018-01-11.read.log

     文件      16029  2018-01-15 09:22  c# SCP接收DICOM文件实例源码\AppStorageSCU\bin\Debug\log\Log_2018-01-15.read.log

     文件        919  2019-07-25 17:32  c# SCP接收DICOM文件实例源码\AppStorageSCU\bin\Debug\log\Log_2019-07-25.read.log

     文件       1152  2019-07-26 14:46  c# SCP接收DICOM文件实例源码\AppStorageSCU\bin\Debug\log\Log_2019-07-26.read.log

     文件       1728  2019-08-30 11:57  c# SCP接收DICOM文件实例源码\AppStorageSCU\bin\Debug\log\Log_2019-08-30.read.log

     文件       3918  2019-09-06 16:49  c# SCP接收DICOM文件实例源码\AppStorageSCU\bin\Debug\log\Log_2019-09-06.read.log

     文件          0  2019-09-16 13:51  c# SCP接收DICOM文件实例源码\AppStorageSCU\bin\Debug\log\Log_2019-09-16.read.log

     文件      15872  2017-12-29 18:40  c# SCP接收DICOM文件实例源码\AppStorageSCU\bin\Release\AppStorageSCU.exe

     文件      15872  2017-12-29 18:40  c# SCP接收DICOM文件实例源码\AppStorageSCU\obj\Release\AppStorageSCU.exe

............此处省略144个文件信息

评论

共有 条评论