LDicomDS::GetModalityLUTAttributes

Summary

Retrieves the attributes that describe the Modality LUT.

Syntax

#include "ltdic.h"

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

Parameters

L_UINT32 uFrameIndex

A zero-based index that identifies the frame number in the dataset.  If the dataset does not support Multi-frames, this parameter is ignored.

pDICOMMLUTATTRIBS pModalityLUTAttributes

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

L_UINT uStructSize

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

L_UINT uFlags

Reserved for future use. Pass 0.

Returns

Value Meaning
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 does not 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.

The Multi-frame Functional Groups module may have a Shared Functional Groups Sequence item, and/or a Per-frame Functional Groups Sequence item. Either of these items may have a Pixel Value Transformation Sequence (0028,9145) item. If the following elements are not found at the top level in the dataset, this function looks in the Shared Functional Groups Sequence item and the Per-frame Functional Groups Sequence items.

Tag Name
(0028,1052) Rescale Intercept
(0028,1053) Rescale Slope
(0028,1054) Rescale Type

For a detailed discussion on Multi-frame Functional Groups and how the DICOM_SET_IMAGE_MFG flags are used, see the topic Multi-frame Functional Groups.

Required DLLs and Libraries

Platforms

Win32, x64

See Also

Functions

Topics

Example

For an example, refer to LDicomDS::GetModalityLUTData.

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

LEADTOOLS DICOM C++ Class Library Help

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