#include "ltdic.h"
L_LTDIC_API L_UINT16 L_DicomGetModalityLUTAttributes(hDS, uFrameIndex, pModalityLUTAttributes, uStructSize, uFlags)
HDICOMDS hDS; |
a DICOM handle |
L_UINT32 uFrameIndex; |
index value |
pDICOMMLUTATTRIBS pModalityLUTAttributes; |
pointer to a Modality LUT attributes structure |
L_UINT uStructSize; |
the size of the DICOMMLUTATTRIBS structure |
L_UINT uFlags; |
reserved for future use |
Retrieves the attributes that describe the Modality LUT.
Parameter |
Description |
hDS |
A DICOM handle. |
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. |
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. |
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 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.
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.
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
For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application |
Win32, x64, Linux.
Functions: |
L_DicomGetModalityLUTData, L_DicomSetModalityLUT, L_DicomDeleteModalityLUT, L_ApplyModalityLUT, L_ApplyLinearModalityLUT |
Topics: |
|
|
For an example, refer to L_DicomGetModalityLUTData.
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET