`
qimo601
  • 浏览: 3418512 次
  • 性别: Icon_minigender_1
  • 来自: 苏州
社区版块
存档分类
最新评论

DCMTK形成DICOM的UID

阅读更多

 

Howto: Generate Unique Identifier (UID)

Here's an example that shows how the generation of three new UIDs works (e.g. to be used for a new SOP Instance created by dump2dcm) :

Source Code

 

#include "dcmtk/config/osconfig.h"
#include "dcmtk/dcmdata/dcuid.h"
#include "dcmtk/ofstd/ofstream.h"
 
int main(int /*argc*/, char * /*argv*/ [])
{
    char uid[100];
    STD_NAMESPACE cout << "Study Instance UID  : " << dcmGenerateUniqueIdentifier(uid, SITE_STUDY_UID_ROOT) << OFendl;
    STD_NAMESPACE cout << "Series Instance UID : " << dcmGenerateUniqueIdentifier(uid, SITE_SERIES_UID_ROOT) << OFendl;
    STD_NAMESPACE cout << "SOP Instance UID    : " << dcmGenerateUniqueIdentifier(uid, SITE_INSTANCE_UID_ROOT) << OFendl;
 
    return 0;
}
 

 

 

 

------------------------------------------------------------------

柳北风儿

http://qimo601.iteye.com

转载:http://support.dcmtk.org/wiki/dcmtk/howto/generateuids


分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics