DCMTK Version 3.6.7
OFFIS DICOM Toolkit
Macros | Enumerations | Functions | Variables
dcuid.h File Reference

global definitions and functions for UID handling More...

Macros

#define OFFIS_DTK_IMPLEMENTATION_VERSION_NAME   "OFFIS_DCMTK_" PACKAGE_VERSION_NUMBER_TO_STRING(PACKAGE_VERSION_NUMBER)
 implementation version name for this version of the toolkit
 
#define OFFIS_DTK_IMPLEMENTATION_VERSION_NAME2   "OFFIS_DCMBP_" PACKAGE_VERSION_NUMBER_TO_STRING(PACKAGE_VERSION_NUMBER)
 implementation version name for this version of the toolkit, used for files received in "bit preserving" mode
 
#define OFFIS_DCMTK_RELEASEDATE   PACKAGE_DATE
 release date of current toolkit release
 
#define OFFIS_UID_ROOT   "1.2.276.0.7230010.3"
 UID root for DCMTK, registered for OFFIS with DIN in Germany.
 
#define OFFIS_DCMTK_VERSION_NUMBER   PACKAGE_VERSION_NUMBER
 DCMTK version number for this release.
 
#define OFFIS_DCMTK_VERSION_STRING   PACKAGE_VERSION
 DCMTK version number (as string) for this release.
 
#define OFFIS_DCMTK_VERSION_SUFFIX   PACKAGE_VERSION_SUFFIX
 DCMTK version number suffix string for this release.
 
#define OFFIS_DCMTK_VERSION   OFFIS_DCMTK_VERSION_STRING OFFIS_DCMTK_VERSION_SUFFIX
 DCMTK version number string including suffix.
 
#define OFFIS_IMPLEMENTATION_CLASS_UID   OFFIS_UID_ROOT ".0." OFFIS_DCMTK_VERSION_STRING
 Implementation class UID for this release of the toolkit.
 
#define OFFIS_INSTANCE_CREATOR_UID   OFFIS_IMPLEMENTATION_CLASS_UID
 Instance creator UID for this release of the toolkit.
 
#define OFFIS_CODING_SCHEME_UID_ROOT   OFFIS_UID_ROOT ".0.0"
 private coding scheme UID root for coding schemes generated by OFFIS
 
#define OFFIS_CODING_SCHEME_VERSION   "1"
 private coding scheme version for coding schemes generated by OFFIS
 
#define OFFIS_CODING_SCHEME_UID   OFFIS_CODING_SCHEME_UID_ROOT "." OFFIS_CODING_SCHEME_VERSION
 private coding scheme UID for coding schemes generated by OFFIS
 
#define SITE_UID_ROOT   OFFIS_UID_ROOT /* default */
 UID root to be used when generating UIDs. By default uses the DCMTK root, but can be replaced at compile time.
 
#define SITE_STUDY_UID_ROOT   SITE_UID_ROOT ".1.2"
 UID root for study instance UIDs.
 
#define SITE_SERIES_UID_ROOT   SITE_UID_ROOT ".1.3"
 UID root for series instance UIDs.
 
#define SITE_INSTANCE_UID_ROOT   SITE_UID_ROOT ".1.4"
 UID root for SOP instance UIDs.
 
#define UID_PrivateGenericFileSOPClass   SITE_UID_ROOT ".1.0.1"
 A private SOP Class UID which is used in a file meta-header when no instance of a Storage SOP Class is stored in the file. More...
 
#define UID_StandardApplicationContext   "1.2.840.10008.3.1.1.1"
 DICOM Defined Standard Application Context UID.
 
#define UID_LittleEndianImplicitTransferSyntax   "1.2.840.10008.1.2"
 Implicit VR Little Endian: Default Transfer Syntax for DICOM.
 
#define UID_LittleEndianExplicitTransferSyntax   "1.2.840.10008.1.2.1"
 Explicit VR Little Endian.
 
#define UID_BigEndianExplicitTransferSyntax   "1.2.840.10008.1.2.2"
 Explicit VR Big Endian - RETIRED.
 
#define UID_DeflatedExplicitVRLittleEndianTransferSyntax   "1.2.840.10008.1.2.1.99"
 Deflated Explicit VR Little Endian.
 
#define UID_JPEGProcess1TransferSyntax   "1.2.840.10008.1.2.4.50"
 JPEG Baseline (Process 1): Default Transfer Syntax for Lossy JPEG 8 Bit Image Compression.
 
#define UID_JPEGProcess2_4TransferSyntax   "1.2.840.10008.1.2.4.51"
 JPEG Extended (Process 2 & 4): Default Transfer Syntax for Lossy JPEG 12 Bit Image Compression (Process 4 only)
 
#define UID_JPEGProcess3_5TransferSyntax   "1.2.840.10008.1.2.4.52"
 JPEG Extended (Process 3 & 5) - RETIRED.
 
#define UID_JPEGProcess6_8TransferSyntax   "1.2.840.10008.1.2.4.53"
 JPEG Spectral Selection, Non-Hierarchical (Process 6 & 8) - RETIRED.
 
#define UID_JPEGProcess7_9TransferSyntax   "1.2.840.10008.1.2.4.54"
 JPEG Spectral Selection, Non-Hierarchical (Process 7 & 9) - RETIRED.
 
#define UID_JPEGProcess10_12TransferSyntax   "1.2.840.10008.1.2.4.55"
 JPEG Full Progression, Non-Hierarchical (Process 10 & 12) - RETIRED.
 
#define UID_JPEGProcess11_13TransferSyntax   "1.2.840.10008.1.2.4.56"
 JPEG Full Progression, Non-Hierarchical (Process 11 & 13) - RETIRED.
 
#define UID_JPEGProcess14TransferSyntax   "1.2.840.10008.1.2.4.57"
 JPEG Lossless, Non-Hierarchical (Process 14)
 
#define UID_JPEGProcess15TransferSyntax   "1.2.840.10008.1.2.4.58"
 JPEG Lossless, Non-Hierarchical (Process 15) - RETIRED.
 
#define UID_JPEGProcess16_18TransferSyntax   "1.2.840.10008.1.2.4.59"
 JPEG Extended, Hierarchical (Process 16 & 18) - RETIRED.
 
#define UID_JPEGProcess17_19TransferSyntax   "1.2.840.10008.1.2.4.60"
 JPEG Extended, Hierarchical (Process 17 & 19) - RETIRED.
 
#define UID_JPEGProcess20_22TransferSyntax   "1.2.840.10008.1.2.4.61"
 JPEG Spectral Selection, Hierarchical (Process 20 & 22) - RETIRED.
 
#define UID_JPEGProcess21_23TransferSyntax   "1.2.840.10008.1.2.4.62"
 JPEG Spectral Selection, Hierarchical (Process 21 & 23) - RETIRED.
 
#define UID_JPEGProcess24_26TransferSyntax   "1.2.840.10008.1.2.4.63"
 JPEG Full Progression, Hierarchical (Process 24 & 26) - RETIRED.
 
#define UID_JPEGProcess25_27TransferSyntax   "1.2.840.10008.1.2.4.64"
 JPEG Full Progression, Hierarchical (Process 25 & 27) - RETIRED.
 
#define UID_JPEGProcess28TransferSyntax   "1.2.840.10008.1.2.4.65"
 JPEG Lossless, Hierarchical (Process 28) - RETIRED.
 
#define UID_JPEGProcess29TransferSyntax   "1.2.840.10008.1.2.4.66"
 JPEG Lossless, Hierarchical (Process 29) - RETIRED.
 
#define UID_JPEGProcess14SV1TransferSyntax   "1.2.840.10008.1.2.4.70"
 JPEG Lossless, Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1]): Default Transfer Syntax for Lossless JPEG Image Compression.
 
#define UID_JPEGLSLosslessTransferSyntax   "1.2.840.10008.1.2.4.80"
 JPEG-LS Lossless Image Compression.
 
#define UID_JPEGLSLossyTransferSyntax   "1.2.840.10008.1.2.4.81"
 JPEG-LS Lossy (Near-Lossless) Image Compression.
 
#define UID_JPEG2000LosslessOnlyTransferSyntax   "1.2.840.10008.1.2.4.90"
 JPEG 2000 Image Compression (Lossless Only)
 
#define UID_JPEG2000TransferSyntax   "1.2.840.10008.1.2.4.91"
 JPEG 2000 Image Compression (Lossless or Lossy)
 
#define UID_JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax   "1.2.840.10008.1.2.4.92"
 JPEG 2000 Part 2 Multi-component Image Compression (Lossless Only)
 
#define UID_JPEG2000Part2MulticomponentImageCompressionTransferSyntax   "1.2.840.10008.1.2.4.93"
 JPEG 2000 Part 2 Multi-component Image Compression (Lossless or Lossy)
 
#define UID_JPIPReferencedTransferSyntax   "1.2.840.10008.1.2.4.94"
 JPIP Referenced.
 
#define UID_JPIPReferencedDeflateTransferSyntax   "1.2.840.10008.1.2.4.95"
 JPIP Referenced Deflate.
 
#define UID_MPEG2MainProfileAtMainLevelTransferSyntax   "1.2.840.10008.1.2.4.100"
 MPEG2 Main Profile @ Main Level (changed with DICOM 2016e to: MPEG2 Main Profile / Main Level)
 
#define UID_MPEG2MainProfileAtHighLevelTransferSyntax   "1.2.840.10008.1.2.4.101"
 MPEG2 Main Profile @ High Level (changed with DICOM 2016e to: MPEG2 Main Profile / High Level)
 
#define UID_MPEG4HighProfileLevel4_1TransferSyntax   "1.2.840.10008.1.2.4.102"
 MPEG-4 AVC/H.264 High Profile / Level 4.1.
 
#define UID_MPEG4BDcompatibleHighProfileLevel4_1TransferSyntax   "1.2.840.10008.1.2.4.103"
 MPEG-4 AVC/H.264 BD-compatible High Profile / Level 4.1.
 
#define UID_MPEG4HighProfileLevel4_2_For2DVideoTransferSyntax   "1.2.840.10008.1.2.4.104"
 MPEG-4 AVC/H.264 High Profile / Level 4.2 For 2D Video.
 
#define UID_MPEG4HighProfileLevel4_2_For3DVideoTransferSyntax   "1.2.840.10008.1.2.4.105"
 MPEG-4 AVC/H.264 High Profile / Level 4.2 For 3D Video.
 
#define UID_MPEG4StereoHighProfileLevel4_2TransferSyntax   "1.2.840.10008.1.2.4.106"
 MPEG-4 AVC/H.264 Stereo High Profile / Level 4.2.
 
#define UID_HEVCMainProfileLevel5_1TransferSyntax   "1.2.840.10008.1.2.4.107"
 HEVC/H.265 Main Profile / Level 5.1.
 
#define UID_HEVCMain10ProfileLevel5_1TransferSyntax   "1.2.840.10008.1.2.4.108"
 HEVC/H.265 Main 10 Profile / Level 5.1.
 
#define UID_RLELosslessTransferSyntax   "1.2.840.10008.1.2.5"
 RLE Lossless.
 
#define UID_SMPTEST2110_20_UncompressedProgressiveActiveVideoTransferSyntax   "1.2.840.10008.1.2.7.1"
 SMPTE ST 2110-20 Uncompressed Progressive Active Video.
 
#define UID_SMPTEST2110_20_UncompressedInterlacedActiveVideoTransferSyntax   "1.2.840.10008.1.2.7.2"
 SMPTE ST 2110-20 Uncompressed Interlaced Active Video.
 
#define UID_SMPTEST2110_30_PCMDigitalAudioTransferSyntax   "1.2.840.10008.1.2.7.3"
 SMPTE ST 2110-30 PCM Digital Audio.
 
#define UID_RFC2557MIMEEncapsulationTransferSyntax   "1.2.840.10008.1.2.6.1"
 RFC 2557 MIME Encapsulation (RETIRED) was only a pseudo transfer syntax used to refer to MIME encapsulated HL7 CDA documents from a DICOMDIR when stored on a DICOM storage medium. More...
 
#define UID_XMLEncodingTransferSyntax   "1.2.840.10008.1.2.6.2"
 XML Encoding (RETIRED) was only a pseudo transfer syntax used to refer to encapsulated HL7 CDA documents from a DICOMDIR when stored on a DICOM storage medium. More...
 
#define UID_PrivateGE_LEI_WithBigEndianPixelDataTransferSyntax   "1.2.840.113619.5.2"
 Private transfer syntax defined by GE. More...
 

Enumerations

enum  E_StorageSOPClassType { ESSC_Patient = 0x01 , ESSC_NonPatient = 0x02 , ESSC_Image = 0x04 , ESSC_All = 0x03 }
 type of Storage SOP Class More...
 

Functions

DCMTK_DCMDATA_EXPORT const char * dcmFindNameOfUID (const char *uid, const char *defaultValue=NULL)
 return the name of a UID. More...
 
DCMTK_DCMDATA_EXPORT const char * dcmFindUIDFromName (const char *name)
 return the UID of a name. More...
 
DCMTK_DCMDATA_EXPORT OFBool dcmIsaStorageSOPClassUID (const char *uid, const E_StorageSOPClassType type=ESSC_Patient)
 returns true if the uid is one of the Storage SOP Classes. More...
 
DCMTK_DCMDATA_EXPORT OFBool dcmIsImageStorageSOPClassUID (const char *uid)
 returns true if the uid is one of the Image Storage SOP Classes. More...
 
DCMTK_DCMDATA_EXPORT char * dcmGenerateUniqueIdentifier (char *uid, const char *prefix=NULL)
 creates a Unique Identifier in uid and returns uid. More...
 
DCMTK_DCMDATA_EXPORT const char * dcmSOPClassUIDToModality (const char *sopClassUID, const char *defaultValue=NULL)
 performs a table lookup and returns a short modality identifier that can be used for building file names etc. More...
 
DCMTK_DCMDATA_EXPORT unsigned long dcmGuessModalityBytes (const char *sopClassUID)
 performs a table lookup and returns a guessed average file size for the given SOP class. More...
 

Variables

DCMTK_DCMDATA_EXPORT const char * dcmAllStorageSOPClassUIDs []
 an array of const strings containing all known Storage SOP Classes that fit into the conventional PATIENT-STUDY-SERIES-INSTANCE information model, i.e. More...
 
DCMTK_DCMDATA_EXPORT const int numberOfDcmAllStorageSOPClassUIDs
 number of entries in dcmAllStorageSOPClassUIDs.
 
DCMTK_DCMDATA_EXPORT const char * dcmLongSCUStorageSOPClassUIDs []
 an array of const strings containing all storage SOP classes that are proposed by default by those Storage SCU components in DCMTK that always propose one presentation context for each SOP class, e.g. More...
 
DCMTK_DCMDATA_EXPORT const int numberOfDcmLongSCUStorageSOPClassUIDs
 number of entries in dcmLongSCUStorageSOPClassUIDs.
 
DCMTK_DCMDATA_EXPORT const char * dcmShortSCUStorageSOPClassUIDs []
 an array of const strings containing all storage SOP classes that are proposed by default by those Storage SCU components in DCMTK that always propose TWO presentation context for each SOP class, e.g. More...
 
DCMTK_DCMDATA_EXPORT const int numberOfDcmShortSCUStorageSOPClassUIDs
 number of entries in dcmShortSCUStorageSOPClassUIDs.
 
DCMTK_DCMDATA_EXPORT const char * dcmImageSOPClassUIDs []
 a global constant array of string pointers containing the UIDs of all known Image SOP Classes. More...
 
DCMTK_DCMDATA_EXPORT const int numberOfDcmImageSOPClassUIDs
 number of entries in dcmImageSOPClassUIDs
 

Detailed Description

global definitions and functions for UID handling

Macro Definition Documentation

◆ UID_PrivateGE_LEI_WithBigEndianPixelDataTransferSyntax

#define UID_PrivateGE_LEI_WithBigEndianPixelDataTransferSyntax   "1.2.840.113619.5.2"

Private transfer syntax defined by GE.

This transfer syntax is identical to Implicit VR Little Endian, except that Pixel Data are encoded in big endian.

◆ UID_PrivateGenericFileSOPClass

#define UID_PrivateGenericFileSOPClass   SITE_UID_ROOT ".1.0.1"

A private SOP Class UID which is used in a file meta-header when no instance of a Storage SOP Class is stored in the file.

– NON-STANDARD

◆ UID_RFC2557MIMEEncapsulationTransferSyntax

#define UID_RFC2557MIMEEncapsulationTransferSyntax   "1.2.840.10008.1.2.6.1"

RFC 2557 MIME Encapsulation (RETIRED) was only a pseudo transfer syntax used to refer to MIME encapsulated HL7 CDA documents from a DICOMDIR when stored on a DICOM storage medium.

It was never used for network communication or encoding of DICOM objects.

◆ UID_XMLEncodingTransferSyntax

#define UID_XMLEncodingTransferSyntax   "1.2.840.10008.1.2.6.2"

XML Encoding (RETIRED) was only a pseudo transfer syntax used to refer to encapsulated HL7 CDA documents from a DICOMDIR when stored on a DICOM storage medium.

It was never used for network communication or encoding of DICOM objects.

Enumeration Type Documentation

◆ E_StorageSOPClassType

type of Storage SOP Class

Enumerator
ESSC_Patient 

patient objects

ESSC_NonPatient 

non-patient objects

ESSC_Image 

image objects (subset of patient objects)

ESSC_All 

all types (patient and non-patient objects)

Function Documentation

◆ dcmFindNameOfUID()

DCMTK_DCMDATA_EXPORT const char * dcmFindNameOfUID ( const char *  uid,
const char *  defaultValue = NULL 
)

return the name of a UID.

Performs a table lookup and returns a pointer to a read-only string.

Parameters
uidUID string for which the name is to be looked up
defaultValuedefault to return if UID not known
Returns
name string or defaultValue if UID is unknown

◆ dcmFindUIDFromName()

DCMTK_DCMDATA_EXPORT const char * dcmFindUIDFromName ( const char *  name)

return the UID of a name.

Performs a table lookup and returns a pointer to a read-only string.

Parameters
namename string for which the corresponding UID is to be looked up
Returns
UID string or NULL if name is unknown

◆ dcmGenerateUniqueIdentifier()

DCMTK_DCMDATA_EXPORT char * dcmGenerateUniqueIdentifier ( char *  uid,
const char *  prefix = NULL 
)

creates a Unique Identifier 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, and
  • an accumulating counter for this process.
    Parameters
    uidpointer to buffer of 65 or more characters in which the UID is returned
    prefixprefix for UID creation
    Returns
    pointer to UID, identical to uid parameter

◆ dcmGuessModalityBytes()

DCMTK_DCMDATA_EXPORT unsigned long dcmGuessModalityBytes ( const char *  sopClassUID)

performs a table lookup and returns a guessed average file size for the given SOP class.

Average sizes are defined for all storage SOP classes, but may be very far off.

Parameters
sopClassUIDUID string
Returns
estimated average size for objects of this SOP class

◆ dcmIsaStorageSOPClassUID()

DCMTK_DCMDATA_EXPORT OFBool dcmIsaStorageSOPClassUID ( const char *  uid,
const E_StorageSOPClassType  type = ESSC_Patient 
)

returns true if the uid is one of the Storage SOP Classes.

Performs a table lookup in the dcmAllStorageSOPClassUIDs, dcmImageSOPClassUIDs and/or other tables depending on the requested type of Storage SOP Class. Please note that, by default, this function only covers those Storage SOP Classes that fit into the conventional PATIENT-STUDY-SERIES-INSTANCE information model, i.e. non-patient DICOM objects are missing. This can be changed by setting the optional type parameter to ESSC_NonPatient.

Parameters
uidUID string
typetype of Storage SOP Class (default: patient objects only)
Returns
true if UID is a known Storage SOP Class, false otherwise

◆ dcmIsImageStorageSOPClassUID()

DCMTK_DCMDATA_EXPORT OFBool dcmIsImageStorageSOPClassUID ( const char *  uid)

returns true if the uid is one of the Image Storage SOP Classes.

This is just a shortcut for dcmIsaStorageSOPClassUID(uid, ESSC_Image).

Parameters
uidUID string
Returns
true if UID is a known Image Storage SOP Class, false otherwise

◆ dcmSOPClassUIDToModality()

DCMTK_DCMDATA_EXPORT const char * dcmSOPClassUIDToModality ( const char *  sopClassUID,
const char *  defaultValue = NULL 
)

performs a table lookup and returns a short modality identifier that can be used for building file names etc.

Identifiers are defined for all storage SOP classes. Returns 'defaultValue' if no modality identifier found or sopClassUID==NULL.

Parameters
sopClassUIDUID string
defaultValuedefault to return if UID not known
Returns
modality string for modality UID, or defaultValue if not found

Variable Documentation

◆ dcmAllStorageSOPClassUIDs

DCMTK_DCMDATA_EXPORT const char* dcmAllStorageSOPClassUIDs[]
extern

an array of const strings containing all known Storage SOP Classes that fit into the conventional PATIENT-STUDY-SERIES-INSTANCE information model, i.e.

everything a Storage SCP might want to store in a PACS. Special cases such as Hanging Protocol or Color Palette Storage SOP Class are not included in this list. WARNING: This list contains more than 64 entries, i.e. it is not possible to use this list to configure the association negotiation behavior of a Storage SCU that always proposes two presentation contexts for each SOP class.

◆ dcmImageSOPClassUIDs

DCMTK_DCMDATA_EXPORT const char* dcmImageSOPClassUIDs[]
extern

a global constant array of string pointers containing the UIDs of all known Image SOP Classes.

The global variable numberOfDcmImageSOPClassUIDs defines the size of the array. NOTE: this list represents a subset of the dcmAllStorageSOPClassUIDs list

◆ dcmLongSCUStorageSOPClassUIDs

DCMTK_DCMDATA_EXPORT const char* dcmLongSCUStorageSOPClassUIDs[]
extern

an array of const strings containing all storage SOP classes that are proposed by default by those Storage SCU components in DCMTK that always propose one presentation context for each SOP class, e.g.

movescu or dcmqrdb. This list is guaranteed to have at most 120 entries (to leave room for FIND/MOVE presentation contexts).

◆ dcmShortSCUStorageSOPClassUIDs

DCMTK_DCMDATA_EXPORT const char* dcmShortSCUStorageSOPClassUIDs[]
extern

an array of const strings containing all storage SOP classes that are proposed by default by those Storage SCU components in DCMTK that always propose TWO presentation context for each SOP class, e.g.

storescu. This list is guaranteed to have at most 64 entries.


Generated on Wed Jan 4 2023 for DCMTK Version 3.6.7 by Doxygen 1.9.4