本文整理汇总了C++中ossimRefPtr::get方法的典型用法代码示例。如果您正苦于以下问题:C++ ossimRefPtr::get方法的具体用法?C++ ossimRefPtr::get怎么用?C++ ossimRefPtr::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ossimRefPtr
的用法示例。
在下文中一共展示了ossimRefPtr::get方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getMetadata
void ossimPlanetCacheTextureLayer::getMetadata(ossimRefPtr<ossimXmlNode> metadata)const
{
if(m_textureLayer.valid())
{
m_textureLayer->getMetadata(metadata.get());
}
}
示例2: addChildNode
void ossimXmlNode::addChildNode(ossimRefPtr<ossimXmlNode> node)
{
if(node->theParentNode)
{
node->theParentNode->removeChild(node);
}
node->theParentNode = this;
theChildNodes.push_back(node.get());
}
示例3: evt
void oms::SingleImageChain::setImageViewTransform(ossimRefPtr<ossimImageViewTransform> imageViewTransform)
{
theViewCutter->setEnableFlag(false);
theViewImageCutter->setEnableFlag(false);
theRenderer->setImageViewTransform(imageViewTransform.get());
theRenderer->setEnableFlag(true);
ossimRefreshEvent evt(theRenderer);
theRenderer->propagateEventToOutputs(evt);
}
示例4: loadXml
bool ossimPlanetCacheTextureLayer::loadXml(ossimRefPtr<ossimXmlNode> node)
{
if(m_textureLayer.valid())
{
return m_textureLayer->loadXml(node.get());
}
return false;
}
示例5: setProperty
void ossimImageGaussianFilter::setProperty(ossimRefPtr<ossimProperty> property)
{
if(!property) return;
if (property->getName() == PROPERTYNAME_GAUSSSTD) {
ossimNumericProperty* sProperty = PTR_CAST(ossimNumericProperty,
property.get());
if(sProperty)
{
setGaussStd(sProperty->asFloat64());
}
} else if (property->getName() == PROPERTYNAME_STRICTNODATA) {
ossimBooleanProperty* booleanProperty = PTR_CAST(ossimBooleanProperty,
property.get());
if(booleanProperty)
{
setStrictNoData(booleanProperty->getBoolean());
}
} else {
ossimImageSourceFilter::setProperty(property);
}
}
示例6: setProperty
void DataManagerProperty::setProperty(ossimRefPtr<ossimProperty> property)
{
m_property = property.get();
if(m_property.valid())
{
setEditable(!m_property->isReadOnly());
}
if(column() != 1)
{
setEditable(false);
}
}
示例7: setImage
void ossimMemoryImageSource::setImage(ossimRefPtr<ossimImageData> image)
{
m_image = image.get();
if(m_image.valid())
{
m_boundingRect = m_image->getImageRectangle();
}
else
{
m_boundingRect.makeNan();
}
m_result = 0;
}
示例8: setProperty
void ossimCFARFilter::setProperty(ossimRefPtr<ossimProperty> property)
{
if(!property) return;
ossimString name = property->getName();
if(name == "threshold")
{
theThreshold = property->valueToString().toDouble();
}
else if(name == "Kernel")
{
ossimMatrixProperty* matrixProperty = PTR_CAST(ossimMatrixProperty,
property.get());
if(matrixProperty)
{
for(ossim_int32 r = 0; r < 5; r++)
{
for(ossim_int32 c = 0; c < 5; c++)
{
theKernel[r][c] = (*matrixProperty)(r,c);
}
}
/*
theKernel[0][0] = (*matrixProperty)(0,0);
theKernel[1][0] = (*matrixProperty)(1,0);
theKernel[2][0] = (*matrixProperty)(2,0);
theKernel[0][1] = (*matrixProperty)(0,1);
theKernel[1][1] = (*matrixProperty)(1,1);
theKernel[2][1] = (*matrixProperty)(2,1);
theKernel[0][2] = (*matrixProperty)(0,2);
theKernel[1][2] = (*matrixProperty)(1,2);
theKernel[2][2] = (*matrixProperty)(2,2);
*/
}
else
{
ossimImageSourceFilter::setProperty(property);
}
}
else
{
ossimImageSourceFilter::setProperty(property);
}
}
示例9: addAttribute
void ossimXmlNode::addAttribute(ossimRefPtr<ossimXmlAttribute> attribute)
{
theAttributes.push_back(attribute.get());
}
示例10: createHistogram
// Create histogram for entry:
void ossimImageUtil::createHistogram(ossimRefPtr<ossimImageHandler>& ih,
ossim_uint32 entry,
bool useEntryIndex)
{
static const char M[] = "ossimImageUtil::createHistogram #2";
if(traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\n";
}
if ( ih.valid() )
{
if (useEntryIndex)
{
// Set entry before deriving file name.
ih->setCurrentEntry(entry);
ossimNotify(ossimNotifyLevel_NOTICE) << "entry number: "<< entry << std::endl;
}
ossimFilename outputFile =
ih->getFilenameWithThisExtension(ossimString(".his"), useEntryIndex);
// Only build if needed:
if ( (outputFile.exists() == false) || rebuildHistogram() )
{
ossimNotify(ossimNotifyLevel_NOTICE)
<< "Computing histogram for file: " << ih->getFilename() << std::endl;
// Check handler to see if it's filtering bands.
std::vector<ossim_uint32> originalBandList(0);
if ( ih->isBandSelector() )
{
// Capture for finalize method.
ih->getOutputBandList( originalBandList );
// Set output list to input.
ih->setOutputToInputBandList();
}
ossimRefPtr<ossimImageHistogramSource> histoSource = new ossimImageHistogramSource;
ossimRefPtr<ossimHistogramWriter> writer = new ossimHistogramWriter;
histoSource->setMaxNumberOfRLevels(1); // Currently hard coded...
#if 0 /* TODO tmp drb */
if( !ossim::isnan(histoMin) )
{
histoSource->setMinValueOverride(histoMin);
}
if( !ossim::isnan(histoMax) )
{
histoSource->setMaxValueOverride(histoMax);
}
if(histoBins > 0)
{
histoSource->setNumberOfBinsOverride(histoBins);
}
#endif
if(traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG)
<< "Histogram mode: " << getHistogramMode() << "\n";
}
// Connect histogram source to image handler.
histoSource->setComputationMode( getHistogramMode() );
histoSource->connectMyInputTo(0, ih.get() );
histoSource->enableSource();
// Connect writer to histogram source.
writer->connectMyInputTo(0, histoSource.get());
writer->setFilename(outputFile);
theStdOutProgress.setFlushStreamFlag(true);
writer->addListener(&theStdOutProgress);
// Compute...
writer->execute();
writer=0;
// Reset the band list.
if ( ih->isBandSelector() && originalBandList.size() )
{
ih->setOutputBandList( originalBandList );
}
} // Matches: if ( (outputFile.exists() == false) || rebuildHistogram() )
} // Matches: if ( ih.valid() )
if(traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG) << M << " exited...\n";
}
} // End: ossimImageUtil::createHistogram #2
示例11: createOverview
// Create overview for entry:
void ossimImageUtil::createOverview(ossimRefPtr<ossimImageHandler>& ih,
ossimRefPtr<ossimOverviewBuilderBase>& ob,
ossim_uint32 entry,
bool useEntryIndex,
bool& consumedHistogramOptions)
{
static const char M[] = "ossimImageUtil::createOverview #2";
if(traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\n";
}
if ( ih.valid() && ob.valid() )
{
if (useEntryIndex)
{
// Set entry before deriving file name.
ih->setCurrentEntry(entry);
ossimNotify(ossimNotifyLevel_NOTICE) << "entry number: "<< entry << std::endl;
}
ossimFilename outputFile =
ih->getFilenameWithThisExtension(ossimString(".ovr"), useEntryIndex);
if ( rebuildOverviews() )
{
ih->closeOverview();
if ( outputFile.exists() )
{
outputFile.remove();
}
}
if ( getInternalOverviewsFlag() )
{
if ( ih->getClassName() == "ossimTiffTileSource")
{
//---
// INTERNAL_OVERVIEWS_FLAG_KW is set to true:
// Tiff reader can handle internal overviews. Set the output file to
// input file. Do it after the above remove so that if there were
// external overviews they will get removed.
//---
outputFile = ih->getFilename();
}
else
{
ossimNotify(ossimNotifyLevel_NOTICE)
<< "Internal overviews not supported for reader type: "
<<ih->getClassName()
<< "\nIgnoring option..."
<< endl;
}
}
if ( hasRequiredOverview( ih, ob ) == false )
{
//---
// Set create histogram code...
//
// Notes:
// 1) Must put this logic after any removal of external overview file.
//
// 2) Base file could have built in overviews, e.g. jp2 files. So the sequensor could
// start at R6 even if there is no external overview file.
//
// 3) If user want the histogram from R0 the overview builder can do as long as
// ossimImageHandler::getNumberOfDecimationLevels returns 1. If we are starting
// overview building at R6 then we must do the create histogram in a separate path.
//---
ossimHistogramMode histoMode = OSSIM_HISTO_MODE_UNKNOWN;
if ( createHistogram() ||
( createHistogramR0() && ( ih->getNumberOfDecimationLevels() == 1 ) ) )
{
histoMode = OSSIM_HISTO_MODE_NORMAL;
}
else if ( createHistogramFast() )
{
histoMode = OSSIM_HISTO_MODE_FAST;
}
if(traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG) << "Histogram mode: " << histoMode << "\n";
}
if ( histoMode != OSSIM_HISTO_MODE_UNKNOWN )
{
consumedHistogramOptions = true;
ob->setHistogramMode(histoMode);
ossimNotify(ossimNotifyLevel_NOTICE)
<< "Creating overviews with histogram for file: " << ih->getFilename() << std::endl;
}
else
{
if ( histoMode != OSSIM_HISTO_MODE_UNKNOWN )
{
consumedHistogramOptions = false;
//.........这里部分代码省略.........
示例12: setProperty
void ossimImageFileWriter::setProperty(ossimRefPtr<ossimProperty> property)
{
if(!property) return;
if(property->getName() == ossimKeywordNames::FILENAME_KW)
{
theFilename = property->valueToString();
}
else if (property->getName() == "create_envi_hdr")
{
theWriteEnviHeaderFlag = property->valueToString().toBool();
}
else if (property->getName() == "create_ers_hdr")
{
theWriteErsHeaderFlag = property->valueToString().toBool();
}
else if (property->getName() ==
ossimKeywordNames::CREATE_EXTERNAL_GEOMETRY_KW)
{
theWriteExternalGeometryFlag = property->valueToString().toBool();
}
else if (property->getName() == "create_fgdc")
{
theWriteFgdcFlag = property->valueToString().toBool();
}
else if (property->getName() == "create_jpeg_world_file")
{
theWriteJpegWorldFileFlag = property->valueToString().toBool();
}
else if (property->getName() == "create_readme")
{
theWriteReadmeFlag = property->valueToString().toBool();
}
else if (property->getName() == "create_tiff_world_file")
{
theWriteTiffWorldFileFlag = property->valueToString().toBool();
}
else if (property->getName() == "create_world_file")
{
theWriteWorldFileFlag = property->valueToString().toBool();
}
else if (property->getName() == ossimKeywordNames::CREATE_IMAGE_KW)
{
theWriteImageFlag = property->valueToString().toBool();
}
else if (property->getName() == ossimKeywordNames::CREATE_OVERVIEW_KW)
{
theWriteOverviewFlag = property->valueToString().toBool();
}
else if (property->getName() == ossimKeywordNames::CREATE_HISTOGRAM_KW)
{
theWriteHistogramFlag = property->valueToString().toBool();
}
else if (property->getName() == SCALE_TO_EIGHT_BIT_KW)
{
theScaleToEightBitFlag = property->valueToString().toBool();
}
else if(property->getName() == AUTO_CREATE_DIRECTORY_KW)
{
theAutoCreateDirectoryFlag = property->valueToString().toBool();
}
else if (property->getName() == "linear_units")
{
theLinearUnits = (ossimUnitType)
(ossimUnitTypeLut::instance()->
getEntryNumber(property->valueToString()));
}
else if(property->getName() == ossimKeywordNames::IMAGE_TYPE_KW)
{
setOutputImageType(property->valueToString());
}
else if(property->getName() == ossimKeywordNames::PIXEL_TYPE_KW)
{
ossimStringProperty* stringProperty = PTR_CAST(ossimStringProperty,
property.get());
if (stringProperty)
{
ossimString s;
stringProperty->valueToString(s);
setPixelType(s);
}
}
else
{
ossimImageWriter::setProperty(property);
}
}