Getting palette color LUT data and attributes Example for C++ 6.0 and later
// This example will retrieve the data under
// "Red Palette Color Lookup Table Data"(0028,1201)
// element and if the data is segmented it will get the data under
// "Segmented Red Palette Color Lookup Table Data" (0028,1221) and decode it
// Object that will hold Palette Color LUT attributes
ILPaletteColorLUTAttributesPtr pPaletteColorLUTAttributes = NULL;
short iRet;
// Get "Palette Color Lookup Table" attributes
iRet = m_pLEADDicomDS->GetPaletteColorLUTAttributes (0);
if(iRet != 0)
{
AfxMessageBox("error");
return;
}
pPaletteColorLUTAttributes = m_pLEADDicomDS->GetPaletteColorLUTAttributes ();
// Retrieve "Red Palette Color Lookup Table Data"
// This function will automatically decode the LUT data
// if it was segmented
VARIANT vData;
VariantInit(&vData);
iRet = m_pLEADDicomDS->GetPaletteColorLUTData (&vData, DICOM_PALETTE_COLOR_LUT_TYPE_RED, 0);
//do something with vData
//...
return;