谁技能描述述一下CFind SCP是怎么工作的

扫二维码下载作业帮
2亿+学生的选择
下载作业帮安装包
扫二维码下载作业帮
2亿+学生的选择
C语言高手帮帮忙!看下这句是什么意思!我看不懂那个 !findwhile( (i
扫二维码下载作业帮
2亿+学生的选择
比喻 find=true 那! find=false
意思就是find如果等于0的话就是false,等于1就是true吗?
对 在c语言 非0等都是 true
为您推荐:
其他类似问题
扫描下载二维码&Search&for&
findscu [options] peer port [dcmfile-in...]
The findscu application implements an SCU for the Query/Retrieve Service Class and the Basic Worklist Management Service Class. findscu only supports query functionality using the C-FIND message. It sends query keys to an SCP and awaits responses. The application can be used to test SCPs of the Query/Retrieve and Basic Worklist Management Service Classes.
hostname of DICOM peer
tcp/ip port number of peer
dcmfile-in
DICOM query file(s)
print this help text and exit
print version information and exit
--arguments
print expanded command line arguments
quiet mode, print no warnings and errors
verbose mode, print processing details
debug mode, print debug information
--log-level
[l]evel: string constant
(fatal, error, warn, info, debug, trace)
use level l for the logger
--log-config
[f]ilename: string
use config file f for the logger
override matching keys:
[k]ey: gggg,eeee="str", path or dictionary name="str"
override matching key
query information model:
--worklist
use modality worklist information model (default)
use patient root information model
use study root information model
use patient/study only information model
application entity titles:
[a]etitle: string
set my calling AE title (default: FINDSCU)
[a]etitle: string
set called AE title of peer (default: ANY-SCP)
post-1993 value representations:
--enable-new-vr
enable support for new VRs (UN/UT) (default)
--disable-new-vr
disable support for new VRs, convert to OB
proposed transmission transfer syntaxes:
--propose-uncompr
propose all uncompressed TS, explicit VR
with local byte ordering first (default)
--propose-little
propose all uncompressed TS, explicit VR
little endian first
--propose-big
propose all uncompressed TS, explicit VR
big endian first
--propose-implicit
propose implicit VR little endian TS only
other network options:
[s]econds: integer (default: unlimited)
timeout for connection requests
--acse-timeout
[s]econds: integer (default: 30)
timeout for ACSE messages
--dimse-timeout
[s]econds: integer (default: unlimited)
timeout for DIMSE messages
[n]umber of bytes: integer ()
set max receive pdu to n bytes (default: 16384)
[n]umber: integer
repeat n times
abort association instead of releasing it
[n]umber: integer
cancel after n responses (default: never)
extract responses to file (rsp0001.dcm, ...)
transport protocol stack:
--disable-tls
use normal TCP/IP connection (default)
--enable-tls
[p]rivate key file, [c]ertificate file: string
use authenticated secure TLS connection
--anonymous-tls
use secure TLS connection without certificate
private key password (only with --enable-tls):
--std-passwd
prompt user to type password on stdin (default)
--use-passwd
[p]assword: string
use specified password
--null-passwd
use empty string as password
key and certificate file format:
--pem-keys
read keys and certificates as PEM file (default)
--der-keys
read keys and certificates as DER file
certification authority:
--add-cert-file
[c]ertificate filename: string
add certificate file to list of certificates
--add-cert-dir
[c]ertificate directory: string
add certificates in d to list of certificates
ciphersuite:
[c]iphersuite name: string
add ciphersuite to list of negotiated suites
[f]ilename: string
read DH parameters for DH/DSS ciphersuites
pseudo random generator:
[f]ilename: string
seed random generator with contents of f
--write-seed
write back modified seed (only with --seed)
--write-seed-file
[f]ilename: string (only with --seed)
write modified seed to file f
peer authentication:
--require-peer-cert
verify peer certificate, fail if absent (default)
--verify-peer-cert
verify peer certificate if present
--ignore-peer-cert
don't verify peer certificate
Each file supplied on the command line will be sent to the SCP as part of a C-FIND request. The query file must be a valid DICOM data set containing the dataset part of a C-FIND-RQ message. The query file could, for instance, be created with the dump2dcm utility from a script like the following example:
# query patient names and IDs
() CS [PATIENT]
# QueryRetrieveLevel
# PatientName
# PatientID
Individual attributes of each file sent can be modified or supplemented using the -k option. For example the command:
findscu -P -k "()=HEWETT*" caesar 5678 patqry.dcm
will, when sent to the SCP caesar at TCP/IP port 5678, cause any PatientName attribute in patqry.dcm to have the value "HEWETT*". If such an attribute is present it will be replaced, if absent it will be inserted. The -k option can be present more than once. The value part (after the '=') may be absent causing the attribute to be sent with zero length.
In earlier versions of findscu, the tag keys were specified without braces around group and element number, e. g. "" instead of "()". It is recommended switchi however, the old syntax is still working.
Also -k accepts dictionary names instead of element tags for specifying DICOM elements. For example, the findscu call above then reads like this:
findscu -P -k PatientName="HEWETT*" caesar 5678 patqry.dcm
It is also possible to specify sequences, items and nested attributes using the -k option. In these cases, a special "path" notation has to be used, e. g.
findscu -W -k "()[0].Modality=CT" caesar 5678
This call queries a worklist server at host caesar for any planned procedures for CT modalities by specifing tag () "Scheduled Procedure Step Sequence" and an attribute "Modality" in the first item of this sequence with value "CT". Details on this path notation can be found in the documentation of dcmodify.
If no file is specified on the command line, the query must be specified completely with one or more -k options.
Each set of response identifiers received will be printed to stdout unless option --extract is used.
The findscu application supports the following SOP Classes as an SCU:
FINDPatientRootQueryRetrieveInformationModel
1.2.840..4.1.2.1.1
FINDStudyRootQueryRetrieveInformationModel
1.2.840..4.1.2.2.1
FINDPatientStudyOnlyQueryRetrieveInformationModel
1.2.840..4.1.2.3.1
FINDModalityWorklistInformationModel
1.2.840..4.31
The findscu application will propose presentation contexts for one of the abovementioned supported SOP Classes depending on command line options (-P, -S, -O or -W). Each proposed presentation context will propose the transfer syntaxes:
LittleEndianImplicitTransferSyntax
LittleEndianExplicitTransferSyntax
1.2.840..1
BigEndianExplicitTransferSyntax
1.2.840..2
The findscu application does not support extended negotiation.
The level of logging output of the various command line tools and underlying libraries can be specified by the user. By default, only errors and warnings are written to the standard error stream. Using option --verbose also informational messages like processing details are reported. Option --debug can be used to get more details on the internal activity, e.g. for debugging purposes. Other logging levels can be selected using option --log-level. In --quiet mode only fatal errors are reported. In such very severe error events, the application will usually terminate. For more details on the different logging levels, see documentation of module "oflog".
In case the logging output should be written to file (optionally with logfile rotation), to syslog (Unix) or the event log (Windows) option --log-config can be used. This configuration file also allows for directing only certain messages to a particular output stream and for filtering certain messages based on the module or application where they are generated. An example configuration file is provided in &etcdir&/logger.cfg).
All command line tools use the following notation for parameters: square brackets enclose optional values (0-1), three trailing dots indicate that multiple values are allowed (1-n), a combination of both means 0 to n values.
Command line options are distinguished from parameters by a leading '+' or '-' sign, respectively. Usually, order and position of command line options are arbitrary (i.e. they can appear anywhere). However, if options are mutually exclusive the rightmost appearance is used. This behaviour conforms to the standard evaluation rules of common Unix shells.
In addition, one or more command files can be specified using an '@' sign as a prefix to the filename (e.g. @command.txt). Such a command argument is replaced by the content of the corresponding text file (multiple whitespaces are treated as a single separator unless they appear between two quotation marks) prior to any further evaluation. Please note that a command file cannot contain another command file. This simple but effective approach allows to summarize common combinations of options/parameters and avoids longish and confusing command lines (an example is provided in file &datadir&/dumppat.txt).
The findscu utility will attempt to load DICOM data dictionaries specified in the DCMDICTPATH environment variable. By default, i.e. if the DCMDICTPATH environment variable is not set, the file &datadir&/dicom.dic will be loaded unless the dictionary is built into the application (default for Windows).
The default behaviour should be preferred and the DCMDICTPATH environment variable only used when alternative data dictionaries are required. The DCMDICTPATH environment variable has the same format as the Unix shell PATH variable in that a colon (":") separates entries. On Windows systems, a semicolon (";") is used as a separator. The data dictionary code will attempt to load each file specified in the DCMDICTPATH environment variable. It is an error if no data dictionary can be loaded.
movescu(1), dump2dcm(1), dcmodify(1)
Copyright (C)
by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
Generated on 6 Jan 2011 for
Version 3.6.0 by帖子35&精华0&金币108 枚&声望0 点&
第一条思路基本正确假如这里说的 Dataset 是 Part 8 里的 P-DATA item. 不能任意返回 Dataset 内容,client 有指定那些 elements 是它要的。
第二种思路是错的。
Modality worklist 有一点不同,因为它只有一层 query。如果同一个 Study 里有几个 Scheduled Procedures,应将这些 procedures 都加到 ()Sequence 里面去。但是 Study level 还是 Datasets。Modality worklist 返回 Dataset 内容则不见得都由 client 指定。
[/url] [/url] [/url]
[/url] [/url]
帖子114&精华0&金币387 枚&声望0 点&
看了Jb的文章对worklist 又模糊了,不同厂家的设备对wl的支持不一样么,那么worklist不是标准的一部分么?
[/url] [/url] [/url]
[/url] [/url]
帖子65&精华0&金币323 枚&声望0 点&
MWL是相同的,不过是Query的key不同,或者可能有多个Scheduled Procedures而已
一只加肥猫,有啥可怕? --- mouse forever
___________________________________
Name(姓名): [/url]
Field(行业) : PACS & RIS & DICOM
QQ (OICQ) : 2670136
Page (主页): [/url]
-------------------------------------------------------------
[/url] [/url] [/url]
[/url] [/url]
帖子85&精华0&金币324 枚&声望0 点&
MWL是相同的,不过是Query的key不同——这句话是什么意思
是指mwl返回的结构是相同的,不过是查询的query部分的key不一样而以么?
[/url] [/url] [/url]
[/url] [/url]
帖子187&精华0&金币293 枚&声望0 点&
对,就是结构是相同的,你可以参考DICOM标准第四章关于MWL的那部分说明,不同的就是查询条件不同产生的返回结果集合是不同的。
一只加肥猫,有啥可怕? --- mouse forever
___________________________________
Name(姓名): [/url]
Field(行业) : PACS & RIS & DICOM
QQ (OICQ) : 2670136
Page (主页): [/url]
-------------------------------------------------------------
[/url] [/url] [/url]
[/url] [/url]
帖子65&精华0&金币207 枚&声望0 点&
你的两种思路都有错误。正确的应该是:
Server接收到Client的请求,根据请求的参数,到本地查询到多个结果。将结果用DataSet打包返给Client,一个Dataset中仅包含一个结果,然后循环发送直到完成。发送一条记录后,需要检测Client是否请求终止消息,如果有则终止发送,否则继续发送下一条记录。
[/url] [/url] [/url]
[/url] [/url]
帖子38&精华0&金币420 枚&声望0 点&
hackerstudy
& & 该楼正解
[通过 QQ、MSN 分享给朋友] 您现在的位置:&&>>&&>>&&>>&DICOM:基于DCMTK实现CFIND SCU正文
DICOM:基于DCMTK实现CFIND SCU
DICOM:基于DCMTK实现CFIND SCU
作者/编辑:佚名
& & 背景:& & 专栏之前写过许多关于DICOM协议的相关文章,有关于概念解析的理论性文章,也有实例演示的应用性文章,。目的只有一个,希望能引导大家快速掌握DICOM协议,并着手进行自定义化开发。& & 目前DICOM协议实现有多种开源库,例如基于C++的DCMTK、基于C#的fo-dicom、基于Java的dcm4che。由于时间关系博文中的相关实例演示经常会穿插着使用三种开源库,因此具体到某一种库可能博文中并未给出示范工程。例如,近期有网友咨询希望利用DCMTK开源库自己动手实现C-FIND查询请求,并对服务端返回的信息进行定制化处理。因此周末动手编写了一个极简版的示例,代码裁剪于DCMTK开源库的findscu工程,供大家交流学习。准备知识:& & 为了更好的理解代码示例,请耐心阅读之前专栏里的相关文章,如果已经对DICOM协议很了解且有过开发经验,或者干脆就想先动手敲代码,想从实践中学习,那么请自行跳到下一节。& & 在开始工作之前先阅读DICOM医学图像处理:DICOM网路传输了解DICOM协议的含义以及简单的建立规则,随后阅读DICOM医学图像处理:全面解析DICOM3.0标准中的通讯服务模块和DICOM:DICOM3.0网络通信协议(续)进一步了解DICOM协议,以及熟悉DCMTK开源库中对DICOM协议的具体实现。阅读完上述理论概念性文章后,进一步浏览下面两篇实例演示博文DICOM医学图像处理:基于DCMTK工具包学习和分析worklist、DICOM医学图像处理:利用fo-dicom发送C-Find查询Worklist 。DCMTK实现C-FIND SCU:& & 待一切先验知识储备完成后,就可以进入我们的正题了,网友的需求是:& & 在阅读DICOM医学图像处理:基于DCMTK工具包学习和分析worklist、DICOM医学图像处理:利用fo-dicom发送C-Find查询Worklist 两篇实例博文后,希望利用DCMTK尝试发送C-FIND-RQ请求,然后将返回的C-FIND-RSP进行解析和后处理。& & 经过上述【准备知识】阶段后,想必大家已经了解了C-FIND请求建立的正题过程,因此不罗嗦了直接贴代码,用一个简单的实例来进行实际讲解。a)网络环境初始化//1)初始化网络环境
WSAData winSockD
/* we need at least version 1.1 */
WORD winSockVersionNeeded = MAKEWORD( 1, 1 );
WSAStartup(winSockVersionNeeded, &winSockData);b)DCMTK库初始化//2)DCMTK环境监测
if(!dcmDataDict.isDictionaryLoaded())
printf(No data dictionary loaded, check environment variable);
}c)建立DUL连接//3)网络层ASC初始化
T_ASC_Network* cfindNetwork=NULL;
int timeout=50;
OFCondition cond=ASC_initializeNetwork(NET_REQUESTOR,0,timeout,&cfindNetwork);
if(cond.bad())
printf(DICOM 底层网络初始化失败);
return -1;
//4)创建底层连接,即TCP层
T_ASC_Association* assoc=NULL;
T_ASC_Parameters* params=NULL;
DIC_NODENAME localH
DIC_NODENAME peerH
OFString temp_
cond=ASC_createAssociationParameters(&ms,maxReceivePDULength);
if(cond.bad())
printf(DCMTK创建连接失败);
return -2;
}d)判别连接&code class="hljs" cs=""&//5)设置DICOM相关属性,Presentation Context
ASC_setAPTitles(params, ourTitle, peerTitle, NULL);
cond = ASC_setTransportLayerType(params, false);
if (cond.bad()) return -3;
gethostname(localHost, sizeof(localHost) - 1);
sprintf(peerHost, %s:%d, peer, OFstatic_cast(int, port));
ASC_setPresentationAddresses(params, localHost, peerHost);
cond=ASC_addPresentationContext(params,1,abstractSyntax,transferSyntaxs,transferSyntaxNum);
if(cond.bad())
return -4;
//6)真正创建连接
cond=ASC_requestAssociation(cfindNetwork,params,&assoc);
if (cond.bad()) {
if (cond == DUL_ASSOCIATIONREJECTED) {
T_ASC_RejectP
ASC_getRejectParameters(params, &rej);
DCMNET_ERROR(Association Rejected: && OFendl && ASC_printRejectParameters(temp_str, &rej));
return -5;
DCMNET_ERROR(Association Request Failed:
&& DimseCondition::dump(temp_str, cond));
return -6;
//7)判别返回结果
//7.1)连接检验阶段,验证Presentation Context
if(ASC_countAcceptedPresentationContexts(params)==0)
printf(No acceptable Presentation Contexts);
return -7;
T_ASC_PresentationContextID presID;
T_DIMSE_C_FindRQ
T_DIMSE_C_FindRSP
presID=ASC_findAcceptedPresentationContextID(assoc,abstractSyntax);
if(presID==0)
printf(No presentation context);
return -8;
}&/code&e)发送C-FIND-RQ&code class="hljs" cpp=""&//8)发起C-FIND请求
//8.1)准备C-FIND-RQ message
bzero(OFreinterpret_cast(char*,&req),sizeof(req));//内存初始化为空;
strcpy(req.AffectedSOPClassUID,abstractSyntax);
req.DataSetType=DIMSE_DATASET_PRESENT;
req.Priority=DIMSE_PRIORITY_LOW;
//设置要查询的信息为空时,待会儿查询结果中会返回
DcmDataset* dataset=new DcmDataset();
InsertQueryItems(dataset,A^B^C);
//赋值自定义的回调函数,这就是该回调函数中可以进行相关信息的操作
ZSCFindCallback zsC
DcmFindSCUCallback* callback=&zsC
callback-&setAssociation(assoc);
callback-&setPresentationContextID(presID);
/* as long as no error occured and the counter does not equal 0 */
cond = EC_N&/code&f)设置回调函数,进行自定义处理&code class="hljs" cs=""&class ZSCFindCallback:public DcmFindSCUCallback{public:
ZSCFindCallback()
~ZSCFindCallback()
void callback( T_DIMSE_C_FindRQ *request,
int responseCount,
T_DIMSE_C_FindRSP *rsp,
DcmDataset *rspMessage
);};&/code&g)获取C-FIND-RSP&code class="hljs" lasso=""&while (cond.good())
DcmDataset *statusDetail = NULL;
/* complete preparation of C-FIND-RQ message */
req.MessageID = assoc-&nextMsgID++;
/* finally conduct transmission of data */
cond = DIMSE_findUser(assoc, presID, &req, dataset,
progressCallback, callback, DIMSE_BLOCKING, timeout,
&rsp, &statusDetail);
//设置了查询采用阻塞模式,DIMSE_BLOCKING
//设置连接超时为50
*添加异常判别
cond=EC_EndOfS//假设异常,返回
}&/code&实例测试:& & 参照之前DICOM医学图像处理:基于DCMTK工具包学习和分析worklist、DICOM医学图像处理:利用fo-dicom发送C-Find查询Worklist博文中的介绍进行测试即可,具体细节不多说,简单介绍一下:启动Worklist SCP:& & 按照之前博文介绍,构建worklist数据库,在命令行输入:& & wlmscpfs.exe -d -dfr -dfp ./wlistdb 2234& & 看到以下结果,说明顺利启动worklist服务端,《》()。& & 启动C-Find SCP:& & 在VS环境下,直接运行dumpCFindResponse工程,看到如下结果:& & & & 至此,自己构建的C-Find SCU顺利实现了发送C-FIND-RQ,并自定义处理C-FIND-RSP的目的。& & PS:这里只是简单的给出了一个示范,要实际开发自己的C-FIND SCU和C-FIND SCP时需要考虑更多的细节,诸如PresentationContext、TransferSyntax等等。
DICOM:基于DCMTK实现CFIND SCU2    〖预览〗& & static, enum, 内部类与单例模式& & 标签: Java与设计模式Java static与初始化块拾忆& & static关键字的作用是把类的成员变成类相关,而不是实例相关.& & 普通初始化块& & 当Java创建一个对象时, 系统先为对象的所有实例变量分配内存(前提是该类已经被加载过了), 然后开始对这些实例变量进行初始化, 顺序是: 先执行初始化块或声明实例变量时指定的初始值(这两处执行的顺序与他们在源代码中排列顺序相同), 再执行构造器里指定的初始值.& & 静态初始化块& & 又名类初始化块(普通初始化块负责对象初始化, 类初始化块负责对类进行初始化). 静态初始化块是类相关的, 系统将在类初始化阶段静态初始化, 而不是在创建对象时才执行. 因此静态初始化块总是先于普通初始化块执行.& & 执行顺序& & 系统在类初始化以及对象初始化时, 不仅会执行本类的初始化块[static/non-static], 而且还会一直上溯到java.lang.Object类, 先执行Object类中的初始化块[static/non……【】DICOM:基于DCMTK实现CFIND SCU3    〖预览〗& & &?xml version=1.0 encoding=UTF-8?&&!DOCTYPE struts PUBLIC
-//Apache Software Foundation//DTD Struts Configuration 2.3//EN
http://struts.apache.org/dtds/struts-2.3.dtd&&struts&
&!-- 把它设置为开发模式,发布时要设置为false --&
&constant name=struts.devMode value=true /&
&!-- 设置在class被修改时是否热加载,发布时要设置为false --&
&constant name=struts.convention.classes.reload value=true/&
&!-- 自动动态方法的调用,使用这个设置后可以这样调用:action!method --&
&constant name=struts.enable.DynamicMethodInvocation value=true /&
&!-……【】
  〔DICOM:基于DCMTK实现CFIND SCU〕
  DICOM:基于DCMTK实现CFIND SCU所属栏目:〖〗
  〖〗链接地址:
  电脑资料提供的DICOM:基于DCMTK实现CFIND SCU由网友原创或转发,若DICOM:基于DCMTK实现CFIND SCU侵犯了您的权益,请与本站联系,谢谢!
上一篇资料: 下一篇资料:
DICOM:基于DCMTK实现CFIND SCU相关资料

我要回帖

更多关于 产品研发能力怎么描述 的文章

 

随机推荐