L_DicomInsertTag

#include "Ltdic.h"

L_LTDIC_API pDICOMTAG L_DicomInsertTag(nCode, nMask, pszName, nVR, nMinVM, nMaxVM, nDivideVM)

L_UINT32 nCode;

code

L_UINT32 nMask;

masking value

L_TCHAR * pszName;

name of the tag

L_UINT16 nVR;

value representation

L_UINT32 nMinVM;

minimum value multiplicity

L_UINT32 nMaxVM;

maximum value multiplicity

L_UINT32 nDivideVM;

value used to divide the value multiplicity

Inserts a new item in the Data Element Tag Table.

Parameter

Description

nCode

Code that indicates the tag. For a list of default values, refer to Data Element Tag Constants.

nMask

Masking value. Masking allows you to insert multiple elements in the same entry in the table.

pszName

Character string that contains the name of the tag. To see the default values for the Tag Names, refer to the Default Data Element Tag Table.

nVR

Value representation code that indicates the type of value stored in the data element. For a list of default values supported by DICOM, refer to Value Representation Constants.

nMinVM

Value that indicates the minimum number of values that may be stored in the Value Field of the Data Element.

nMaxVM

Value that indicates the maximum number of values that may be stored in the Value Field of the Data Element.

nDivideVM

Value used to divide the value multiplicity. When multiple values are stored in the value field of a data element, the number of values present must be evenly divisible by nDivideVM. For most items nDivideVM will be 1. However, if the values stored in the value field are RGB triplets, for example, you would have to store three values for each triplet. You could store 12 values, since 12 values would be 4 triplets, however, you could not store 13 values. In this case nDivideVM would be 3.

Returns

!NULL

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

NULL

Not enough memory to insert the item.

Comments

All items are inserted at the bottom of the table.

To see the default values for the Data Element Tag Table, refer to the Default Data Element Tag 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, Linux.

See Also

Functions:

L_DicomDeleteTag, L_DicomResetTag, L_DicomDefaultTag, L_DicomDefaultTagExt, L_DicomLoadXmlTag

Topics:

Working with Tags

Example

This example inserts 2 new items in the Tag table

L_INT DicomInsertTagExample(L_VOID) 
{ 
   pDICOMTAG pTemp = NULL; 
   pTemp = L_DicomInsertTag(0x12345678, 0xFFFFFFFF, TEXT("New XXX Tag"), VR_US, 1, 1, 1); 
   if (pTemp == NULL) 
      return DICOM_ERROR_MEMORY; 
   pTemp = L_DicomInsertTag(0x87654321, 0xFFFFFFFF, TEXT("New YYY Tag"), VR_LO, 1, 1, 1); 
   if (pTemp == NULL) 
      return DICOM_ERROR_MEMORY; 
   return DICOM_SUCCESS; 
} 

Help Version 19.0.2017.10.18
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS DICOM C API Help