本文整理汇总了C++中Process::ClearInputCubes方法的典型用法代码示例。如果您正苦于以下问题:C++ Process::ClearInputCubes方法的具体用法?C++ Process::ClearInputCubes怎么用?C++ Process::ClearInputCubes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Process
的用法示例。
在下文中一共展示了Process::ClearInputCubes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: IsisMain
//.........这里部分代码省略.........
// Get the radii
double radii[3];
cam->Radii(radii);
eqRad = radii[0] * 1000.0;
eq2Rad = radii[1] * 1000.0;
poleRad = radii[2] * 1000.0;
target = cam->Target();
equiRadStat.AddData(&eqRad, 1);
poleRadStat.AddData(&poleRad, 1);
// Get resolution
double lowres = cam->LowestImageResolution();
double hires = cam->HighestImageResolution();
scaleStat.AddData(&lowres, 1);
scaleStat.AddData(&hires, 1);
double pixres = (lowres+hires)/2.0;
double scale = Scale(pixres, poleRad, eqRad);
mapgrp.AddKeyword(PvlKeyword("PixelResolution",pixres),Pvl::Replace);
mapgrp.AddKeyword(PvlKeyword("Scale",scale,"pixels/degree"),Pvl::Replace);
mapgrp += PvlKeyword("MinPixelResolution",lowres,"meters");
mapgrp += PvlKeyword("MaxPixelResolution",hires,"meters");
// Get the universal ground range
double minlat,maxlat,minlon,maxlon;
cam->GroundRange(minlat,maxlat,minlon,maxlon,mapping);
mapgrp.AddKeyword(PvlKeyword("MinimumLatitude",minlat),Pvl::Replace);
mapgrp.AddKeyword(PvlKeyword("MaximumLatitude",maxlat),Pvl::Replace);
mapgrp.AddKeyword(PvlKeyword("MinimumLongitude",minlon),Pvl::Replace);
mapgrp.AddKeyword(PvlKeyword("MaximumLongitude",maxlon),Pvl::Replace);
fmap.AddGroup(mapgrp);
fileset.AddObject(fmap);
longitudeStat.AddData(&minlon, 1);
longitudeStat.AddData(&maxlon, 1);
latitudeStat.AddData(&minlat, 1);
latitudeStat.AddData(&maxlat, 1);
p.ClearInputCubes();
prog.CheckStatus();
}
// Construct the output mapping group with statistics
PvlGroup mapping("Mapping");
double avgPixRes((scaleStat.Minimum()+scaleStat.Maximum())/2.0);
double avgLat((latitudeStat.Minimum()+latitudeStat.Maximum())/2.0);
double avgLon((longitudeStat.Minimum()+longitudeStat.Maximum())/2.0);
double avgEqRad((equiRadStat.Minimum()+equiRadStat.Maximum())/2.0);
double avgPoleRad((poleRadStat.Minimum()+poleRadStat.Maximum())/2.0);
double scale = Scale(avgPixRes, avgPoleRad, avgEqRad);
mapping += PvlKeyword("ProjectionName",projection);
mapping += PvlKeyword("TargetName", target);
mapping += PvlKeyword("EquatorialRadius",eqRad,"meters");
mapping += PvlKeyword("PolarRadius",poleRad,"meters");
mapping += PvlKeyword("LatitudeType",lattype);
mapping += PvlKeyword("LongitudeDirection",londir);
mapping += PvlKeyword("LongitudeDomain",londom);
mapping += PvlKeyword("PixelResolution", SetRound(avgPixRes, digits), "meters/pixel");
mapping += PvlKeyword("Scale", SetRound(scale, digits), "pixels/degree");
mapping += PvlKeyword("MinPixelResolution",scaleStat.Minimum(),"meters");
mapping += PvlKeyword("MaxPixelResolution",scaleStat.Maximum(),"meters");
mapping += PvlKeyword("CenterLongitude", SetRound(avgLon,digits));
mapping += PvlKeyword("CenterLatitude", SetRound(avgLat,digits));
mapping += PvlKeyword("MinimumLatitude", MAX(SetFloor(latitudeStat.Minimum(),digits), -90.0));
mapping += PvlKeyword("MaximumLatitude", MIN(SetCeil(latitudeStat.Maximum(),digits), 90.0));
mapping += PvlKeyword("MinimumLongitude",MAX(SetFloor(longitudeStat.Minimum(),digits), -180.0));
mapping += PvlKeyword("MaximumLongitude",MIN(SetCeil(longitudeStat.Maximum(),digits), 360.0));
PvlKeyword clat("PreciseCenterLongitude", avgLon);
clat.AddComment("Actual Parameters without precision applied");
mapping += clat;
mapping += PvlKeyword("PreciseCenterLatitude", avgLat);
mapping += PvlKeyword("PreciseMinimumLatitude", latitudeStat.Minimum());
mapping += PvlKeyword("PreciseMaximumLatitude", latitudeStat.Maximum());
mapping += PvlKeyword("PreciseMinimumLongitude",longitudeStat.Minimum());
mapping += PvlKeyword("PreciseMaximumLongitude",longitudeStat.Maximum());
Application::GuiLog(mapping);
// Write the output file if requested
if (ui.WasEntered("TO")) {
Pvl temp;
temp.AddGroup(mapping);
temp.Write(ui.GetFilename("TO","map"));
}
if (ui.WasEntered("LOG")) {
Pvl temp;
temp.AddObject(fileset);
temp.Write(ui.GetFilename("LOG","log"));
}
p.EndProcess();
}
示例2: IsisMain
//.........这里部分代码省略.........
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();
}
// Report Stereo separation angles