本文整理汇总了C++中Process::PropagatePolygons方法的典型用法代码示例。如果您正苦于以下问题:C++ Process::PropagatePolygons方法的具体用法?C++ Process::PropagatePolygons怎么用?C++ Process::PropagatePolygons使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Process
的用法示例。
在下文中一共展示了Process::PropagatePolygons方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: IsisMain
void IsisMain() {
// Create a process so we can output the noproj'd labels without overwriting
Process p;
// Open the user interface and get the input file and the ideal specs file
UserInterface &ui = Application::GetUserInterface();
Cube *mcube, *icube;
// If a MATCH cube is entered, make sure to SetInputCube it first to get the SPICE blobs
// from it propagated to the TO labels
// Until polygon blobs are detached without "/" don't propagate them
p.PropagatePolygons(false);
if((ui.WasEntered("MATCH"))) {
mcube = p.SetInputCube("MATCH");
icube = p.SetInputCube("FROM");
}
else {
mcube = icube = p.SetInputCube("FROM");
}
Camera *incam = mcube->camera();
// Extract Instrument groups from input labels for the output match and noproj'd cubes
PvlGroup inst = mcube->group("Instrument");
PvlGroup fromInst = icube->group("Instrument");
QString groupName = (QString) inst["SpacecraftName"] + "/";
groupName += (QString) inst.findKeyword("InstrumentId");
// Get Ideal camera specifications
FileName specs;
if((ui.WasEntered("SPECS"))) {
specs = ui.GetFileName("SPECS");
}
else {
specs = "$base/applications/noprojInstruments???.pvl";
specs = specs.highestVersion();
}
Pvl idealSpecs(specs.expanded());
PvlObject obSpecs = idealSpecs.findObject("IdealInstrumentsSpecifications");
PvlGroup idealGp = obSpecs.findGroup(groupName);
double transx, transy, transl, transs;
transx = transy = transl = transs = 0.;
if(idealGp.hasKeyword("TransX")) transx = idealGp["TransX"];
if(idealGp.hasKeyword("TransY")) transy = idealGp["TransY"];
if(idealGp.hasKeyword("ItransL")) transl = idealGp["ItransL"];
if(idealGp.hasKeyword("ItransS")) transs = idealGp["ItransS"];
int detectorSamples = mcube->sampleCount();
if(idealGp.hasKeyword("DetectorSamples")) detectorSamples = idealGp["DetectorSamples"];
int numberLines = mcube->lineCount();
int numberBands = mcube->bandCount();
if(idealGp.hasKeyword("DetectorLines")) numberLines = idealGp["DetectorLines"];
int xDepend = incam->FocalPlaneMap()->FocalPlaneXDependency();
// Get output summing mode
if(ui.GetString("SOURCE") == "FROMMATCH") {
LoadMatchSummingMode();
}
else if(ui.GetString("SOURCE") == "FROMINPUT") {
LoadInputSummingMode();
}
double pixPitch = incam->PixelPitch() * ui.GetDouble("SUMMINGMODE");
detectorSamples /= (int)(ui.GetDouble("SUMMINGMODE"));
// Get the user options
int sampleExpansion = int((ui.GetDouble("SAMPEXP") / 100.) * detectorSamples + .5);
int lineExpansion = int((ui.GetDouble("LINEEXP") / 100.) * numberLines + .5);
QString instType;
// Adjust translations for summing mode
transl /= ui.GetDouble("SUMMINGMODE");
transs /= ui.GetDouble("SUMMINGMODE");
detectorSamples += sampleExpansion;
numberLines += lineExpansion;
// Determine whether this ideal camera is a line scan or framing camera and
// set the instrument id and exposure
int detectorLines;
int expandFlag;
if(incam->DetectorMap()->LineRate() != 0.0) {
instType = "LINESCAN";
// Isis3 line rate is always in seconds so convert to milliseconds for the
// Ideal instrument
detectorLines = 1;
expandFlag = 1;
}
else {
instType = "FRAMING";
detectorLines = numberLines;
expandFlag = 0;
// Framing cameras don't need exposure time
}
//.........这里部分代码省略.........