本文整理汇总了C++中ossimRefPtr::getLut方法的典型用法代码示例。如果您正苦于以下问题:C++ ossimRefPtr::getLut方法的具体用法?C++ ossimRefPtr::getLut怎么用?C++ ossimRefPtr::getLut使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ossimRefPtr
的用法示例。
在下文中一共展示了ossimRefPtr::getLut方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getBandInformation
ossimRefPtr<ossimNBandLutDataObject> ossimNitfImageHeader::createLut(
ossim_uint32 bandIdx)const
{
ossimRefPtr<ossimNBandLutDataObject> result;
if(bandIdx < (ossim_uint32)getNumberOfBands())
{
const ossimRefPtr<ossimNitfImageBand> band = getBandInformation(bandIdx);
if(band.valid())
{
ossim_uint32 bands = band->getNumberOfLuts();
if(bands > 0)
{
if(band->getLut(0).valid())
{
ossim_uint32 entries = band->getLut(0)->getNumberOfEntries();
result = new ossimNBandLutDataObject();
result->create(entries, band->getNumberOfLuts());
ossim_uint32 bIdx;
ossim_uint32 entryIdx;
for(bIdx = 0; bIdx < bands; ++bIdx)
{
const ossimRefPtr<ossimNitfImageLut> lut = band->getLut(bIdx);
if(lut.valid())
{
for(entryIdx = 0; entryIdx < entries; ++entryIdx)
{
(*result)[entryIdx][bIdx] = (ossimNBandLutDataObject::LUT_ENTRY_TYPE)(lut->getValue(entryIdx));
}
}
}
}
}
}
}
return result;
}
示例2: hasLut
bool ossimNitfImageHeader::hasLut() const
{
bool result = false;
const ossim_uint32 BANDS = static_cast<ossim_uint32>(getNumberOfBands());
for (ossim_uint32 band = 0; band < BANDS; ++band)
{
const ossimRefPtr<ossimNitfImageBand> imgBand = getBandInformation(band);
if(imgBand.valid())
{
ossim_uint32 luts = imgBand->getNumberOfLuts();
if(luts > 0)
{
if(imgBand->getLut(0).valid())
{
result = true;
break;
}
}
}
}
return result;
}