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


C++ Cube::Filename方法代码示例

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


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

示例1: IsisMain

void IsisMain() {
  //Set up ProcessBySpectra
  ProcessBySpectra p;

  //Obtain input cube, get bands dimension from input cube and user input number bands
  Cube *icube = p.SetInputCube("FROM");
  int cubeBands = icube->Bands();
  UserInterface &ui = Application::GetUserInterface();
  bands = ui.GetInteger("BANDS");

  //Check for cases of too many bands
  if (bands >= (2 * cubeBands)) {
    iString msg = "Parameter bands [" + iString(bands) + "] exceeds maximum allowable size "
      + "of [" + iString((cubeBands * 2) - 1) + "] for cube [" + icube->Filename() + "]";
    throw iException::Message(iException::User,msg, _FILEINFO_);
  }
 
  //Set the Boxcar Parameters
  low = -DBL_MAX;
  high = DBL_MAX;

  if (ui.WasEntered("LOW")) {
    low = ui.GetDouble("LOW");
  }
  if (ui.WasEntered("HIGH")) {
    high = ui.GetDouble("HIGH");
  }
 
  //Obtain output cube
  p.SetOutputCube("TO");

  //Start the filter method
  p.StartProcess(Filter);
  p.EndProcess();
  
}
开发者ID:assutech,项目名称:isis3,代码行数:36,代码来源:spechighpass.cpp

示例2: IsisMain

void IsisMain(){

  const std::string hical_program = "hicalbeta";
  const std::string hical_version = "3.5";
  const std::string hical_revision = "$Revision: 1.14 $";
  const std::string hical_runtime = Application::DateTime();

  UserInterface &ui = Application::GetUserInterface();

  string procStep("prepping phase");
  try {
//  The output from the last processing is the input into subsequent processing
    ProcessByLine p;

    Cube *hifrom = p.SetInputCube("FROM");
    int nsamps = hifrom->Samples();
    int nlines = hifrom->Lines();

//  Initialize the configuration file
    string conf(ui.GetAsString("CONF"));
    HiCalConf hiconf(*(hifrom->Label()), conf);
    DbProfile hiprof = hiconf.getMatrixProfile();

// Check for label propagation and set the output cube
    Cube *ocube = p.SetOutputCube("TO");
    if ( !IsTrueValue(hiprof,"PropagateTables", "TRUE") ) {
      RemoveHiBlobs(*(ocube->Label()));
    }

//  Set specified profile if entered by user
    if (ui.WasEntered("PROFILE")) {
      hiconf.selectProfile(ui.GetAsString("PROFILE"));
    }


//  Add OPATH parameter to profiles
    if (ui.WasEntered("OPATH")) {
      hiconf.add("OPATH",ui.GetAsString("OPATH"));
    }
    else {
      //  Set default to output directory
      hiconf.add("OPATH", Filename(ocube->Filename()).Path());
    }

//  Do I/F output DN conversions
    string units = ui.GetString("UNITS");

    //  Allocate the calibration list
    calVars = new MatrixList;

//  Set up access to HiRISE ancillary data (tables, blobs) here.  Note it they
//  are gone, this will error out. See PropagateTables in conf file.
    HiCalData caldata(*hifrom);

////////////////////////////////////////////////////////////////////////////
//  FixGaps (Z_f) Get buffer pixels and compute coefficients for equation
//     y = a[0] + a[1]*x + a[2] * exp(a[3] * x)
//        where y is the average of the buffer pixel region,
//          and x is the time at each line in electrons/sec/pixel
    procStep = "Zf module";
    hiconf.selectProfile("Zf");
    hiprof = hiconf.getMatrixProfile();
    HiHistory ZfHist;
    ZfHist.add("Profile["+ hiprof.Name()+"]");
    if ( !SkipModule(hiprof) ) {
      DriftBuffer driftB(caldata, hiconf);
      calVars->add("Zf", driftB.ref());
      ZfHist = driftB.History();
      if ( hiprof.exists("DumpModuleFile") ) {
        driftB.Dump(hiconf.getMatrixSource("DumpModuleFile",hiprof));
      }
    }
    else {
      //  NOT RECOMMENDED!  This is required for the next step!
      //  SURELY must be skipped with Z_d step as well!
      calVars->add("Zf", HiVector(nlines, 0.0));
      ZfHist.add("Debug::SkipModule invoked!");
    }

/////////////////////////////////////////////////////////////////////
// DriftCorrect (Z_d)
//  Now compute the equation of fit
// 
    procStep = "Zd module";
    HiHistory ZdHist;
    hiconf.selectProfile("Zd");
    hiprof = hiconf.getMatrixProfile();
    ZdHist.add("Profile["+ hiprof.Name()+"]");
    if (!SkipModule(hiconf.getMatrixProfile("Zd")) ) { 
      DriftCorrect driftC(hiconf);
      calVars->add("Zd", driftC.Normalize(driftC.Solve(calVars->get("Zf"))));
      ZdHist = driftC.History();
      if ( hiprof.exists("DumpModuleFile") ) {
        driftC.Dump(hiconf.getMatrixSource("DumpModuleFile",hiprof));
      }
    }
    else {
      calVars->add("Zd", HiVector(nlines, 0.0));
      ZdHist.add("Debug::SkipModule invoked!");
    }
//.........这里部分代码省略.........
开发者ID:assutech,项目名称:isis3,代码行数:101,代码来源:hicalbeta.cpp

示例3: main

int main () {
  Isis::Preference::Preferences(true);

/**
 * @brief Test ImagePolygon object for accuracy and correct behavior.
 * 
 * @author 2005-11-22 Tracie Sucharski
 * 
 * @history 2007-01-19  Tracie Sucharski, Removed ToGround method (for now)
 *          because of round off problems going back and forth between
 *          lat/lon,line/samp.
 * @history 2007-01-31  Tracie Sucharski,  Added WKT method to return polygon
 *                           in string as WKT.
 * @history 2007-11-09  Tracie Sucharski,  Remove WKT method, geos now has
 *                            a method to return a WKT string.
 * @history 2007-11-20  Tracie Sucharski,  Added test for sub-polys 
*/   

  //   simple MOC image
  string inFile = "/usgs/cpkgs/isis3/data/mgs/testData/ab102401.cub";
  //string inFile = "/work1/tsucharski/poly/I17621017RDR_lev2.cub";
  //  same MOC image, but sinusoidal projection
  //string inFile = "/farm/prog1/tsucharski/isis3/ab102401.lev2.cub";

  //  same MOC image, but sinusoidal projection , doctored left edge
  //string inFile = "/farm/prog1/tsucharski/isis3/ab102401.lev2.leftTrim.cub";

  //   MOC north pole image
  //string inFile = "/work1/tsucharski/isis3/poly/e0202226.lev1.cub";

  //  MOC image with 0/360 boundary
  //  orkin
  //string inFile = "/farm/prog1/tsucharski/isis3/cubes/m0101631.lev1.cub";
  // blackflag
  //string inFile = "/work1/tsucharski/isis3/poly/m0101631.lev1.cub";
  
  // galileo ssi image
  //string inFile = "/farm/prog1/tsucharski/isis3/6700r.cub";


  // Open the cube
  Cube cube;
  Cube cube1;
  cube.Open(inFile,"r");

  ImagePolygon poly;
  try {
    poly.Create(cube);
  }
  catch (iException &e) {
    std::string msg = "Cannot create polygon for [" + cube.Filename() + "]";
    throw iException::Message(iException::Programmer,msg,_FILEINFO_);
  }


  //  write poly as WKT
  std::cout<< poly.Polys()->toString()<<std::endl;

  //  Test sub-poly option
  try {
    poly.Create(cube,12,1,384,640,385);
  } 
  catch (iException &e) {
    std::string msg = "Cannot create sub-polygon for [" + cube.Filename() + "]";
    throw iException::Message(iException::Programmer,msg,_FILEINFO_);
  }
  //  write poly as WKT
  std::cout<< poly.Polys()->toString()<<std::endl;


  //  Test lower quality option
  try {
    poly.Create(cube,10,12,1,384,640,385);
  } 
  catch (iException &e) {
    std::string msg = "Cannot create lower quality polygon for [" + cube.Filename() + "]";
    throw iException::Message(iException::Programmer,msg,_FILEINFO_);
  }
  //  write poly as WKT
  std::cout<< poly.Polys()->toString()<<std::endl;



  cube.Close();
}
开发者ID:assutech,项目名称:isis3,代码行数:85,代码来源:unitTest.cpp

示例4: init

/**
 *  @brief Cube based constructor for HiRISE image cleaner
 */
  HiImageClean::HiImageClean(Cube &cube) {
    _filename = cube.Filename();
    _lines =  _samples = 0;
    _totalMaskNulled = _totalDarkNulled = 0;
    init(cube);
  }
开发者ID:assutech,项目名称:isis3,代码行数:9,代码来源:HiImageClean.cpp


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