L_LTDIC_API L_UINT16 L_DicomGetModalityLUTAttributes(hDS, uFrameIndex, pModalityLUTAttributes, uStructSize, uFlags)
Retrieves the attributes that describe the Modality LUT.
A DICOM handle.
A zero-based index that identifies the frame number in the dataset. If the dataset does not support Multi-frames, this parameter is ignored.
Pointer to a structure to be updated with the Modality LUT attributes.
Size of the DICOMMLUTATTRIBS structure. Pass sizeof(DICOMMLUTATTRIBS).
Reserved for future use. Pass 0.
|DICOM_SUCCESS||The function was successful.|
|>0||An error occurred. Refer to Return Codes.|
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 method looks in the Shared Functional Groups Sequence item and the Per-frame Functional Groups Sequence items.
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
Win32, x64, Linux.
For an example, refer to L_DicomGetModalityLUTData.
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries