DbViewer: added mapId

git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1561 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
matlabbe
2014-07-14 19:16:26 +00:00
parent 2479272161
commit 6e7dde2aea
3 changed files with 28 additions and 4 deletions

View File

@@ -690,6 +690,7 @@ void DatabaseViewer::update(int value,
{
view->clear();
int id = ids_.at(value);
int mapId = -1;
labelId->setText(QString::number(id));
if(id>0)
{
@@ -712,15 +713,14 @@ void DatabaseViewer::update(int value,
{
imgDepth = uCvMat2QImage(depthMat);
}
}
if(memory_)
{
std::multimap<int, cv::KeyPoint> words = memory_->getWords(id);
if(words.size())
{
view->setFeatures(words);
}
mapId = memory_->getMapId(id);
}
if(!img.isNull())
@@ -765,7 +765,14 @@ void DatabaseViewer::update(int value,
}
}
labelId->setText(QString::number(id));
if(mapId>=0)
{
labelId->setText(QString("%1 [%2]").arg(id).arg(mapId));
}
else
{
labelId->setText(QString::number(id));
}
view->fitInView(view->scene()->itemsBoundingRect(), Qt::KeepAspectRatio);
}
else