当前位置: 首页>>代码示例>>C++>>正文


C++ PvlGroup::SetName方法代码示例

本文整理汇总了C++中PvlGroup::SetName方法的典型用法代码示例。如果您正苦于以下问题:C++ PvlGroup::SetName方法的具体用法?C++ PvlGroup::SetName怎么用?C++ PvlGroup::SetName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PvlGroup的用法示例。


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

示例1: PvlCalStats

/**
 * @brief Writes data specific to calibration statistics in Pvl Format
 * 
 * This method is a compartmentalization of the writing of the contents of
 * a HiImageClean object.  
 * 
 * This method dumps the calibration statistics computed from the HiRISE
 * cube specifed on construction or through the load methods.
 */
  void HiImageClean::PvlCalStats(PvlGroup &grp) const {
    grp.SetName("CalibrationStatistics");
    grp += PvlKeyword("Binning",_binning);
    grp += PvlKeyword("TDI",_tdi);
    grp += PvlKeyword("CPMM",_cpmm);
    grp += PvlKeyword("Channel",_channelNo);
    grp += PvlKeyword("FirstImageSample",_firstImageSample);         
    grp += PvlKeyword("FirstImageLine",_firstImageLine);          
    grp += PvlKeyword("FirstBufferSample",_firstBufferSample); 
    grp += PvlKeyword("FirstDarkSample",_firstDarkSample);
    grp += PvlKeyword("MaskInducedNulls", _totalMaskNulled);
    grp += PvlKeyword("DarkInducedNulls", _totalDarkNulled);
    grp += PvlKeyword("LastGoodLine",_lastGoodLine+1);
  }
开发者ID:assutech,项目名称:isis3,代码行数:23,代码来源:HiImageClean.cpp

示例2: PvlImageStats

/**
 * @brief Writes data specific to image statistics out in Pvl format
 * 
 * This method creates a PvlGroup containing the image statistics
 * acculated during line-by-line processing of raw image data.
 */
  void HiImageClean::PvlImageStats(PvlGroup &grp) const {
    grp.SetName("ImageStatistics");
    grp += PvlKeyword("File",_filename.Name());
    grp += PvlKeyword("Lines",_lines);
    grp += PvlKeyword("Samples",_samples);

    BigInt nBad = _maskStats.TotalPixels() - _maskStats.ValidPixels();
    grp += PvlKeyword("MaskAverage", _maskStats.Average());
    grp += PvlKeyword("MaskStdDev", _maskStats.StandardDeviation());
    grp += PvlKeyword("BadMaskPixels", nBad);
    grp += PvlKeyword("MaskInducedNulls", _totalMaskNulled);

    nBad = _darkStats.TotalPixels() - _darkStats.ValidPixels();
    grp += PvlKeyword("DarkAverage", _darkStats.Average());
    grp += PvlKeyword("DarkStdDev", _darkStats.StandardDeviation());
    grp += PvlKeyword("BadDarkPixels", nBad);
    grp += PvlKeyword("DarkInducedNulls", _totalDarkNulled);

  }
开发者ID:assutech,项目名称:isis3,代码行数:25,代码来源:HiImageClean.cpp

示例3: IsisMain

void IsisMain() {
  // We will be processing by brick
  ProcessByBrick p;
  
  Isis::Cube *amatrixCube=NULL; 
  Isis::Cube *bmatrixCube=NULL; 

  // Setup the user input for the input/output files and the option
  UserInterface &ui = Application::GetUserInterface();

  // Setup the input HiRise cube
  Isis::Cube *icube = p.SetInputCube("FROM");

  if (icube->Bands() != 1) {
    std::string msg = "Only single-band HiRise cubes can be calibrated";
    throw Isis::iException::Message(Isis::iException::Io,msg,_FILEINFO_);
  }

  //Get pertinent label information to determine which band of matrix cube to use
  HiLab hilab(icube);

  int ccd = hilab.getCcd();

  int channel = hilab.getChannel();

  if (channel != 0  && channel != 1) {
    std::string msg = "Only unstitched cubes can be calibrated";
    throw Isis::iException::Message(Isis::iException::Io,msg,_FILEINFO_);
  }
  int band = 1 + ccd*2 + channel;

  string option = ui.GetString("OPTION");

  // Set attributes (input band number) for the matrix cube(s);
  CubeAttributeInput att("+" + iString(band));

  // Determine the file specification to the matrix file(s) if defaulted
  // and open 
  
  if (ui.WasEntered ("MATRIX") ) {
    if (option == "GAIN") {
      string matrixFile = ui.GetFilename("MATRIX");
      amatrixCube = p.SetInputCube(matrixFile, att);
    }
    else if (option == "OFFSET") {
      string matrixFile = ui.GetFilename("MATRIX");
      bmatrixCube = p.SetInputCube(matrixFile, att);
    }
    else { //(option == "BOTH")
      std::string 
        msg = "The BOTH option cannot be used if a MATRIX is entered";
      throw Isis::iException::Message(Isis::iException::Io,msg,_FILEINFO_);
    }
  }
  else {
    int tdi = hilab.getTdi();
    int bin = hilab.getBin();

    if (option == "OFFSET" || option == "BOTH") {
      std::string bmatrixFile = "$mro/calibration";
      bmatrixFile += "/B_matrix_tdi";
      bmatrixFile += iString(tdi) + "_bin" + iString(bin);
      bmatrixCube = p.SetInputCube(bmatrixFile, att);
    }
    if (option == "GAIN" || option == "BOTH") {
       std::string amatrixFile = "$mro/calibration";
       amatrixFile += "/A_matrix_tdi";
       amatrixFile += iString(tdi) + "_bin" + iString(bin);
       amatrixCube = p.SetInputCube(amatrixFile, att);
    }
  }

  // Open the output file and set processing parameters
  Cube *ocube = p.SetOutputCube ("TO");
  p.SetWrap (true);
  p.SetBrickSize ( icube->Samples(), 1, 1);

  // Add the radiometry group if it is not there yet.  Otherwise
  // read the current value of the keyword CalibrationParameters.
  // Then delete the keyword and rewrite it after appending the
  // new value to it.  Do it this way to avoid multiple Calibration
  // Parameter keywords.
  PvlGroup calgrp;
  PvlKeyword calKey;

  if (ocube->HasGroup("Radiometry")) {
    calgrp = ocube->GetGroup ("Radiometry");

    if (calgrp.HasKeyword("CalibrationParameters")) {
      calKey = calgrp.FindKeyword("CalibrationParameters");
      calgrp.DeleteKeyword( "CalibrationParameters" );
    }
    else {
      calKey.SetName ("CalibrationParameters");
    }
  }
  else {
    calgrp.SetName("Radiometry");
    calKey.SetName ("CalibrationParameters");
  }
//.........这里部分代码省略.........
开发者ID:assutech,项目名称:isis3,代码行数:101,代码来源:hipical.cpp


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