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


C++ Pipeline::AddToPipeline方法代码示例

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


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

示例1: ProcessIr

void ProcessIr() {
  UserInterface &ui = Application::GetUserInterface();
  Pipeline p;

  p.SetInputFile("FROM", "BANDS");
  p.SetOutputFile("TO");

  p.KeepTemporaryFiles(!ui.GetBoolean("REMOVE"));

  p.AddToPipeline("thm2isis");
  p.Application("thm2isis").SetInputParameter("FROM", false);
  p.Application("thm2isis").SetOutputParameter("TO", "raw");

  p.AddToPipeline("spiceinit");
  p.Application("spiceinit").SetInputParameter("FROM", false);
  p.Application("spiceinit").AddParameter("PCK", "PCK");
  p.Application("spiceinit").AddParameter("CK", "CK");
  p.Application("spiceinit").AddParameter("SPK", "SPK");
  p.Application("spiceinit").AddParameter("SHAPE", "SHAPE");
  p.Application("spiceinit").AddParameter("MODEL", "MODEL");
  p.Application("spiceinit").AddParameter("CKNADIR", "CKNADIR");

  p.AddToPipeline("cam2map");
  p.Application("cam2map").SetInputParameter("FROM", true);
  p.Application("cam2map").SetOutputParameter("TO", "lev2");
  p.Application("cam2map").AddParameter("MAP", "MAP");
  p.Application("cam2map").AddParameter("PIXRES", "RESOLUTION");

  if(ui.WasEntered("PIXRES")) {
    p.Application("cam2map").AddConstParameter("PIXRES", "MPP");
  }

  if(ui.GetBoolean("INGESTION")) {
    p.SetFirstApplication("thm2isis");
  }
  else{
    p.SetFirstApplication("spiceinit");
  }

  if(ui.GetBoolean("MAPPING")) {
    p.SetLastApplication("cam2map");
  }
  else {
    p.SetLastApplication("spiceinit");
  }

  p.Run();
}
开发者ID:assutech,项目名称:isis3,代码行数:48,代码来源:thmproc.cpp

示例2: IsisMain

void IsisMain() {
  vector<QString> sTempFiles;
  QString inFile, outFile;

  try {
    // Get user interface
    UserInterface &ui = Application::GetUserInterface();

    bool bRemoveTempFiles = ui.GetBoolean("REMOVE");

    bool bMapping       = ui.GetBoolean("MAPPING");
    bool bIngestion     = ui.GetBoolean("INGESTION");
    bool bHideStripe    = ui.GetBoolean("DESTRIPE");
    bool bNoiseFilter   = ui.GetBoolean("NOISE_FILTER");
    bool bRemoveFurrows = ui.GetBoolean("FURROWS");

    // Get the cube info
    inFile  = ui.GetFileName("FROM");
    outFile = ui.GetFileName("TO");
    Pvl cubeLabel;
    if (bIngestion) {
      int sDotPos = outFile.indexOf('.');
      QString sIngestedFile = outFile.mid(0, sDotPos);
      cubeLabel = Pvl(sIngestedFile + ".lev2.cub");
    }
    else {
      cubeLabel = Pvl(inFile);
    }
    // Get the Summing from the label
    int iSumming = toInt(cubeLabel.findObject("IsisCube").findGroup("Instrument").findKeyword("Summing")[0]);

    Pipeline p1("hicalproc1");
    p1.SetInputFile("FROM");
    p1.SetOutputFile(FileName("$TEMPORARY/p1_out.cub"));
    sTempFiles.push_back(FileName("$TEMPORARY/p1_out.cub").expanded());
    p1.KeepTemporaryFiles(!bRemoveTempFiles);

    // If Raw image convert to Isis format
    p1.AddToPipeline("hi2isis");
    p1.Application("hi2isis").SetInputParameter ("FROM", false);
    p1.Application("hi2isis").SetOutputParameter("TO", "lev2");
    if (!bIngestion) {
      p1.Application("hi2isis").Disable();
    }

    // Run spiceinit
    p1.AddToPipeline("spiceinit");
    p1.Application("spiceinit").SetInputParameter("FROM", false);
    p1.Application("spiceinit").AddConstParameter("ATTACH", "NO");
    p1.Application("spiceinit").AddParameter     ("PCK", "PCK");
    p1.Application("spiceinit").AddParameter     ("CK", "CK");
    p1.Application("spiceinit").AddParameter     ("SPK", "SPK");
    p1.Application("spiceinit").AddParameter     ("SHAPE", "SHAPE");
    p1.Application("spiceinit").AddParameter     ("MODEL", "MODEL");
    p1.Application("spiceinit").AddParameter     ("CKNADIR", "CKNADIR");
    if (!bMapping) {
      p1.Application("spiceinit").Disable();
    }

    p1.AddToPipeline("hifurrows");
    p1.Application("hifurrows").SetInputParameter ("FROM",        false);
    p1.Application("hifurrows").SetOutputParameter("TO",          "rmfrw");
    p1.Application("hifurrows").AddConstParameter ("NEW_VERSION", "true");
    p1.Application("hifurrows").AddConstParameter ("LOWPASS",     "true");
    if (!bRemoveFurrows) {
      p1.Application("hifurrows").Disable();
    }

    // MASK if NoiseFilter==true
    p1.AddToPipeline("mask");
    // if nothing to mask, continue even if app generates an exception
    p1.Application("mask").SetContinue(true);
    p1.Application("mask").SetInputParameter ("FROM",     false);
    p1.Application("mask").SetOutputParameter("TO",       "mask1");
    p1.Application("mask").AddConstParameter ("MINIMUM",  "1200");
    p1.Application("mask").AddConstParameter ("MAXIMUM",  "16383");
    p1.Application("mask").AddConstParameter ("PRESERVE", "INSIDE");
    p1.Application("mask").AddConstParameter ("SPIXELS",  "NONE");
    if (!bNoiseFilter) {
      p1.Application("mask").Disable();
    }

    // There is no ouput created as the Furrows and Noise Filter apps are disabled
    // Hence just copy the input to the output
    if (!bIngestion && !bMapping && !bRemoveFurrows && !bNoiseFilter) {
      p1.AddToPipeline("crop");
      p1.Application("crop").SetInputParameter ("FROM", false);
      p1.Application("crop").SetOutputParameter("TO",   "copy");
    }
#ifdef _DEBUG_
    cout << p1 << endl;
    cout << "*****************************************************************\n";
#endif
    p1.Run();


    Pipeline pStats;
    pStats.SetInputFile(FileName("$TEMPORARY/p1_out.cub"));
    pStats.SetOutputFile(FileName("$TEMPORARY/statsMask"));
    sTempFiles.push_back(FileName("$TEMPORARY/statsMask").expanded());
//.........这里部分代码省略.........
开发者ID:corburn,项目名称:ISIS,代码行数:101,代码来源:hicalproc.cpp


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