LDicomDS::ExistsElement

#include "Ltdic.h"

L_BOOL LDicomDS::ExistsElement(pElement)

pDICOMELEMENT pElement;

/* pointer to a DICOMELEMENT structure */

Determines whether the pointer to the structure is valid.

Parameter

Description

pElement

Pointer to a DICOMELEMENT structure.

Returns

TRUE

pElement is a valid pointer.

FALSE

pElement is NULL.

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

See Also

Functions:

LDicomDS::GetChildElement, LDicomDS::GetParentElement, LDicomDS::GetRootElement, LDicomDS::GetFirstElement, LDicomDS::GetLastElement, LDicomDS::GetPrevElement, LDicomDS::GetNextElement, LDicomDS::FindFirstElement, LDicomDS::FindLastElement, LDicomDS::FindPrevElement, LDicomDS::FindPrevElement

Topics:

Working with Data Sets

Example

/* This example checks if the pointer of an element */

L_VOID Test()
{
   LDicomDS *pDS;
   pDICOMELEMENT pElement;

   pDS = new LDicomDS(NULL);

   
pDS->InitDS( CLASS_CT_IMAGE_STORAGE, 0); 

   pElement = pDS->InsertElement(NULL, FALSE, TAG_INSTITUTION_CODE_SEQUENCE, 
                                 VR_SQ, TRUE, ELEMENT_INDEX_MAX);

   if (pDS->ExistsElement(pElement) == FALSE)
   {
      MessageBox(NULL, "The element does not exist in Data Set", "Notice", MB_OK);
   }

   delete pDS;
}