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);
83 QDialogButtonBox * buttonBox =
new QDialogButtonBox(
this);
84 buttonBox->setStandardButtons(QDialogButtonBox::Close);
85 connect(buttonBox, SIGNAL(rejected()),
this, SLOT(reject()));
87 QHBoxLayout * layout2 =
new QHBoxLayout();
88 layout2->addWidget(
pause_);
89 layout2->addWidget(decimationLabel);
94 layout2->addStretch(1);
95 layout2->addWidget(buttonBox);
97 QVBoxLayout * vlayout =
new QVBoxLayout(
this);
98 vlayout->setMargin(0);
99 vlayout->setSpacing(0);
100 vlayout->addLayout(layout, 1);
101 vlayout->addLayout(layout2);
103 this->setLayout(vlayout);
118 sizes.append(QString(
"Color=%1x%2").arg(data.
imageRaw().cols).arg(data.
imageRaw().rows));
212 QMetaObject::invokeMethod(
this,
"showImage",
void setCloudVisibility(const std::string &id, bool isVisible)
QCheckBox * showScanCheckbox_
pcl::PointCloud< pcl::PointXYZRGBNormal >::Ptr RTABMAP_EXP laserScanToPointCloudRGBNormal(const LaserScan &laserScan, const Transform &transform=Transform(), unsigned char r=100, unsigned char g=100, unsigned char b=100)
const cv::Mat & depthOrRightRaw() const
QImage uCvMat2QImage(const cv::Mat &image, bool isBgr=true, uCvQtDepthColorMap colorMap=uCvQtDepthWhiteToBlack, float depthMin=0, float depthMax=0)
const std::vector< StereoCameraModel > & stereoCameraModels() const
std::map< std::string, std::string > ParametersMap
void setImage(const QImage &image)
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)
pcl::PointCloud< pcl::PointXYZRGB >::Ptr RTABMAP_EXP laserScanToPointCloudRGB(const LaserScan &laserScan, const Transform &transform=Transform(), unsigned char r=100, unsigned char g=100, unsigned char b=100)
const std::vector< CameraModel > & cameraModels() const
virtual std::string getClassName() const =0
pcl::PointCloud< pcl::PointXYZINormal >::Ptr RTABMAP_EXP laserScanToPointCloudINormal(const LaserScan &laserScan, const Transform &transform=Transform(), float intensity=0.0f)
void setImageDepth(const cv::Mat &imageDepth)
const cv::Mat & imageRaw() const
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_
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_
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)
const LaserScan & laserScanRaw() const
pcl::PointCloud< pcl::PointNormal >::Ptr RTABMAP_EXP laserScanToPointCloudNormal(const LaserScan &laserScan, const Transform &transform=Transform())
virtual bool handleEvent(UEvent *event)
ULogger class and convenient macros.
bool hasIntensity() const
void unregisterFromEventsManager()
pcl::PointCloud< pcl::PointXYZI >::Ptr RTABMAP_EXP laserScanToPointCloudI(const LaserScan &laserScan, const Transform &transform=Transform(), float intensity=0.0f)
const QMap< std::string, Transform > & getAddedClouds() const
Transform localTransform() const
const SensorData & data() const
void setImageDepthShown(bool shown)