Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.23
LEADTOOLS DICOM C DLL Help

L_DicomExistsElement

Show in webframe

#include "Ltdic.h"

L_LTDIC_API L_BOOL L_DicomExistsElement(hDS, pElement)

HDICOMDS hDS;

/* a DICOM handle */

pDICOMELEMENT pElement;

/* pointer to a DICOMELEMENT structure */

Determines whether the pointer to the structure is valid.

Parameter

Description

hDS

A DICOM handle.

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

Platforms

Win32, x64, Linux.

See Also

Functions:

L_DicomGetChildElement, L_DicomGetParentElement, L_DicomGetRootElement, L_DicomGetFirstElement, L_DicomGetLastElement, L_DicomGetPrevElement, L_DicomGetNextElement, L_DicomFindFirstElement, L_DicomFindLastElement, L_DicomFindPrevElement, L_DicomFindPrevElement

Topics:

Working with Data Sets

Example

This example checks if the pointer of an element

#define MAKE_IMAGE_PATH(pFileName) TEXT("C:\\Users\\Public\\Documents\\LEADTOOLS Images\\")pFileName


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;
}
Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.