mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-01 17:10:26 +08:00
Added tiff as image type supported, fixed a crash on Mac OS X Maverick when showing the GraphView
This commit is contained in:
@@ -135,11 +135,11 @@ bool CameraImages::init()
|
||||
UDEBUG("");
|
||||
if(_dir)
|
||||
{
|
||||
_dir->setPath(_path, "jpg ppm png bmp pnm");
|
||||
_dir->setPath(_path, "jpg ppm png bmp pnm tiff");
|
||||
}
|
||||
else
|
||||
{
|
||||
_dir = new UDirectory(_path, "jpg ppm png bmp pnm");
|
||||
_dir = new UDirectory(_path, "jpg ppm png bmp pnm tiff");
|
||||
}
|
||||
_count = 0;
|
||||
if(_path[_path.size()-1] != '\\' && _path[_path.size()-1] != '/')
|
||||
|
||||
@@ -1412,6 +1412,10 @@ void DBDriverSqlite3::loadLinksQuery(
|
||||
{
|
||||
memcpy(transform.data(), data, dataSize);
|
||||
}
|
||||
else if(dataSize)
|
||||
{
|
||||
UERROR("Error while loading link transform from %d to %d! Setting to null...", signatureId, toId);
|
||||
}
|
||||
|
||||
if(uStrNumCmp(_version, "0.7.4") >= 0)
|
||||
{
|
||||
@@ -1497,8 +1501,14 @@ void DBDriverSqlite3::loadLinksQuery(std::list<Signature *> & signatures) const
|
||||
data = sqlite3_column_blob(ppStmt, index);
|
||||
dataSize = sqlite3_column_bytes(ppStmt, index++);
|
||||
Transform transform;
|
||||
UASSERT((unsigned int)dataSize == transform.size()*sizeof(float) && data);
|
||||
memcpy(transform.data(), data, dataSize);
|
||||
if((unsigned int)dataSize == transform.size()*sizeof(float) && data)
|
||||
{
|
||||
memcpy(transform.data(), data, dataSize);
|
||||
}
|
||||
else if(dataSize)
|
||||
{
|
||||
UERROR("Error while loading link transform from %d to %d! Setting to null...", (*iter)->id(), toId);
|
||||
}
|
||||
|
||||
if(linkType >= 0 && linkType != Link::kUndef)
|
||||
{
|
||||
|
||||
@@ -160,7 +160,7 @@ GraphViewer::GraphViewer(QWidget * parent) :
|
||||
_workingDirectory = QDir::homePath();
|
||||
|
||||
this->scene()->clear();
|
||||
_root = (QGraphicsItem *)this->scene()->addEllipse(QRectF(0,0,0,0));
|
||||
_root = (QGraphicsItem *)this->scene()->addEllipse(QRectF(-0.0001,-0.0001,0.0001,0.0001));
|
||||
|
||||
// add referential
|
||||
QGraphicsLineItem * item = this->scene()->addLine(0,0,0,-1, QPen(QBrush(Qt::red), _linkWidth));
|
||||
|
||||
@@ -1747,7 +1747,7 @@ void PreferencesDialog::selectSourceImage(Src src)
|
||||
if(!path.isEmpty() && dir.exists())
|
||||
{
|
||||
QStringList filters;
|
||||
filters << "*.jpg" << "*.ppm" << "*.bmp" << "*.png" << "*.pnm";
|
||||
filters << "*.jpg" << "*.ppm" << "*.bmp" << "*.png" << "*.pnm" << "*.tiff";
|
||||
dir.setNameFilters(filters);
|
||||
QFileInfoList files = dir.entryInfoList();
|
||||
if(!files.empty())
|
||||
|
||||
Reference in New Issue
Block a user