本文整理汇总了C++中FactoryResource::isEmpty方法的典型用法代码示例。如果您正苦于以下问题:C++ FactoryResource::isEmpty方法的具体用法?C++ FactoryResource::isEmpty怎么用?C++ FactoryResource::isEmpty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FactoryResource
的用法示例。
在下文中一共展示了FactoryResource::isEmpty方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: execute
//.........这里部分代码省略.........
progress.report(errorMsg, 0, ERRORS, true);
return false;
}
resampledTo = pElement->getName();
}
else if (waveFilename.empty() == false) // if no user provided raster, look for a wavelengths file
{
if (QFile::exists(QString::fromStdString(waveFilename)))
{
if (getWavelengthsFromFile(waveFilename, pWavelengths.get(), errorMsg) == false)
{
progress.report(errorMsg, 0, ERRORS, true);
return false;
}
}
else
{
errorMsg = "The wavelengths file \"" + waveFilename + "\" could not be found.";
progress.report(errorMsg, 0, ERRORS, true);
return false;
}
resampledTo = waveFilename;
}
else // if no wavelength source provided, look for raster in current active spatial data view
{
SpatialDataView* pView = dynamic_cast<SpatialDataView*>(pDesktop->getCurrentWorkspaceWindowView());
if (pView != NULL)
{
LayerList* pLayerList = pView->getLayerList();
if (pLayerList != NULL)
{
pElement = pLayerList->getPrimaryRasterElement();
pWavelengths->initializeFromDynamicObject(pElement->getMetadata(), false);
if (pWavelengths->isEmpty())
{
progress.report("No target wavelengths are available for resampling the signatures.", 0, ERRORS, true);
return false;
}
resampledTo = pElement->getName();
}
}
}
PlugInResource pPlugIn("Resampler");
Resampler* pResampler = dynamic_cast<Resampler*>(pPlugIn.get());
if (pResampler == NULL)
{
progress.report("The \"Resampler\" plug-in is not available so the signatures can not be resampled.",
0, ERRORS, true);
return false;
}
std::string dataName("Reflectance");
std::string wavelengthName("Wavelength");
// save user config settings - Resampler doesn't have interface to set them separately from user config
std::string configMethod = ResamplerOptions::getSettingResamplerMethod();
ResamplerOptions::setSettingResamplerMethod(resampleMethod);
double configDropout = ResamplerOptions::getSettingDropOutWindow();
ResamplerOptions::setSettingDropOutWindow(dropOutWindow);
double configFwhm = ResamplerOptions::getSettingFullWidthHalfMax();
ResamplerOptions::setSettingFullWidthHalfMax(fwhm);
std::vector<double> toWavelengths = pWavelengths->getCenterValues();
std::vector<double> toFwhm = pWavelengths->getFwhm();
if (toFwhm.size() != toWavelengths.size())
{