本文整理汇总了C++中SpatialDataView::refresh方法的典型用法代码示例。如果您正苦于以下问题:C++ SpatialDataView::refresh方法的具体用法?C++ SpatialDataView::refresh怎么用?C++ SpatialDataView::refresh使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SpatialDataView
的用法示例。
在下文中一共展示了SpatialDataView::refresh方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: VERIFYRV
SpatialDataView* Nitf::NitfImporterShell::createView() const
{
SpatialDataView* pView = RasterElementImporterShell::createView();
VERIFYRV(pView != NULL, pView);
RasterElement* pRaster = getRasterElement();
VERIFYRV(pRaster != NULL, pView);
const DynamicObject* pMetadata = pRaster->getMetadata();
VERIFYRV(pMetadata != NULL, pView);
const string backgroundColorPath[] = { Nitf::NITF_METADATA, Nitf::FILE_HEADER,
Nitf::FileHeaderFieldNames::BACKGROUND_COLOR, END_METADATA_NAME };
const DataVariant& dvBackground = pMetadata->getAttributeByPath(backgroundColorPath);
if (dvBackground.isValid() == true)
{
ColorType ctBackground;
VERIFY(dvBackground.getValue(ctBackground) == true);
pView->setBackgroundColor(ctBackground);
pView->refresh();
}
return pView;
}
示例2: createView
//.........这里部分代码省略.........
{
bool bandCopied = true;
DimensionDescriptor newBand;
DimensionDescriptor oldBand = pOrigLayer->getDisplayedBand(*iter);
if (oldBand.isOriginalNumberValid() == true)
{
newBand = pDescriptor->getOriginalBand(oldBand.getOriginalNumber());
}
if (newBand.isValid() == false)
{
bandCopied = false;
newBand = pDescriptor->getBands().front();
}
// No need to explicitly set the RasterElement here since the new view only has one RasterElement.
pLayer->setDisplayedBand(*iter, newBand);
// Use the default stretch properties if the displayed band was removed from the view or
// if the non-primary raster element was displayed. Otherwise, copy the stretch properties.
if (bandCopied && pRaster == pOrigLayer->getDisplayedRasterElement(*iter))
{
// Set the stretch units first so that stretch values are interpreted correctly.
pLayer->setStretchUnits(*iter, pOrigLayer->getStretchUnits(*iter));
double lower;
double upper;
pOrigLayer->getStretchValues(*iter, lower, upper);
pLayer->setStretchValues(*iter, lower, upper);
}
}
pLayer->setCurrentStretchAsOriginalStretch();
pView->refresh();
}
}
}
}
// Create a GCP layer
if (pRaster->isGeoreferenced() == true)
{
const vector<DimensionDescriptor>& rows = mpChippingWidget->getChipRows();
const vector<DimensionDescriptor>& columns = mpChippingWidget->getChipColumns();
if ((rows.empty() == false) && (columns.empty() == false))
{
// Get the geocoordinates at the chip corners
VERIFYNRV(rows.front().isActiveNumberValid() == true);
VERIFYNRV(rows.back().isActiveNumberValid() == true);
VERIFYNRV(columns.front().isActiveNumberValid() == true);
VERIFYNRV(columns.back().isActiveNumberValid() == true);
unsigned int startRow = rows.front().getActiveNumber();
unsigned int endRow = rows.back().getActiveNumber();
unsigned int startCol = columns.front().getActiveNumber();
unsigned int endCol = columns.back().getActiveNumber();
GcpPoint ulPoint;
ulPoint.mPixel = LocationType(startCol, startRow);
ulPoint.mCoordinate = pRaster->convertPixelToGeocoord(ulPoint.mPixel);
GcpPoint urPoint;
urPoint.mPixel = LocationType(endCol, startRow);
urPoint.mCoordinate = pRaster->convertPixelToGeocoord(urPoint.mPixel);
GcpPoint llPoint;