本文整理汇总了C++中FactoryResource::getTitle方法的典型用法代码示例。如果您正苦于以下问题:C++ FactoryResource::getTitle方法的具体用法?C++ FactoryResource::getTitle怎么用?C++ FactoryResource::getTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FactoryResource
的用法示例。
在下文中一共展示了FactoryResource::getTitle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createReturnValue
bool BandMath::createReturnValue(string partialResultsName)
{
// Set the short and long result names
FactoryResource<Filename> pFilename;
string shortResultsName;
string longResultsName;
if (pFilename.get() != NULL)
{
pFilename->setFullPathAndName(mpCube->getFilename());
shortResultsName = pFilename->getTitle() + " = " + partialResultsName;
longResultsName = pFilename->getPath() + "/" + pFilename->getTitle() + " = " + partialResultsName;
}
mResultsName = longResultsName;
const RasterDataDescriptor* pOrigDescriptor = dynamic_cast<RasterDataDescriptor*>(mpCube->getDataDescriptor());
const vector<DimensionDescriptor>& origRows = pOrigDescriptor->getRows();
const vector<DimensionDescriptor>& origColumns = pOrigDescriptor->getColumns();
mpResultData = NULL;
unsigned int bandCount = mCubeBands;
if (mbCubeMath == false)
{
bandCount = 1;
}
RasterElement* pParent = NULL;
if (mbAsLayerOnExistingView)
{
pParent = mpCube;
}
RasterElement* pRaster = RasterUtilities::createRasterElement(mResultsName, origRows.size(),
origColumns.size(), bandCount, FLT4BYTES, BIP, pOrigDescriptor->getProcessingLocation() == IN_MEMORY, pParent);
if (pRaster == NULL)
{
mstrProgressString = "Error creating result raster element";
meGabbiness = ERRORS;
displayErrorMessage();
mbError = true;
return false;
}
if (!mbAsLayerOnExistingView)
{
// need to copy classification since parent was NULL in call to createRasterElement
pRaster->copyClassification(mpCube);
// make copies of existing GcpLists only if going into a new view
vector<DataElement*> gcps = mpDataModel->getElements(mpCube, "GcpList");
if (!gcps.empty())
{
vector<DataElement*>::iterator iter;
for (iter = gcps.begin(); iter != gcps.end(); ++iter)
{
GcpList* theGcp = dynamic_cast<GcpList*>(*iter);
theGcp->copy(theGcp->getName(), pRaster);
}
}
}
mpResultData = pRaster;
RasterDataDescriptor* pDescriptor = dynamic_cast<RasterDataDescriptor*>
(mpResultData->getDataDescriptor());
if (pDescriptor != NULL)
{
// Rows
vector<DimensionDescriptor> rows = pDescriptor->getRows();
for (unsigned int i = 0; i < origRows.size(); ++i)
{
// Original number
DimensionDescriptor origRow = origRows[i];
if (origRow.isOriginalNumberValid() == true)
{
rows[i].setOriginalNumber(origRow.getOriginalNumber());
}
}
pDescriptor->setRows(rows);
// Columns
vector<DimensionDescriptor> columns = pDescriptor->getColumns();
for (unsigned int i = 0; i < origColumns.size(); ++i)
{
// Original number
DimensionDescriptor origColumn = origColumns[i];
if (origColumn.isOriginalNumberValid() == true)
{
columns[i].setOriginalNumber(origColumn.getOriginalNumber());
}
}
pDescriptor->setColumns(columns);
}
return true;
}