L_DicomInsertUID

#include "Ltdic.h"

L_LTDIC_API pDICOMUID L_DicomInsertUID(pszCode, pszName, nType)

L_TCHAR * pszCode;

/* UID code */

L_TCHAR * pszName;

/* name of the UID */

L_INT nType;

/* type of UID */

Inserts a new item in the UID Table.

Parameter

Description

pszCode

Unique identifier code. For a list of default values, refer to the UID Table.

pszName

The name of the unique identifier. For a list of default values, refer to the UID Table.

nType

Type of UID to insert. Possible values are:

 

Value

Meaning

 

UID_TYPE_OTHER

Unknown

 

UID_TYPE_TRANSFER1

Transfer Syntax - Uncompressed Image

 

UID_TYPE_TRANSFER2

Transfer Syntax - Compressed Image

 

UID_TYPE_CLASS

SOP Class

 

UID_TYPE_META_CLASS

Meta SOP Class

 

UID_TYPE_INSTANCE

SOP Instance

 

UID_TYPE_APPLICATION

Application Context Name

Returns

!NULL

A pointer to a DICOMUID structure containing the newly inserted item.

NULL

Not enough memory to insert the item.

Comments

Note: Inserted UID items will work within LEADTOOLS, however, in order for new UID values to work across countries, sites, equipment, etc. you must contact the National Electrical Manufacturers Association.

All items are inserted at the bottom of the table.

To see the default values for the UID Table, refer to the UID Table.

For more information on the DICOM file format, refer to An Overview of Dicom or the DICOM Spec.

Required DLLs and Libraries

LTDIC

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

Platforms

Win32, x64

See Also

Functions:

L_DicomDeleteUID, L_DicomResetUID, L_DicomDefaultUID, L_DicomLoadXmlUID

Topics:

Working with Unique Identifiers

Example

This example inserts 2 new items in the UID table

L_INT DicomInsertUIDExample(L_VOID)
{
   pDICOMUID pTemp = NULL;

   pTemp = L_DicomInsertUID(TEXT("1.2.3.4.5"), TEXT("New XXX UID"), UID_TYPE_OTHER);
   if (pTemp == NULL)
      return DICOM_ERROR_MEMORY;

   pTemp = L_DicomInsertUID(TEXT("6.7.8.9.0"), TEXT("New YYY UID"), UID_TYPE_OTHER);
   if (pTemp == NULL)
      return DICOM_ERROR_MEMORY;

   return DICOM_SUCCESS;
}