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

C++ ossimKeywordlist类代码示例

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

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



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

示例1: saveState

bool ossimAdjustmentInfo::saveState(ossimKeywordlist& kwl,
                                    const ossimString& prefix)const
{
   kwl.add(prefix,
           ossimKeywordNames::DESCRIPTION_KW,
           getDescription(),
           true);
   kwl.add(prefix.c_str(),
           NUMBER_OF_PARAMS_KW,
           static_cast<ossim_uint32>(theParameterList.size()),
           true);

   kwl.add(prefix,
           DIRTY_FLAG_KW,
           (short)theDirtyFlag,
           true);

   ossimString value;
   for(ossim_uint32 idx = 0; idx < theParameterList.size();++idx)
   {
      ossimString newPrefix = ossimString(prefix) + (ossimString(PARAM_PREFIX) + ossimString::toString(idx)+".");
      theParameterList[idx].saveState(kwl, newPrefix.c_str());
   }

   return true;
}
开发者ID:LucHermitte,项目名称:ossim,代码行数:26,代码来源:ossimAdjustmentInfo.cpp


示例2: loadState

bool ossimAdjustmentInfo::loadState(const ossimKeywordlist& kwl,
                                    const ossimString& prefix)
{
   setDescription(kwl.find(prefix, ossimKeywordNames::DESCRIPTION_KW));
   setNumberOfAdjustableParameters(ossimString(kwl.find(prefix, NUMBER_OF_PARAMS_KW)).toUInt32());
   const char *dirtyFlag = kwl.find(prefix, DIRTY_FLAG_KW);
   ossimString value;

   if(dirtyFlag)
   {
      theDirtyFlag = ossimString(dirtyFlag).toBool();
   }
   else
   {
      theDirtyFlag = false;
   }

   for(ossim_uint32 idx = 0; idx < theParameterList.size();++idx)
   {
      ossimString newPrefix = ossimString(prefix) + (ossimString(PARAM_PREFIX) + ossimString::toString(idx)+".");
      if(!theParameterList[idx].loadState(kwl, newPrefix.c_str()))
      {
         return false;
      }
   }

   return true;
}
开发者ID:LucHermitte,项目名称:ossim,代码行数:28,代码来源:ossimAdjustmentInfo.cpp


示例3: saveState

bool ossimImageToPlaneNormalFilter::saveState(ossimKeywordlist& kwl,
                                              const char* prefix)const
{
   kwl.add(prefix,
           ossimKeywordNames::SCALE_PER_PIXEL_X_KW,
           theXScale,
           true);

   kwl.add(prefix,
           ossimKeywordNames::SCALE_PER_PIXEL_Y_KW,
           theXScale,
           true);

   kwl.add(prefix,
           "track_scale_flag",
           (ossim_uint32)theTrackScaleFlag,
           true);

   kwl.add(prefix,
           SMOOTHNESS_FACTOR_KW,
           theSmoothnessFactor,
           true);

   return ossimImageSourceFilter::saveState(kwl, prefix);
}
开发者ID:loongfee,项目名称:ossim-svn,代码行数:25,代码来源:ossimImageToPlaneNormalFilter.cpp


示例4: loadState

bool ossimBlendMosaic::loadState(const ossimKeywordlist& kwl,
                                 const char* prefix)
{
   bool result = ossimImageMosaic::loadState(kwl, prefix);
   ossim_uint32 count = 0;
   theWeights.clear();
   if(result)
   {
      ossimString copyPrefix    = prefix;
      ossimString regExpression =  ossimString("^(") + copyPrefix + "weight[0-9]+)";
      ossim_uint32 result = kwl.getNumberOfSubstringKeys(regExpression);
            
      ossim_uint32 numberOfMatches = 0;
      while(numberOfMatches < result)
      {
         ossimString value = ossimString("weight") + ossimString::toString(count);

         const char* lookup = kwl.find(copyPrefix.c_str(),
                                       value.c_str());
         
         if(lookup)
         {
            ++numberOfMatches;
            theWeights.push_back(ossimString(lookup).toDouble());
         }

         ++count;
      }
   }
   
   return result;
}
开发者ID:LucHermitte,项目名称:ossim,代码行数:32,代码来源:ossimBlendMosaic.cpp


示例5: loadState

bool ossimMemoryImageSource::loadState(const ossimKeywordlist& kwl, const char* prefix)
{
   bool returnResult =  ossimImageSource::loadState(kwl, prefix);
   m_geometry = 0;
   if(returnResult)
   {
      ossimString imagePrefix = ossimString(prefix) + "image.";
      ossimString geomPrefix = ossimString(prefix) + "geom.";
      
      ossimString type = kwl.find(imagePrefix, "type");
      if(!type.empty())
      {
         m_image = new ossimImageData();
         returnResult = m_image->loadState(kwl, imagePrefix.c_str());
         m_image->initialize();
         m_boundingRect = m_image->getImageRectangle();
      }
      
      if(returnResult)
      {
         type = kwl.find(geomPrefix, "type");
         if(!type.empty())
         {
            m_geometry = new ossimImageGeometry();
            returnResult = m_geometry->loadState(kwl, geomPrefix.c_str());
         }
      }
   }
   m_result = 0;
   return returnResult;
}
开发者ID:LucHermitte,项目名称:ossim,代码行数:31,代码来源:ossimMemoryImageSource.cpp


示例6: loadState

bool ossimTilingPoly::loadState(const ossimKeywordlist& kwl,
                            const char* prefix)
{
   bool result = ossimTilingRect::loadState(kwl, prefix);
   
   //Get the shp file if any
   m_shpFilename = kwl.find(prefix, "tile_source");

   // Get the mask if any.
   if (!m_shpFilename.empty())
   {
      if (theTileNameMask.contains("%r%_%c%"))
      {
         theTileNameMask = theTileNameMask.substitute("%r%_%c%", "%f%", true);
      }
      result = true;
   }
 
   const char* useMbr = kwl.find(prefix, "padding_use_mbr");
   if (useMbr)
   {
      if (!ossimString(useMbr).toBool())
      {
         m_useMbr = false;
         m_bufferDistance = thePaddingSizeInPixels.x;
      }
   }

   return result;
}
开发者ID:LucHermitte,项目名称:ossim,代码行数:30,代码来源:ossimTilingPoly.cpp


示例7: saveState

/***************************************************************
* This method saves the filter state between property box edits
***************************************************************/
bool ossimCFARFilter::saveState(ossimKeywordlist& kwl,
                                          const char* prefix)const
{   
   kwl.add(prefix,
           "rows",
           5,
           true);
   
   kwl.add(prefix,
           "cols",
           5,
           true);
   
   for(ossim_int32 row = 0; row < 5; ++row)
   {
      for(ossim_int32 col =0; col < 5; ++col)
      {
         ossimString newPrefix = "m" +
                                 ossimString::toString(row+1) + "_" +
                                 ossimString::toString(col+1);
         kwl.add(prefix,
                 newPrefix,
                 theKernel[row][col],
                 true);          
      }
   }   
   
	kwl.add(prefix,
           "threshold",
           theThreshold,
           true);
   
   return ossimImageSourceFilter::saveState(kwl, prefix);
}
开发者ID:ICODE-MDA,项目名称:AutomatedSARShipDetection,代码行数:37,代码来源:ossimCFARFilter.cpp


示例8: buildChains

bool buildChains(const ossimKeywordlist& kwl,
                 ossimConnectableObject::ConnectableObjectList& chains)
{
   ossim_int32 index = 0;
   ossim_int32 result = kwl.getNumberOfSubstringKeys("file[0-9]+\\.filename");
   const char* lookup = NULL;
   ossim_int32 numberOfMatches = 0;
   vector<ossimFilename> fileList;
   
   while(numberOfMatches < result)
   {
      ossimString searchValue = "file" + ossimString::toString(index);
      
      ossimString filename = searchValue + ".filename";
      lookup = kwl.find(filename.c_str());
      if(lookup)
      {
         fileList.push_back(ossimFilename(lookup));
         ++numberOfMatches;
      }
      ++index;
   }
      
   return buildChains(fileList,
                      chains);
}
开发者ID:loongfee,项目名称:ossim-svn,代码行数:26,代码来源:ossim-mosaic.cpp


示例9: InitSRGR

bool ossimCosmoSkymedModel::InitSRGR(const ossimKeywordlist &kwl, const char *prefix)
{
  const char* rangeProjectionType_str = kwl.find(prefix,"rangeProjectionType");
  std::string rangeProjectionType(rangeProjectionType_str);

  const char* pixel_spacing_str = kwl.find(prefix,"pixel_spacing");
  _pixel_spacing= atof(pixel_spacing_str);

  _isProductGeoreferenced = (rangeProjectionType=="GROUNDRANGE") ;

  // Number of columns
  const char* nbCol_str = kwl.find(prefix,"nbCol");
  _nbCol = atoi(nbCol_str);

  // SRGR polynomial reference
  const char* SrGr_R0_str = kwl.find(prefix,"SrGr_R0");
  _SrGr_R0 = atof(SrGr_R0_str);

  // SRGR coefficients
  char name[64];
  double coeff ;
  for(int i=0;i<6;i++)
  {
    sprintf(name,"SrToGr_coeffs_%i",i);
    const char* coeff_str = kwl.find(prefix,name);
    coeff = atof(coeff_str);
    _SrGr_coeffs.push_back(coeff);
  }

  return true;
}
开发者ID:boussaffawalid,项目名称:OTB,代码行数:31,代码来源:ossimCosmoSkymedModel.cpp


示例10: saveState

bool ImageNoise::saveState(ossimKeywordlist& kwl, const char* prefix) const
{
   std::string pfx;
   std::string pfx2;
   if (prefix)
   {
      pfx = prefix;
   }
  pfx += PREFIX;
  kwl.add(pfx.c_str(), TIME_UTC,  _timeUTC);

  pfx2 = pfx + NOISE_ESTIMATE;
  kwl.add(pfx2.c_str(), VALIDITY_RANGE_MIN,  _validityRangeMin);
  kwl.add(pfx2.c_str(), VALIDITY_RANGE_MAX,  _validityRangeMax);
  kwl.add(pfx2.c_str(), REFERENCE_POINT,  _referencePoint);
  kwl.add(pfx2.c_str(), POLYNOMIAL_DEGREE,  _polynomialDegree);

  for(unsigned int i=0 ; i<_polynomialCoefficients.size();i++)
  {
         ossimString iStr = ossimString::toString(i);
         ossimString kw = ossimString(COEFFICIENT) + "["+iStr+ "]";
         kwl.add(pfx2.c_str(), kw.c_str(), _polynomialCoefficients[i]);
  }

   return true;
}
开发者ID:ICODE-MDA,项目名称:AutomatedSARShipDetection,代码行数:26,代码来源:ImageNoise.cpp


示例11: loadState

bool ossimQtVceShape::loadState(const ossimKeywordlist& kwl,
                                const char* prefix)
{
   const char* id = kwl.find(prefix, ossimKeywordNames::ID_KW);
   const char* selectionSize = kwl.find(prefix, "selection_box_size");
   const char* position = kwl.find(prefix, "position");

   if(id)
   {
      theId = ossimString(id).toInt();
   }
   if(selectionSize)
   {
      std::stringstream s(selectionSize);
      int w, h;
      s >> w >> h;
      theSelectionBoxSize = QSize(w, h);
   }
   
   if(position)
   {
      std::stringstream s(position);
      int x, y;
      s >> x >> y;

      setX(x);
      setY(y);
   }
   
   return true;
}
开发者ID:star-labs,项目名称:star_ossim,代码行数:31,代码来源:ossimQtVceShape.cpp


示例12: saveState

bool ossimQtVceShape::saveState(ossimKeywordlist& kwl,
                                const char* prefix)const
{
   kwl.add(prefix,
           ossimKeywordNames::TYPE_KW,
           "ossimQtVceShape",
           true);
   kwl.add(prefix,
           ossimKeywordNames::ID_KW,
           theId,
           true);
   kwl.add(prefix,
           "selection_box_size",
           ossimString::toString(theSelectionBoxSize.width())+" "+
           ossimString::toString(theSelectionBoxSize.height()),
           true);
   kwl.add(prefix,
           "position",
           ossimString::toString((int)x())+" "+
           ossimString::toString((int)y()),
           true);

   QRect b = boundingVceShapeRect();

   return true;
}
开发者ID:star-labs,项目名称:star_ossim,代码行数:26,代码来源:ossimQtVceShape.cpp


示例13: loadState

bool ossimLambertConformalConicProjection::loadState(const ossimKeywordlist& kwl, const char* prefix)
{
   bool flag = ossimMapProjection::loadState(kwl, prefix);

   const char* type          = kwl.find(prefix, ossimKeywordNames::TYPE_KW);
   const char* stdParallel1  = kwl.find(prefix, ossimKeywordNames::STD_PARALLEL_1_KW);
   const char* stdParallel2  = kwl.find(prefix, ossimKeywordNames::STD_PARALLEL_2_KW);

   setDefaults();
   
   if(ossimString(type) == STATIC_TYPE_NAME(ossimLambertConformalConicProjection))
   {
      Lambert_False_Easting  = theFalseEastingNorthing.x;
      Lambert_False_Northing = theFalseEastingNorthing.y;

      if(stdParallel1)
      {
         Lambert_Std_Parallel_1 = ossimString(stdParallel1).toDouble()*RAD_PER_DEG;
      }
      if(stdParallel2)
      {
         Lambert_Std_Parallel_2 = ossimString(stdParallel2).toDouble()*RAD_PER_DEG;
      }
   }
   update();
   return flag;
}
开发者ID:LucHermitte,项目名称:ossim,代码行数:27,代码来源:ossimLambertConformalConicProjection.cpp


示例14: saveState

bool RefPoint::saveState(ossimKeywordlist& kwl, const char* prefix) const
{
   bool result = true;

   std::string pfx;
   if (prefix)
   {
      pfx = prefix;
   }
   pfx += PREFIX;

   if (_ephemeris)
   {
      result = _ephemeris->saveState(kwl, pfx.c_str());
   }
   else
   {
      result = false;
   }

   kwl.add(pfx.c_str(), DISTANCE_KW, _distance);
   kwl.add(pfx.c_str(), LINE_KW,     _pix_line);
   kwl.add(pfx.c_str(), COL_KW,      _pix_col);

   return result;
}
开发者ID:573671712,项目名称:OTB,代码行数:26,代码来源:RefPoint.cpp


示例15: loadState

/***************************************************************
* This method loads the filter state between property box edits
***************************************************************/
bool ossimCFARFilter::loadState(const ossimKeywordlist& kwl,
                                          const char* prefix)
{
   ossimString newPrefix = prefix;
   newPrefix += ossimString("m");
   
   for(ossim_int32 r = 0; r < 5; r++)
   {
      for(ossim_int32 c = 0; c < 5; c++)
      {
         theKernel[r][c] = 0.0;
         
         ossimString value = ossimString::toString(r+1);
         value += "_";
         value += ossimString::toString(c+1);
         
         const char* v = kwl.find(newPrefix.c_str(),
                                  value.c_str());
         if(v)
         {
            theKernel[r][c] = ossimString(v).toDouble();
         }
      }
   }
   const char* threshold = kwl.find(prefix, "threshold");
   if(threshold)
   {
      theThreshold = ossimString(threshold).toDouble();
   }
   
   return ossimImageSourceFilter::loadState(kwl, prefix);
}
开发者ID:ICODE-MDA,项目名称:AutomatedSARShipDetection,代码行数:35,代码来源:ossimCFARFilter.cpp


示例16: saveState

bool ossimQuadTreeWarpVertex::saveState(ossimKeywordlist& kwl,
                                      const char* prefix)const
{
   kwl.add(prefix,
           "x",
           thePosition.x,
           true);
   kwl.add(prefix,
           "y",
           thePosition.y,
           true);
   kwl.add(prefix,
           "dx",
           theDelta.x,
           true);
   kwl.add(prefix,
           "dy",
           theDelta.y,
           true);
   kwl.add(prefix,
           "lock_flag",
           (int)theLockedFlag,
           true);
   
   return true;
}
开发者ID:loongfee,项目名称:ossim-svn,代码行数:26,代码来源:ossimQuadTreeWarp.cpp


示例17: saveState

bool ossimMultiResLevelHistogram::saveState(ossimKeywordlist& kwl,
                                            const char* prefix)const
{
   bool result = true;
   if(theHistogramList.size() > 0)
   {
      ossimString s1 = prefix;
      kwl.add(prefix,
              ossimKeywordNames::TYPE_KW,
              "ossimMultiResLevelHistogram",
              true);
      kwl.add(prefix,
              NUMBER_OF_RES_LEVELS.key(),
              static_cast<ossim_uint32>(theHistogramList.size()),
              true);

      for(ossim_uint32 idx = 0; idx < theHistogramList.size(); ++idx)
      {
         ossimString rr_level = ossimString(prefix) + "rr_level";
         rr_level += ossimString::toString(idx)   + ".";
         if(theHistogramList[idx].valid())
         {
            result = theHistogramList[idx]->saveState(kwl, rr_level.c_str());
            
            if(!result)
            {
               return result;
            }
         }
      }    
   }

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


示例18: loadState

bool ossimImageToPlaneNormalFilter::loadState(const ossimKeywordlist& kwl,
                                              const char* prefix)
{
   ossimString scaleX     = kwl.find(prefix, ossimKeywordNames::SCALE_PER_PIXEL_X_KW);
   ossimString scaleY     = kwl.find(prefix, ossimKeywordNames::SCALE_PER_PIXEL_Y_KW);
   ossimString trackFlag  = kwl.find(prefix, "track_scale_flag");
   ossimString smoothness = kwl.find(prefix, SMOOTHNESS_FACTOR_KW);

   if(scaleX != "")
   {
      theXScale = scaleX.toDouble();
   }
   if(scaleY != "")
   {
      theYScale = scaleY.toDouble();
   }
   if(trackFlag != "")
   {
      theTrackScaleFlag = trackFlag.toBool();
   }
   if(smoothness!="")
   {
      theSmoothnessFactor = smoothness.toDouble();
   }

   return ossimImageSourceFilter::loadState(kwl, prefix);
}
开发者ID:loongfee,项目名称:ossim-svn,代码行数:27,代码来源:ossimImageToPlaneNormalFilter.cpp


示例19: toKwl

void ossimXmlNode::toKwl(ossimKeywordlist& kwl,
                         const ossimString& prefix)const
{
   ossimString name = getTag();
   ossimString value = getText();
   
   ossimString copyPrefix = prefix;
   
   if(name != "")
   {
      copyPrefix += (name+".");
   }
   if(theChildNodes.size() < 1)
   {
      kwl.add(prefix+name,
              value,
              true);
   }

   ossimString attributePrefix = copyPrefix + "@";
   ossim_uint32 attributeIdx = 0;
   for(attributeIdx = 0; attributeIdx < theAttributes.size(); ++attributeIdx)
   {
      kwl.add(attributePrefix+theAttributes[attributeIdx]->getName(),
              theAttributes[attributeIdx]->getValue(), 
              true);
   }

   ossim_uint32 idx = 0;
   for(idx = 0; idx < theChildNodes.size();++idx)
   {
      theChildNodes[idx]->toKwl(kwl,
                                copyPrefix);
   }
}
开发者ID:inessus,项目名称:ossim,代码行数:35,代码来源:ossimXmlNode.cpp


示例20: loadState

bool ossimQuadTreeWarpVertex::loadState(const ossimKeywordlist& kwl,
                                        const char* prefix)
{
   const char* x = kwl.find(prefix,
                            "x");
   const char* y = kwl.find(prefix,
                            "y");
   const char* dx = kwl.find(prefix,
                             "dx");
   const char* dy = kwl.find(prefix,
                             "dy");
   const char* lockedFlag = kwl.find(prefix,
                                     "lock_flag");
   if(x&&y&&dx&&dy&&lockedFlag)
   {
      thePosition.x = ossimString(x).toDouble();
      thePosition.y = ossimString(y).toDouble();
      theDelta.x    = ossimString(dx).toDouble();
      theDelta.y    = ossimString(dy).toDouble();
      theLockedFlag = ossimString(lockedFlag).toBool();
      
      return true;
   }
   
   return false;
}
开发者ID:loongfee,项目名称:ossim-svn,代码行数:26,代码来源:ossimQuadTreeWarp.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ ossimRefPtr类代码示例发布时间:2022-05-31
下一篇:
C++ ossimIrect类代码示例发布时间: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