L_DicomExistsElement

#include "Ltdic.h"

L_LTDIC_API L_BOOL L_DicomExistsElement(hDS, pElement)

Determines whether the pointer to the structure is valid.

Parameters

HDICOMDS hDS

A DICOM handle.

pDICOMELEMENT pElement

Pointer to a DICOMELEMENT structure.

Returns

Value Meaning
TRUE pElement is a valid pointer.
FALSE pElement is NULL.

Required DLLs and Libraries

Platforms

Win32, x64, Linux.

See Also

Functions

Topics

Example

This example checks if the pointer of an element

L_INT DicomExistsElementExample(L_VOID) 
{ 
   HDICOMDS      hDS; 
   pDICOMELEMENT pElement; 
 
   hDS = L_DicomCreateDS(MAKE_IMAGE_PATH(TEXT(""))); 
   L_DicomInitDS(hDS, CLASS_CT_IMAGE_STORAGE, 0); 
 
   pElement = L_DicomInsertElement(hDS, NULL, FALSE, TAG_INSTITUTION_CODE_SEQUENCE,  
                                   VR_SQ, TRUE, ELEMENT_INDEX_MAX); 
   if (pElement == NULL) 
   { 
      L_DicomFreeDS(hDS); 
      return DICOM_ERROR_MEMORY; 
   } 
 
   if (L_DicomExistsElement(hDS, pElement) == FALSE) 
      MessageBox(NULL, TEXT("The element does not exist in Data Set"), TEXT("Notice"), MB_OK); 
 
   L_DicomFreeDS(hDS); 
   return DICOM_SUCCESS; 
} 

Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS DICOM C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.