L_DicomConformanceDS

#include "Ltdic.h"

L_LTDIC_API L_BOOL L_DicomConformanceDS(hDS, pfnCallback, pUserData)

HDICOMDS hDS;

a DICOM handle

CONFORMANCECALLBACK pfnCallback;

pointer to a callback function

L_VOID * pUserData;

pointer to additional parameters

Verifies the comformance of the Data Set.

Parameter

Description

hDS

A DICOM handle.

pfnCallback

Optional callback function. If you do not provide a callback function, use NULL as the value of this parameter. If you do provide a callback function, use the function pointer as the value of this parameter. The callback function must adhere to the function prototype described in CONFORMANCECALLBACK Function.

pUserData

Void pointer that you can use to pass one or more additional parameters that the callback function needs.

 

To use this feature, assign a value to a variable or create a structure that contains as many fields as you need. Then, in this parameter, pass the address of the variable or structure, casting it to L_VOID *. The callback function, which receives the address in its own pUserData parameter, can cast it to a pointer of the appropriate data type to access your variable or structure.

 

If the additional parameters are not needed, you can pass NULL in this parameter.

Returns

TRUE

The Data Set conforms.

FALSE

The Data Set does not conform.

Comments

This function is called to test the conformance of the Data Set to the DICOM standard. For each Data Element in the Data Set, this function calls the CONFORMANCECALLBACK function. If any consistency is found, nFlags should be set with the appropriate error and False returned from the callback function.

Information from the Value Representation Table, the Data Element Tag Table and the IOD Table is used when analyzing the Data Element for conformance.

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:

CONFORMANCECALLBACK

Topics:

Working with Data Sets

 

How to Disable the Automatic Loading of the default DICOM IOD Table

Example

This example displays all the elements that not respect the standard

L_BOOL EXT_CALLBACK fnCallback( 
pDICOMELEMENT pElement, 
L_UINT16 nFlags, 
L_VOID *pUserData) 
{ 
   UNREFERENCED_PARAMETER(nFlags); 
   HWND   hDlg; 
   L_TCHAR szText[30]; 
   hDlg = (HWND)pUserData; 
   wsprintf(szText, TEXT("%04X:%04X"), GETGROUP(pElement->nTag), GETELEMENT(pElement->nTag)); 
   SendMessage(hDlg, LB_ADDSTRING, (WPARAM)0, (LPARAM)(LPCTSTR)szText); 
   return TRUE; 
} 
L_LTDICTEX_API L_INT DicomConformanceDSExample(HWND hDlg) 
{ 
   HDICOMDS hDS; 
   hDS = L_DicomCreateDS(NULL); 
   L_DicomInitDS(hDS, CLASS_XA_BIPLANE_IMAGE_STORAGE_RETIRED, 0); 
   L_DicomConformanceDS(hDS, fnCallback, hDlg); 
   L_DicomFreeDS(hDS); 
   return DICOM_SUCCESS; 
} 

Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS DICOM C API Help
Click or drag to resize