ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
HSVDialog.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 // ##########################################################################
11 // # #
12 // # CLOUDVIEWER PLUGIN: ColorimetricSegmenter #
13 // # #
14 // # This program is free software; you can redistribute it and/or modify #
15 // # it under the terms of the GNU General Public License as published by #
16 // # the Free Software Foundation; version 2 of the License. #
17 // # #
18 // # This program is distributed in the hope that it will be useful, #
19 // # but WITHOUT ANY WARRANTY; without even the implied warranty of #
20 // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
21 // # GNU General Public License for more details. #
22 // # #
23 // # COPYRIGHT: Tri-Thien TRUONG, Ronan COLLIER, Mathieu LETRONE #
24 // # #
25 // ##########################################################################
26 
27 #include <ecvPickingListener.h>
28 #include <ui_HSVDialog.h>
29 
30 // Qt
31 #include <QDialog>
32 
33 class ccPickingHub;
34 
35 /*
36  Get the values of the HSV interface, and interactions
37 */
38 class HSVDialog : public QDialog,
39  public ccPickingListener,
40  public Ui::HSVDialog {
41  Q_OBJECT
42 public:
43  explicit HSVDialog(ccPickingHub* pickingHub, QWidget* parent = nullptr);
44 
46  virtual void onItemPicked(const PickedItem& pi);
47 
48 public slots:
49  void pickPoint(bool);
50  void updateValues();
51 
52 protected: // members
55 };
ccObject::isKindOf
bool isKindOf(CV_CLASS_ENUM type) const
Definition: ecvObject.h:128
rgb
normal_z rgb
Definition: my_point_types.h:168
HSVDialog
Definition: HSVDialog.h:38
HSVDialog::pickPoint
void pickPoint(bool)
Definition: HSVDialog.cpp:63
Hsv
HSV color.
Definition: HSV.h:31
Hsv::h
uint16_t h
Definition: HSV.h:66
HSVDialog::onItemPicked
virtual void onItemPicked(const PickedItem &pi)
Inherited from ccPickingListener.
Definition: HSVDialog.cpp:87
Hsv::v
uint16_t v
Definition: HSV.h:66
ccPickingHub::addListener
bool addListener(ccPickingListener *listener, bool exclusive=false, bool autoStartPicking=true, ecvDisplayTools::PICKING_MODE mode=ecvDisplayTools::POINT_OR_TRIANGLE_PICKING)
Adds a listener.
Definition: ecvPickingHub.cpp:104
CVLog::Print
static bool Print(const char *format,...)
Prints out a formatted message in console.
Definition: CVLog.cpp:113
CV_TYPES::POINT_CLOUD
@ POINT_CLOUD
Definition: CVTypes.h:104
ccPickingListener
Point/triangle picking listener interface.
Definition: ecvPickingListener.h:21
CVLog::Error
static bool Error(const char *format,...)
Display an error dialog with formatted message.
Definition: CVLog.cpp:143
slots
#define slots
Definition: PythonPlugin.cpp:25
ccPickingListener::PickedItem::entity
ccHObject * entity
Definition: ecvPickingListener.h:30
ccGenericPointCloud
A 3D cloud interface with associated features (color, normals, octree, etc.)
Definition: ecvGenericPointCloud.h:45
HSVDialog::HSVDialog
HSVDialog(ccPickingHub *pickingHub, QWidget *parent=nullptr)
Definition: HSVDialog.cpp:25
ecvGenericPointCloud.h
Ui
Definition: sfEditDlg.h:16
ecvColor::green
constexpr Rgb green(0, MAX, 0)
HSVDialog::updateValues
void updateValues()
Definition: HSVDialog.cpp:117
ccGenericPointCloud::getPointColor
virtual const ecvColor::Rgb & getPointColor(unsigned pointIndex) const =0
Returns color corresponding to a given point.
HSVDialog.h
ecvPickingHub.h
Hsv::s
uint16_t s
Definition: HSV.h:66
ecvPickingListener.h
HSVDialog::m_pickingHub
ccPickingHub * m_pickingHub
Picking hub.
Definition: HSVDialog.h:54
ccPickingListener::PickedItem::itemIndex
unsigned itemIndex
Definition: ecvPickingListener.h:31
ecvColor::RgbTpl
RGB color structure.
Definition: ecvColorTypes.h:49
ccPickingHub
Point/triangle picking hub.
Definition: ecvPickingHub.h:29
ecvColor::red
constexpr Rgb red(MAX, 0, 0)
ccPickingListener::PickedItem
Picked item.
Definition: ecvPickingListener.h:26
ecvColor::blue
constexpr Rgb blue(0, 0, MAX)
HSV.h
ccPickingHub::removeListener
void removeListener(ccPickingListener *listener, bool autoStopPickingIfLast=true)
Removes a listener.
Definition: ecvPickingHub.cpp:165