L_DicomSetPreamble

Summary

Sets the contents of the preamble.

Syntax

#include "Ltdic.h"

L_LTDIC_API L_VOID L_DicomSetPreamble(hDS, pPreamble, nLength)

Parameters

HDICOMDS hDS

A DICOM handle.

L_UCHAR * pPreamble

Character string that contains the preamble to set.

L_UINT16 nLength

Length of pPreamble. The maximum length is DS_PREAMBLE_LENGTH, which is defined as 128.

Returns

None.

Comments

The standard length of the Preamble is 128 bytes. You may use the constant DS_PREAMBLE_LENGTH, which is defined as 128, when setting nLength.

If the value specified in nLength is > DS_PREAMBLE_LENGTH, then the Preamble will be set with the first 128 bytes of pPreamble. If nLength is <= DS_PREAMBLE_LENGTH, then the Preamble will be set with the entire contents of pPreamble.

To retrieve the contents of the Preamble, call L_DicomGetPreamble.

Required DLLs and Libraries

Platforms

Win32, x64, Linux.

See Also

Functions

Topics

Example

This example sets the preamble

L_INT DicomSetPreambleExample(L_VOID) 
{ 
   HDICOMDS hDS; 
   L_UCHAR   szPreamble[DS_PREAMBLE_LENGTH]; 
 
   hDS = L_DicomCreateDS(NULL); 
 
   memset(szPreamble, 0xFF, sizeof(szPreamble)); 
   L_DicomSetPreamble(hDS, szPreamble, sizeof(szPreamble)); 
   L_DicomFreeDS(hDS); 
   return DICOM_SUCCESS; 
} 

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

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