38 #include <QtCore/QMetaType> 39 #include <QHBoxLayout> 40 #include <QVBoxLayout> 43 #include <QDialogButtonBox> 45 #include <QPushButton> 54 processingImages_(
false),
55 parameters_(parameters)
57 qRegisterMetaType<rtabmap::SensorData>(
"rtabmap::SensorData");
61 QHBoxLayout * layout =
new QHBoxLayout();
66 QLabel * decimationLabel =
new QLabel(
"Decimation",
this);
72 pause_ =
new QPushButton(
"Pause",
this);
73 pause_->setCheckable(
true);
82 QDialogButtonBox * buttonBox =
new QDialogButtonBox(
this);
83 buttonBox->setStandardButtons(QDialogButtonBox::Close);
84 connect(buttonBox, SIGNAL(rejected()),
this, SLOT(reject()));
86 QHBoxLayout * layout2 =
new QHBoxLayout();
87 layout2->addWidget(
pause_);
88 layout2->addWidget(decimationLabel);
93 layout2->addStretch(1);
94 layout2->addWidget(buttonBox);
96 QVBoxLayout * vlayout =
new QVBoxLayout(
this);
97 vlayout->setMargin(0);
98 vlayout->setSpacing(0);
99 vlayout->addLayout(layout, 1);
100 vlayout->addLayout(layout2);
102 this->setLayout(vlayout);
117 sizes.append(QString(
"Color=%1x%2").arg(data.
imageRaw().cols).arg(data.
imageRaw().rows));
185 QMetaObject::invokeMethod(
this,
"showImage",
void setCloudVisibility(const std::string &id, bool isVisible)
QCheckBox * showScanCheckbox_
std::map< std::string, std::string > ParametersMap
void setImage(const QImage &image)
const LaserScan & laserScanRaw() const
const cv::Mat & imageRaw() const
pcl::PointCloud< pcl::PointXYZ >::Ptr RTABMAP_EXP laserScanToPointCloud(const LaserScan &laserScan, const Transform &transform=Transform())
CameraViewer(QWidget *parent=0, const ParametersMap ¶meters=ParametersMap())
LaserScan RTABMAP_EXP downsample(const LaserScan &cloud, int step)
bool isValidForProjection() const
QImage uCvMat2QImage(const cv::Mat &image, bool isBgr=true, uCvQtDepthColorMap colorMap=uCvQtDepthWhiteToBlack)
virtual std::string getClassName() const =0
void setImageDepth(const cv::Mat &imageDepth)
pcl::PointCloud< pcl::PointXYZRGB >::Ptr RTABMAP_EXP cloudRGBFromSensorData(const SensorData &sensorData, int decimation=1, float maxDepth=0.0f, float minDepth=0.0f, std::vector< int > *validIndices=0, const ParametersMap &stereoParameters=ParametersMap(), const std::vector< float > &roiRatios=std::vector< float >())
QCheckBox * showCloudCheckbox_
QSpinBox * decimationSpin_
const cv::Mat & depthOrRightRaw() const
const QMap< std::string, Transform > & getAddedClouds() const
bool addCloud(const std::string &id, const pcl::PCLPointCloud2Ptr &binaryCloud, const Transform &pose, bool rgb, bool hasNormals, bool hasIntensity, const QColor &color=QColor(), int viewport=1)
ParametersMap parameters_
const std::vector< CameraModel > & cameraModels() const
pcl::PointCloud< pcl::PointXYZ >::Ptr RTABMAP_EXP cloudFromSensorData(const SensorData &sensorData, int decimation=1, float maxDepth=0.0f, float minDepth=0.0f, std::vector< int > *validIndices=0, const ParametersMap &stereoParameters=ParametersMap(), const std::vector< float > &roiRatios=std::vector< float >())
void showImage(const rtabmap::SensorData &data)
virtual bool handleEvent(UEvent *event)
ULogger class and convenient macros.
const StereoCameraModel & stereoCameraModel() const
const SensorData & data() const
void unregisterFromEventsManager()
void setImageDepthShown(bool shown)