• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ ossimRefPtr类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中ossimRefPtr的典型用法代码示例。如果您正苦于以下问题:C++ ossimRefPtr类的具体用法?C++ ossimRefPtr怎么用?C++ ossimRefPtr使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了ossimRefPtr类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: getBoundingRect

void ossimTiledElevationDatabase::getBoundingRect(
   ossimRefPtr<ossimImageGeometry> geom, ossimGrect& boundingRect) const
{
   if ( geom.valid() )
   {
      std::vector<ossimGpt> corner(4);
      if ( geom->getCornerGpts(corner[0], corner[1], corner[2], corner[3]) )
      {
         ossimGpt ulGpt(corner[0]);
         ossimGpt lrGpt(corner[0]);
         for ( ossim_uint32 i = 1; i < 4; ++i )
         {
            if ( corner[i].lon < ulGpt.lon ) ulGpt.lon = corner[i].lon;
            if ( corner[i].lat > ulGpt.lat ) ulGpt.lat = corner[i].lat;
            if ( corner[i].lon > lrGpt.lon ) lrGpt.lon = corner[i].lon;
            if ( corner[i].lat < lrGpt.lat ) lrGpt.lat = corner[i].lat;
         }
         boundingRect = ossimGrect(ulGpt, lrGpt);
      }
      else
      {
         boundingRect.makeNan();
      }
   }
}
开发者ID:loongfee,项目名称:ossim-svn,代码行数:25,代码来源:ossimTiledElevationDatabase.cpp


示例2: computeSourceValue

//*****************************************************************************
//  METHOD: ossimHsvGridRemapEngine::computeSourceValue
//  
//*****************************************************************************
void ossimHsvGridRemapEngine::computeSourceValue(
   ossimRefPtr<ossimImageData>& source, void* result)
{
   static const char MODULE[]="ossimHsvGridRemapEngine::computeSourceValue";
   if (traceExec())  CLOG << "entering..." << endl;

   //***
   // This engine defines "value" as the HSV vector corresponding to the mean
   // RGB pixel value of the source data:
   //***
   ossimRgbVector rgb_vector;
   rgb_vector.setR((unsigned char) source->computeAverageBandValue(0));
   rgb_vector.setG((unsigned char) source->computeAverageBandValue(1));
   rgb_vector.setB((unsigned char) source->computeAverageBandValue(2));

   //***
   // Assign the HSV components to the result vector:
   //***
   ossimHsvVector hsv_vector (rgb_vector);
   ((double*)result)[0] = (double) hsv_vector.getH();
   ((double*)result)[1] = (double) hsv_vector.getS();
   ((double*)result)[2] = (double) hsv_vector.getV();
   
   if (traceExec())  CLOG << "returning..." << endl;
   return;
}
开发者ID:LucHermitte,项目名称:ossim,代码行数:30,代码来源:ossimHsvGridRemapEngine.cpp


示例3: createHistogram

void ossimImageUtil::createHistogram(ossimRefPtr<ossimImageHandler>& ih)
{
   static const char M[] = "ossimImageUtil::createHistogram #1";
   if(traceDebug())
   {
      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\n";
   }
   
   if ( ih.valid() )
   {
      // Get the entry list:
      std::vector<ossim_uint32> entryList;
      ih->getEntryList(entryList);
      
      bool useEntryIndex = false;
      if ( entryList.size() )
      {
         if ( (entryList.size() > 1) || (entryList[0] != 0) ) useEntryIndex = true;
      }

      for(ossim_uint32 idx = 0; idx < entryList.size(); ++idx)
      {
         createHistogram(ih, entryList[idx], useEntryIndex);
      }
   }

   if(traceDebug())
   {
      ossimNotify(ossimNotifyLevel_DEBUG) << M << " exited...\n";
   }
}
开发者ID:Dukeke,项目名称:ossim,代码行数:31,代码来源:ossimImageUtil.cpp


示例4: setProperty

void ossimImageToPlaneNormalFilter::setProperty(ossimRefPtr<ossimProperty> property)
{
   ossimString name = property->getName();
   if(name == "smoothnessFactor")
   {
      theSmoothnessFactor = property->valueToString().toDouble();
      initialize();
   }
   else if(name == "xscale")
   {
      theXScale = property->valueToString().toDouble();
      initialize();
   }
   else if(name == "yscale")
   {
      theYScale = property->valueToString().toDouble();
      initialize();
   }
   else if(name == "autoTrackScaleFlag")
   {
      theTrackScaleFlag = property->valueToString().toDouble();
      initialize();
   }
   else
   {
      ossimImageSourceFilter::setProperty(property);
   }
}
开发者ID:loongfee,项目名称:ossim-svn,代码行数:28,代码来源:ossimImageToPlaneNormalFilter.cpp


示例5: setProperty

void ossimLasReader::setProperty(ossimRefPtr<ossimProperty> property)
{
   if ( property.valid() )
   {
      if ( property->getName() == SCALE_KW )
      {
         ossimString s;
         property->valueToString(s);
         ossim_float64 d = s.toFloat64();
         if ( ossim::isnan(d) == false )
         {
            setScale( d );
         }
      }
      else if ( property->getName() == SCAN_KW )
      {
         ossimString s;
         property->valueToString(s);
         m_scan = s.toBool();
      }
      else
      {
         ossimImageHandler::setProperty(property);
      }
   }
}
开发者ID:LucHermitte,项目名称:ossim,代码行数:26,代码来源:ossimLasReader.cpp


示例6: ossimNotify

// Create overview for image:
void ossimImageUtil::createOverview(ossimRefPtr<ossimImageHandler>& ih,
                                    bool& consumedHistogramOptions,
                                    bool& /* consumedCmmOptions */)
{
   static const char M[] = "ossimImageUtil::createOverview #1";
   if(traceDebug())
   {
      ossimNotify(ossimNotifyLevel_DEBUG) << M << " entered...\n";
   }
    
   if ( ih.valid() )
   {
      // Get the entry list:
      std::vector<ossim_uint32> entryList;
      ih->getEntryList(entryList);
      
      bool useEntryIndex = false;
      if ( entryList.size() )
      {
         if ( (entryList.size() > 1) || (entryList[0] != 0) ) useEntryIndex = true;
      }

      // Create the overview builder:
      ossimString overviewType;
      getOverviewType( overviewType.string() );
      ossimRefPtr<ossimOverviewBuilderBase> ob =
         ossimOverviewBuilderFactoryRegistry::instance()->createBuilder(overviewType);
      if ( ob.valid() )
      {
         // Set up any overview builder options that don't involve histograms.
         ossimPropertyInterface* pi = dynamic_cast<ossimPropertyInterface*>( ob.get() );
         if ( pi ) setProps(pi);
         
         ossim_uint32 stopDimension = getOverviewStopDimension();
         if ( stopDimension ) ob->setOverviewStopDimension(stopDimension);

         ob->setScanForMinMax( scanForMinMax() );
         
         ob->setScanForMinMaxNull( scanForMinMaxNull() );
         
         for(ossim_uint32 idx = 0; idx < entryList.size(); ++idx)
         {
            createOverview(ih, ob, entryList[idx], useEntryIndex, consumedHistogramOptions);
         }
      }
      else
      {
        ossimNotify(ossimNotifyLevel_WARN)
           << "ERROR:\nCould not create builder for:  "<< overviewType << std::endl;
        outputOverviewWriterTypes();
      }
   }

   if(traceDebug())
   {
      ossimNotify(ossimNotifyLevel_DEBUG) << M << " exited...\n";
   }
}
开发者ID:Dukeke,项目名称:ossim,代码行数:59,代码来源:ossimImageUtil.cpp


示例7: dbSort

//---
// For std::sort of ElevationDatabaseListType
// e.g.: std::sort( dbList.begin(), dbList.end(), dbSort );
//---
bool dbSort(ossimRefPtr<ossimElevationDatabase> a, ossimRefPtr<ossimElevationDatabase> b)
{
   bool result = false;
   if ( a.valid() && b.valid() )
   {
      result = ( a->getMeanSpacingMeters() < b->getMeanSpacingMeters() );
   }
   return result;
}
开发者ID:rb-rialto,项目名称:ossim,代码行数:13,代码来源:ossimElevManager.cpp


示例8: setProperty

void ossimEdgeFilter::setProperty(ossimRefPtr<ossimProperty> property)
{
   if(!property) return;
   
   if(property->getName() == PROP_EDGE_FILTER)
   {
      theFilterType = property->valueToString();
   }
}
开发者ID:loongfee,项目名称:ossim-svn,代码行数:9,代码来源:ossimEdgeFilter.cpp


示例9:

void ossimEdgeFilter::runLocalMax8Filter(T /* dummyVariable */,
                                         ossimRefPtr<ossimImageData> inputData)
{
   ossim_uint32 bandIdx = 0;
   ossim_uint32 numberOfBands = inputData->getNumberOfBands();
  
   ossim_uint32 x = 0;
   ossim_uint32 y = 0;
   ossim_uint32 width  = theTile->getWidth();
   ossim_uint32 height = theTile->getHeight();
   ossim_int32 rowIncrement  = inputData->getWidth();
   ossim_int32 rowIncrement2 = 2*inputData->getWidth(); 
         
   for(bandIdx = 0; bandIdx < numberOfBands; ++bandIdx)
   {
      //inputBuf has a 1 pixel edge compared to outputBuf
      T* inputBuf  = static_cast<T*>(inputData->getBuf(bandIdx));
      T* outputBuf = static_cast<T*>(theTile->getBuf(bandIdx));
      T np         = static_cast<T>(inputData->getNullPix(bandIdx)); //changed to input Null            

      if(inputBuf&&outputBuf)
      {
         //one pass: maybe faster if changed to two passes
         T* outB;
         T* inB;
         
      	outB = outputBuf;         
         inB  = inputBuf;         
         for(y = 0; y < height; ++y)
         {
            for(x = 0; x < width; ++x)
            {
               if (inB[1+rowIncrement] != np)
               {
                  *outB = max<T>(
                           max<T>(
                            max<T>(inB[0],inB[1]),
                            max<T>(inB[2],inB[rowIncrement])),
                           max<T>(
                            max<T>(inB[rowIncrement+2],inB[rowIncrement2]),
                            max<T>(inB[rowIncrement2+1],inB[rowIncrement2+2])
                            ));
               }
               else
               {
                  *outB = np;
               }
               ++outB;
               ++inB;
            }
            inB+=2; //go to next line, jump due to edge
         }       
      }      
   }
   theTile->validate();
}
开发者ID:loongfee,项目名称:ossim-svn,代码行数:56,代码来源:ossimEdgeFilter.cpp


示例10: getMultiBandHistogram

ossim_uint32 ossimMultiResLevelHistogram::getNumberOfBands(ossim_uint32 resLevel) const
{
   const ossimRefPtr<ossimMultiBandHistogram> h = getMultiBandHistogram(resLevel);
   if (h.valid())
   {
      return h->getNumberOfBands();
   }

   return 0;
}  
开发者ID:LucHermitte,项目名称:ossim,代码行数:10,代码来源:ossimMultiResLevelHistogram.cpp


示例11: setProperty

bool ossimOpjCompressor::setProperty(ossimRefPtr<ossimProperty> property)
{
   bool consumed = false;
   
   if ( property.valid() )
   {
      ossimString key = property->getName();

      if ( traceDebug() )
      {
         ossimNotify(ossimNotifyLevel_DEBUG)
            << "ossimOpjCompressor::setProperty DEBUG:"
            << "\nkey: " << key
            << " values: " << property->valueToString() << std::endl;
      }
      
      if (key == ossimKeywordNames::COMPRESSION_QUALITY_KW)
      {
         setQualityTypeString(property->valueToString());
         consumed = true;
      }
      else if ( (key == LEVELS_KW) || (key ==  "Clevels") )
      {
         m_levels = property->valueToString().toInt32();
         consumed = true;
      }
      else if( (key == REVERSIBLE_KW) || (key == "Creversible") )
      {
         setReversibleFlag(property->valueToString().toBool());
         consumed = true;
      }
      else if (key == ADD_ALPHA_CHANNEL_KW)
      {
         m_alpha = property->valueToString().toBool();
         consumed = true;
      }
      else if ( key == THREADS_KW)
      {
         m_threads = property->valueToString().toInt32();
         consumed = true;
      }
      else if ( (key == "Clayers") ||
                (key == "Cprecincts") )
      {
         // Generic options passed through kdu_params::parse_string.

         // Make in the form of "key=value" for kdu_params::parse_string.
         ossimString option = key;
         option += "=";
         option += property->valueToString();
         
         // Add to list.
         m_options.push_back(option);
         
         consumed = true;
      } 
   }

   return consumed;
}
开发者ID:geoware,项目名称:ossim-plugins,代码行数:60,代码来源:ossimOpjCompressor.cpp


示例12: setCurrentImageData

void ossimRgbImage::setCurrentImageData(ossimRefPtr<ossimImageData>& imageData)
{
   if(imageData.valid())
   {
      if((imageData->getScalarType() == OSSIM_UCHAR)&&
         (imageData->getDataObjectStatus()!=OSSIM_NULL))
      {
         theImageData = imageData;
         initialize();
      }
   }
}
开发者ID:LucHermitte,项目名称:ossim,代码行数:12,代码来源:ossimRgbImage.cpp


示例13: loadXml

void ossimPlanetQtLegendAnimationPathItem::loadXml(ossimRefPtr<ossimXmlNode> node,
                                             std::vector<ossimPlanetOperation*>& activityList)
{
   if(!node.valid()) return;
   ossimString tempValue;

   if(node->getChildTextValue(tempValue, "name"))
   {
      setText(0, tempValue.c_str());
   }
   if(node->getChildTextValue(tempValue, "path"))
   {   
      setAnimationPathFromString(tempValue);
   }  
}
开发者ID:loongfee,项目名称:ossim-svn,代码行数:15,代码来源:ossimPlanetQtLegendAnimationPathItem.cpp


示例14: isDirectoryBasedImage

// Private method:
bool ossimTiledElevationDatabase::isDirectoryBasedImage(ossimRefPtr<ossimImageHandler> ih)
{
   bool result = false;
   if ( ih.valid() )
   {
      // Get the image handler name.
      ossimString imageHandlerName = ih->getClassName();
      if ( (imageHandlerName == "ossimAdrgTileSource") ||
           (imageHandlerName == "ossimCibCadrgTileSource") )  
      {
         result = true;
      }
   }
   return result;
}
开发者ID:loongfee,项目名称:ossim-svn,代码行数:16,代码来源:ossimTiledElevationDatabase.cpp


示例15: getMetadata

void ossimPlanetCacheTextureLayer::getMetadata(ossimRefPtr<ossimXmlNode> metadata)const
{
  if(m_textureLayer.valid())
  {
    m_textureLayer->getMetadata(metadata.get());
  }
}
开发者ID:loongfee,项目名称:ossim-svn,代码行数:7,代码来源:ossimPlanetCacheTextureLayer.cpp


示例16: setProperty

void ossimCFARFilter::setProperty(ossimRefPtr<ossimProperty> property)

{

    if(!property) return;

    ossimString name = property->getName();



    if(name == "aperture_size")

    {


    }

    else

    {

        ossimImageSourceFilter::setProperty(property);

    }

}
开发者ID:sunleechina,项目名称:icode-mda,代码行数:26,代码来源:ossimCFARFilter.cpp


示例17: setProperty

void ossimPngReader::setProperty(ossimRefPtr<ossimProperty> property)
{
   if ( property.valid() )
   {
      if ( property->getName().string() == USE_ALPHA_KW )
      {
         ossimString s;
         property->valueToString(s);
         m_useAlphaChannelFlag = s.toBool();
      }
      else
      {
         ossimImageHandler::setProperty(property);
      }
   }
}
开发者ID:Dukeke,项目名称:ossim,代码行数:16,代码来源:ossimPngReader.cpp


示例18: remapFromNormalizedTable

void ossimTableRemapper::remapFromNormalizedTable(
   ossimRefPtr<ossimImageData>& inputTile)
{
   if (!theNormBuf) // First time...
   {
      theNormBuf = new ossim_float64[theTile->getSize()];
   }
   
   // Normalize and copy the source tile to a buffer.
   inputTile->copyTileToNormalizedBuffer(theNormBuf);

   const ossim_uint32 BANDS = theTile->getNumberOfBands();
   const ossim_uint32 PPB   = theTile->getSizePerBand(); // pixels per band

   //---
   // NOTE:
   // If (theTableBandCount == one) that means we only have one band; or,
   // the user wanted to remap all bands using the same table...
   //---
   const ossim_uint32 BAND_OFFSET = (theTableBandCount == 1) ? 0 : PPB;

   // remap table (rt)
   ossim_float64* rt = reinterpret_cast<ossim_float64*>(&theTable.front()); 

   ossim_float64* buf = theNormBuf;
   ossim_float64 p = 0.0;
   for (ossim_uint32 band = 0; band < BANDS; ++band)
   {
      for (ossim_uint32 pixel = 0; pixel < PPB; ++pixel)
      {
         // Get the source pixel...
         ossim_uint32 idx
            = static_cast<ossim_uint32>(buf[pixel]*theTableBinCount+0.5);

         if((idx < theTableBinCount))
         {
            // If within range use to index the remap table; else, null.
            p = (idx < theTableBinCount) ? rt[idx] : 0.0;
         }
//         else if(idx < 0)
//         {
//            p = 0.0;
//         }
         else 
         {
            p = 1.0;
         }
         // Range check (in case table bad) and assign to destination pixel.
         buf[pixel] = (p >= 0.0) ? ( (p <=1.0) ? p : 1) : 0.0;
      }

      // Go to next band.
      rt += BAND_OFFSET;
      buf += PPB;
   }
   
   // Un-normalize and copy the buffer to the destination tile.
   theTile->copyNormalizedBufferToTile(theNormBuf);
}
开发者ID:hunterfu,项目名称:ossim,代码行数:59,代码来源:ossimTableRemapper.cpp


示例19: setProperty

void ossimIndexToRgbLutFilter::setProperty(ossimRefPtr<ossimProperty> property)
{
   if(property.valid())
   {
      ossimString value = property->valueToString();
      value = value.trim();

      if(property->getName() == "LUT file")
      {
         setLut(ossimFilename(property->valueToString()));
      }
      else
      {
         ossimImageSourceFilter::setProperty(property);
      }
   }
}
开发者ID:hunterfu,项目名称:ossim,代码行数:17,代码来源:ossimIndexToRgbLutFilter.cpp


示例20: setProperty

void ossimFftFilter::setProperty(ossimRefPtr<ossimProperty> property)
{
   if(!property) return;
   
   if(property->getName() == "FFT Direction")
   {
      if(theTile.valid())
      {
         theTile = NULL;
      }
      setDirectionType(property->valueToString());
   }
   else
   {
      ossimImageSourceFilter::setProperty(property);
   }
}
开发者ID:Srprsr,项目名称:ossim,代码行数:17,代码来源:ossimFftFilter.cpp



注:本文中的ossimRefPtr类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ostream类代码示例发布时间:2022-05-31
下一篇:
C++ ossimKeywordlist类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap