LDicomDS::GetModalityLUTAttributes

#include "ltdic.h"

L_UINT16 LDicomDS::GetModalityLUTAttributes(pModalityLUTAttributes, uStructSize, uFlags)

pDICOMMLUTATTRIBS pModalityLUTAttributes;

/* pointer to a structure */

L_UINTuStructSize;

/* size of a structure */

L_UINT uFlags;

/* reserved for future use */

Retrieves the attributes that describe the Modality LUT.

Parameter

Description

pModalityLUTAttributes

Pointer to a structure to be updated with the Modality LUT attributes.

uStructSize

Size of the DICOMMLUTATTRIBS structure. Pass sizeof(DICOMMLUTATTRIBS).

uFlags

Reserved for future use. Pass 0.

Returns

0

The function was successful.

> 0

An error occurred. Refer to Return Codes.

Comments

This function will retrieve the attributes of the "Modality LUT Module" and store their values in the structure pointed to by pModalityLUTAttributes.

pModalityLUTAttributes->uStructSize will be set to the value of the parameter uStructSize.

If the function doesnt find any of the attributes of the "Modality LUT Module" it will set both pModalityLUTAttributes->bIsModalityLUTSequence and

pModalityLUTAttributes->bIsRescaleSlopeIntercept to FALSE. In this case the rest of the members of the pModalityLUTAttributes structure are undefined.

If the function finds the "Rescale Intercept" (0028,1052) and "Rescale Slope" (0028,1053) elements, it will set pModalityLUTAttributes->bIsRescaleSlopeIntercept to TRUE and populate pModalityLUTAttributes->RescaleIntercept, pModalityLUTAttributes->RescaleSlope and pModalityLUTAttributes->szRescaleType with the values retrieved from the DICOM dataset.

If the function finds "Modality LUT Sequence" (0028,3000), it will set pModalityLUTAttributes->bIsModalityLUTSequence to TRUE and populate pModalityLUTAttributes->LUTDescriptor, pModalityLUTAttributes->pszLUTExplanation and pModalityLUTAttributes->szModalityLUTType with the values retrieved from the DICOM dataset.

It is prohibited by the DICOM standard for both "Rescale Intercept" and "Modality LUT Sequence" to exist in the same DICOM dataset. However if this function encounters such a dataset, it will ignore "Modality LUT Sequence" and assume that only "Rescale Intercept" exists.

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::GetModalityLUTData, LDicomDS::SetModalityLUT, LDicomDS::DeleteModalityLUT, Class Members

Topics:

LUT Encoding Overview

 

LUT Encoding: Modality LUT

Example

For an example, refer to LDicomDS::GetModalityLUTData.