本文整理汇总了C++中ProcessByLine::PropagatePolygons方法的典型用法代码示例。如果您正苦于以下问题:C++ ProcessByLine::PropagatePolygons方法的具体用法?C++ ProcessByLine::PropagatePolygons怎么用?C++ ProcessByLine::PropagatePolygons使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProcessByLine
的用法示例。
在下文中一共展示了ProcessByLine::PropagatePolygons方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fileLab
/**
* Set the output cube to specified file name and specified input images
* and output attributes and lat,lons
*/
Isis::Cube *ProcessMapMosaic::SetOutputCube(const QString &inputFile,
double xmin, double xmax, double ymin, double ymax,
double slat, double elat, double slon, double elon, int nbands,
CubeAttributeOutput &oAtt, const QString &mosaicFile) {
Pvl fileLab(inputFile);
PvlGroup &mapping = fileLab.findGroup("Mapping", Pvl::Traverse);
mapping["UpperLeftCornerX"] = toString(xmin);
mapping["UpperLeftCornerY"] = toString(ymax);
mapping.addKeyword(PvlKeyword("MinimumLatitude", toString(slat)), Pvl::Replace);
mapping.addKeyword(PvlKeyword("MaximumLatitude", toString(elat)), Pvl::Replace);
mapping.addKeyword(PvlKeyword("MinimumLongitude", toString(slon)), Pvl::Replace);
mapping.addKeyword(PvlKeyword("MaximumLongitude", toString(elon)), Pvl::Replace);
Projection *firstProj = ProjectionFactory::CreateFromCube(fileLab);
int samps = (int)(ceil(firstProj->ToWorldX(xmax) - firstProj->ToWorldX(xmin)) + 0.5);
int lines = (int)(ceil(firstProj->ToWorldY(ymin) - firstProj->ToWorldY(ymax)) + 0.5);
delete firstProj;
if (p_createMosaic) {
Pvl newMap;
newMap.addGroup(mapping);
// Initialize the mosaic
CubeAttributeInput inAtt;
ProcessByLine p;
p.SetInputCube(inputFile, inAtt);
p.PropagateHistory(false);
p.PropagateLabels(false);
p.PropagateTables(false);
p.PropagatePolygons(false);
p.PropagateOriginalLabel(false);
// If track set, create the origin band
if (GetTrackFlag()) {
nbands += 1;
}
// For average priority, get the new band count
else if (GetImageOverlay() == AverageImageWithMosaic) {
nbands *= 2;
}
Cube *ocube = p.SetOutputCube(mosaicFile, oAtt, samps, lines, nbands);
p.Progress()->SetText("Initializing mosaic");
p.ClearInputCubes();
p.StartProcess(ProcessMapMosaic::FillNull);
// CreateForCube created some keywords in the mapping group that needs to be added
ocube->putGroup(newMap.findGroup("Mapping", Pvl::Traverse));
p.EndProcess();
}
Cube *mosaicCube = new Cube();
mosaicCube->open(mosaicFile, "rw");
mosaicCube->addCachingAlgorithm(new UniqueIOCachingAlgorithm(2));
AddOutputCube(mosaicCube);
return mosaicCube;
}