38 #include <QtCore/QMetaType> 39 #include <QHBoxLayout> 40 #include <QVBoxLayout> 43 #include <QDialogButtonBox> 45 #include <QPushButton> 54 processingImages_(
false),
55 validDecimationValue_(2),
56 parameters_(parameters)
58 qRegisterMetaType<rtabmap::SensorData>(
"rtabmap::SensorData");
62 QHBoxLayout * layout =
new QHBoxLayout();
67 QLabel * decimationLabel =
new QLabel(
"Decimation",
this);
73 pause_ =
new QPushButton(
"Pause",
this);
74 pause_->setCheckable(
true);
81 QDialogButtonBox * buttonBox =
new QDialogButtonBox(
this);
82 buttonBox->setStandardButtons(QDialogButtonBox::Close);
83 connect(buttonBox, SIGNAL(rejected()),
this, SLOT(reject()));
85 QHBoxLayout * layout2 =
new QHBoxLayout();
86 layout2->addWidget(
pause_);
87 layout2->addWidget(decimationLabel);
91 layout2->addStretch(1);
92 layout2->addWidget(buttonBox);
94 QVBoxLayout * vlayout =
new QVBoxLayout(
this);
95 vlayout->setMargin(0);
96 vlayout->setSpacing(0);
97 vlayout->addLayout(layout, 1);
98 vlayout->addLayout(layout2);
100 this->setLayout(vlayout);
121 UWARN(
"Decimation (%d) must be a denominator of the width and height of " 122 "the image (color=%d/%d depth=%d/%d). Using last valid decimation value (%d).",
184 processingImages_ =
false;
201 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())
bool addCloud(const std::string &id, const pcl::PCLPointCloud2Ptr &binaryCloud, const Transform &pose, bool rgb, bool hasNormals, bool hasIntensity, const QColor &color=QColor())
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)
cv::Mat RTABMAP_EXP decimate(const cv::Mat &image, int d)
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
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)
int validDecimationValue_
ULogger class and convenient macros.
const StereoCameraModel & stereoCameraModel() const
const SensorData & data() const
void unregisterFromEventsManager()
void setImageDepthShown(bool shown)