Getting modality LUT data and attributes Example for C++ 6.0 and later
// This example will retrieve the LUT Data (0028,3006)
// under the Modality LUT Sequence (0028,3000)
short iRet;
// Object that will hold modality LUT attributes
ILModalityLUTAttributesPtr pModalityLUTAttributes = NULL;
// Get modality LUT attributes
iRet = m_pLEADDicomDS->GetModalityLUTAttributes(0);
if(iRet != 0)
{
AfxMessageBox("error");
return;
}
pModalityLUTAttributes = m_pLEADDicomDS->GetModalityLUTAttributes();
// If there is no modality LUT sequence then there is no data !
if(!pModalityLUTAttributes->IsModalityLUTSequence)
{
AfxMessageBox("No LUT");
return;
}
VARIANT vData;
VariantInit(&vData);
// Retrieve the LUT Data (0028,3006)
m_pLEADDicomDS->GetModalityLUTData (&vData, 0);
// Do something with the data