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


你可能感兴趣的:(DCMTK,UID,DICOM)