本文整理汇总了C++中GeoImage::mergeInto方法的典型用法代码示例。如果您正苦于以下问题:C++ GeoImage::mergeInto方法的具体用法?C++ GeoImage::mergeInto怎么用?C++ GeoImage::mergeInto使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GeoImage
的用法示例。
在下文中一共展示了GeoImage::mergeInto方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: prepareResultImage
/** Prepare the result image with the given instantiated net and the corresponding label image tiles */
void Analysis::prepareResultImage()
{
iNodeRoot_->setNewID(1);
emit message("Preparing result map");
if (!iNodeRoot_->labelImage()) {
qDebug("Analysis::prepareResultImage: no labelimage");
return;
}
int size_x =
int ((geoImageList_->geoEast() -
geoImageList_->geoWest()) / labelImageList_->maxResolution());
int size_y =
int ((geoImageList_->geoNorth() -
geoImageList_->geoSouth()) / labelImageList_->maxResolution());
GeoImage *img = new GeoImage("result.plm", "result", size_x, size_y,
geoImageList_->geoWest(),
geoImageList_->geoNorth(),
geoImageList_->geoEast(),
geoImageList_->geoSouth());
if (!img->mergeInto(*(iNodeRoot_->labelImage()), 0,
iNodeRoot_->attributeInt("id"),
iNodeRoot_->attributeInt("IDStart"))) {
iNodeRoot_->attribute("status", "deleted");
}
iNodeRoot_->mergeResultImage(*img);
img->write();
map_ = img;
emit sigMapView(iNodeRoot_, map_);
#ifdef DEBUGMSG
qDebug("Analysis::prepareResultImage: image=(%dx%d)", size_x, size_y);
#endif
}
示例2: mergeResultImage
/** merge inodes labelimage into the result image */
void INode::mergeResultImage(GeoImage & resultImg, RunLengthLabelImage &rlelabelimage)
{
qDebug("INode::mergeResultImage: name=%s", name_.latin1());
QListIterator < INode > it = QListIterator < INode > (children());
for (; it.current(); ++it)
{
INode *node = it.current();
if (node->status() == TRASH)
continue;
RunLengthLabelImage copylabelimage = rlelabelimage;
if (node->labelImage() && node->attributeInt("id"))
{
// id==0 is background and should not be merged into the result image
if (!resultImg.mergeInto(*(node->labelImage()), attributeInt("IDStart"),
node->attributeInt("id"), node->attributeInt("IDStart"), copylabelimage))
node->attribute("status", "deleted");
}
else
{
node->attribute("status", "no labelimage");
qDebug("INode::mergeResultImage: %s ommitted", (const char *) node->name());
}
if (node->attributeInt("id"))
{
// id==0 is background and should not be merged into the result image
node->mergeResultImage(resultImg, copylabelimage);
}
else
{
qDebug("INode::mergeResultImage: %s ommitted", (const char *) node->name());
}
}
}