本文整理汇总了C++中Process::SetOutputCube方法的典型用法代码示例。如果您正苦于以下问题:C++ Process::SetOutputCube方法的具体用法?C++ Process::SetOutputCube怎么用?C++ Process::SetOutputCube使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Process
的用法示例。
在下文中一共展示了Process::SetOutputCube方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: IsisMain
//.........这里部分代码省略.........
expandFlag = 0;
// Framing cameras don't need exposure time
}
// Adjust focal plane translations with line expansion for scanners since
// the CCD is only 1 line
if(expandFlag) {
transl += lineExpansion / 2;
if(xDepend == CameraFocalPlaneMap::Line) {
transx -= lineExpansion / 2.*pixPitch * expandFlag;
}
else {
transy -= lineExpansion / 2.*pixPitch * expandFlag;
}
}
// Get the start time for parent line 1
AlphaCube alpha(*icube);
double sample = alpha.BetaSample(.5);
double line = alpha.BetaLine(.5);
incam->SetImage(sample, line);
double et = incam->time().Et();
// Get the output file name and set its attributes
CubeAttributeOutput cao;
// Can we do a regular label? Didn't work on 12-15-2006
cao.setLabelAttachment(Isis::DetachedLabel);
// Determine the output image size from
// 1) the idealInstrument pvl if there or
// 2) the input size expanded by user specified percentage
Cube *ocube = p.SetOutputCube("match.cub", cao, 1, 1, 1);
// Extract the times and the target from the instrument group
QString startTime = inst["StartTime"];
QString stopTime;
if(inst.hasKeyword("StopTime")) stopTime = (QString) inst["StopTime"];
QString target = inst["TargetName"];
// rename the instrument groups
inst.setName("OriginalInstrument");
fromInst.setName("OriginalInstrument");
// add it back to the IsisCube object under a new group name
ocube->putGroup(inst);
// and remove the version from the IsisCube Object
ocube->deleteGroup("Instrument");
// Now rename the group back to the Instrument group and clear out old keywords
inst.setName("Instrument");
inst.clear();
// Add keywords for the "Ideal" instrument
Isis::PvlKeyword key("SpacecraftName", "IdealSpacecraft");
inst.addKeyword(key);
key.setName("InstrumentId");
key.setValue("IdealCamera");
inst.addKeyword(key);
key.setName("TargetName");
key.setValue(target);
示例2: IsisMain
//.........这里部分代码省略.........
double sline = line + (j * space);
Coordinate pnt = Coordinate(sline, ssamp);
SmtkPoint gpnt = matcher.Clone(spnt, pnt);
if ( gpnt.isValid() ) {
SmtkQPair growpt((int) sline, (int) ssamp);
// double check we don't have a finalized result at this position
SmtkQStackIter temp = bmf.find(growpt);
if(temp == bmf.end()) {
gstack.insert(growpt, gpnt);
}
}
}
}
}
}
}
// Remove the current point from the grow stack (hole)
gstack.erase(cstack);
}
/////////////////////////////////////////////////////////////////////////
// All done with creating points. Perform output options.
/////////////////////////////////////////////////////////////////////////
// If a TO parameter was specified, create DEM with errors
if (ui.WasEntered("TO")) {
// Create the output DEM
cout << "\nCreating output DEM from " << bmf.size() << " points.\n";
Process p;
Cube *icube = p.SetInputCube("FROM");
Cube *ocube = p.SetOutputCube("TO", icube->sampleCount(),
icube->lineCount(), 3);
p.ClearInputCubes();
int boxsize = ui.GetInteger("BOXSIZE");
double plotdist = ui.GetDouble("PLOTDIST");
TileManager dem(*ocube), eigen(*ocube), stErr(*ocube);
dem.SetTile(1, 1); // DEM Data/elevation
stErr.SetTile(1, 2); // Error in stereo computation
eigen.SetTile(1, 3); // Eigenvalue of the solution
int nBTiles(eigen.Tiles()/3); // Total tiles / 3 bands
prog.SetText("Creating DEM");
prog.SetMaximumSteps(nBTiles);
prog.CheckStatus();
Statistics stAng;
while ( !eigen.end() ) { // Must use the last band for this!!
PointPlot tm = for_each(bmf.begin(), bmf.end(), PointPlot(dem, plotdist));
tm.FillPoints(*lhCamera, *rhCamera, boxsize, dem, stErr, eigen, &stAng);
ocube->write(dem);
ocube->write(stErr);
ocube->write(eigen);
dem.next();
stErr.next();
eigen.next();
prog.CheckStatus();
}