dcmGenerateUniqueIdentifier

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
qs5d
Posts: 6
Joined: Thu, 2005-04-28, 14:53

dcmGenerateUniqueIdentifier

#1 Post by qs5d »

I want to change the sop instance Uid, I found the following example. I searched the classes, I couldn't find things like dcmGenerateUniqueIdentifier, could you please tell me how to use it? What is the uid and how to define it? Thank you.


dataset->putAndInsertString(DCM_SOPInstanceUID, dcmGenerateUniqueIdentifier(uid, SITE_INSTANCE_UID_ROOT));

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#2 Post by Jörg Riesmeier »

See "dcmdata/include/dcuid.h":

Code: Select all

/*
** char* generateUniqueIdentifier(char* uid)
** Creates a Unique Identifer in uid and returns uid.
** uid must be at least 65 bytes. Care is taken to make sure
** that the generated UID is 64 characters or less.
**
** If a prefix string is not passed as the second argument a
** default of SITE_INSTANCE_UID_ROOT (see below) will be used.
** Otherwise the supplied prefix string will appear at the beginning
** of uid.
**
** The UID is created by appending to the prefix the following:
**      the host id (if obtainable, zero otherwise)
**      the process id (if obtainable, zero otherwise)
**      the system calendar time
**      an accumulating counter for this process
*/
char* dcmGenerateUniqueIdentifier(char* uid, const char* prefix=NULL);

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest