ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cvSelectionPropertiesWidget.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 // clang-format off
11 // Qt - must be included before qPCL.h for MOC to work correctly
12 #include <QtGui/QColor>
13 #include <QtWidgets/QGroupBox>
14 #include <QtWidgets/QLabel>
15 #include <QtCore/QObject>
16 #include <QtWidgets/QPushButton>
17 #include <QtWidgets/QScrollArea>
18 #include <QtWidgets/QSpinBox>
19 #include <QtWidgets/QTableWidget>
20 #include <QtWidgets/QToolButton>
21 #include <QtWidgets/QWidget>
22 // clang-format on
23 
24 // Forward declaration
25 class cvExpanderButton;
26 
27 #include "qPCL.h"
28 
29 // LOCAL
30 #include "cvSelectionBase.h"
31 #include "cvSelectionData.h"
32 #include "cvSelectionHighlighter.h" // For SelectionLabelProperties
33 #include "cvSelectionLabelPropertiesDialog.h" // For LabelProperties
34 
35 // Forward declarations
37 class cvTooltipFormatter;
39 class cvSelectionAlgebra;
40 class cvSelectionFilter;
41 class cvSelectionBookmarks;
43 class vtkPolyData;
44 class QPushButton;
45 class QColorDialog;
46 class QDoubleSpinBox;
47 class QCheckBox;
48 class QComboBox;
49 class QLineEdit;
50 class QMenu;
51 class QVBoxLayout;
52 class QSpinBox;
53 class ccHObject;
54 class QScrollArea;
55 
72  public cvSelectionBase {
73  Q_OBJECT
74 
75 public:
79  struct SavedSelection {
80  QString name; // e.g., "s0", "s1"
81  QString type; // e.g., "ID Selection"
82  QColor color; // Display color
83  cvSelectionData data; // The actual selection data
84  };
85 
86  explicit cvSelectionPropertiesWidget(QWidget* parent = nullptr);
87  ~cvSelectionPropertiesWidget() override;
88 
89  // cvSelectionBase interface
90  void setHighlighter(cvSelectionHighlighter* highlighter);
91  void setSelectionManager(cvViewSelectionManager* manager);
92  void syncUIWithHighlighter();
93 
94  bool updateSelection(const cvSelectionData& selectionData,
95  vtkPolyData* polyData = nullptr);
96  void clearSelection();
97 
98  const cvSelectionData& selectionData() const { return m_selectionData; }
100  return m_selectionManager;
101  }
102 
106  void setDataProducerName(const QString& name);
107 
112  void refreshDataProducers();
113 
114 signals:
115  // Highlight/opacity changes
116  void highlightColorChanged(double r, double g, double b, int mode);
117  void highlightOpacityChanged(double opacity, int mode);
118 
119  // Selection Editor signals
120  void expressionChanged(const QString& expression);
121  void activateCombinedSelectionsRequested();
122  void selectionAdded(const cvSelectionData& selection);
123  void selectionRemoved(int index);
124  void allSelectionsRemoved();
125 
126  // Find Data actions
127  void freezeSelectionRequested();
128  void extractSelectionRequested();
129  // Emitted when extraction is successful
130  void extractedObjectReady(ccHObject* obj);
131  void plotOverTimeRequested();
132  void invertSelectionRequested();
133  void findDataRequested(const QString& dataProducer,
134  const QString& elementType,
135  const QString& attribute,
136  const QString& op,
137  const QString& value);
138 
139  // Legacy signals
140  void algebraOperationRequested(int operation);
141  void bookmarkRequested(const QString& name);
142  void annotationRequested(const QString& text);
143 
144 private slots:
145  // === Selection Display slots ===
146  void onCellLabelsClicked();
147  void onPointLabelsClicked();
148  void onEditLabelPropertiesClicked();
149  void onSelectionColorClicked();
150  void onInteractiveSelectionColorClicked();
151  void onEditInteractiveLabelPropertiesClicked();
152  void onLabelPropertiesApplied(
154  void onInteractiveLabelPropertiesApplied(
156 
157  // === Selection Editor slots ===
158  void onExpressionChanged(const QString& text);
159  void onAddActiveSelectionClicked();
160  void onRemoveSelectedSelectionClicked();
161  void onRemoveAllSelectionsClicked();
162  void onActivateCombinedSelectionsClicked();
163  void onSelectionEditorTableSelectionChanged();
164  void onSelectionEditorCellClicked(int row, int column);
165  void onSelectionEditorCellDoubleClicked(int row, int column);
166 
167  // === Find Data / Selected Data slots ===
168  void onAttributeTypeChanged(int index);
169  void onInvertSelectionToggled(bool checked);
170  void onFreezeClicked();
171  void onExtractClicked();
172  void onPlotOverTimeClicked();
173  void onToggleColumnVisibility();
174  void onToggleFieldDataClicked(bool checked);
175 
176  // Create Selection (Find Data) slots
177  void onDataProducerChanged(int index);
178  void onElementTypeChanged(int index);
179  void onFindDataClicked();
180  void onResetClicked();
181  void onClearClicked();
182  void updateAttributeCombo();
183  void updateDataProducerCombo();
184  void addQueryRow(int index = -1,
185  const QString& attribute = QString(),
186  const QString& op = QString(),
187  const QString& value = QString());
188  void removeQueryRow(int index);
189  void updateQueryRowButtons();
190  void performFindData(const QString& attribute,
191  const QString& op,
192  const QString& value,
193  bool isCell);
194  void onSpreadsheetItemClicked(QTableWidgetItem* item);
195 
196  // Legacy slots (existing functionality)
197  void onHoverColorClicked();
198  void onPreselectedColorClicked();
199  void onSelectedColorClicked();
200  void onBoundaryColorClicked();
201  void onHoverOpacityChanged(double value);
202  void onPreselectedOpacityChanged(double value);
203  void onSelectedOpacityChanged(double value);
204  void onBoundaryOpacityChanged(double value);
205  void onExportToMeshClicked();
206  void onExportToPointCloudClicked();
207  void onSelectionTableItemClicked(QTableWidgetItem* item);
208  void onAlgebraOperationTriggered();
209  // Filter methods removed - UI not implemented
210  // Bookmark methods removed - UI not implemented
211  void onAddAnnotationClicked();
212  void onExtractBoundaryClicked();
213 
214  // Highlighter property change handlers (for external property changes)
215  void onHighlighterColorChanged(int mode);
216  void onHighlighterOpacityChanged(int mode);
217  void onHighlighterLabelPropertiesChanged(bool interactive);
218 
219 protected:
220  // Override eventFilter to handle scroll area resize events
221  bool eventFilter(QObject* obj, QEvent* event) override;
222  // Override resizeEvent to handle widget resize (for drag resize)
223  void resizeEvent(QResizeEvent* event) override;
224 
225 private:
226  void setupUi();
227 
228  // ParaView-style sections
229  void setupSelectedDataHeader();
230  void setupCreateSelectionSection();
231  void setupSelectionDisplaySection();
232  void setupSelectionEditorSection();
233  void setupSelectedDataSpreadsheet();
234  void
235  setupCompactStatisticsSection(); // Compact stats (replaces Statistics tab)
236 
237  void updateStatistics(vtkPolyData* polyData,
238  const cvSelectionData* customSelection = nullptr);
239  void updateSelectionList(vtkPolyData* polyData);
240  void updateSpreadsheetData(
241  vtkPolyData* polyData,
242  const cvSelectionData* customSelection = nullptr);
243  void computeBoundingBox(vtkPolyData* polyData, double bounds[6]);
244  QString formatBounds(const double bounds[6]);
245  void showColorDialog(const QString& title,
246  double currentColor[3],
247  int mode);
248  void highlightSingleItem(qint64 id);
249  qint64 extractIdFromItemText(const QString& itemText);
250  // updateBookmarkCombo removed - UI not implemented
251  void updateSelectionEditorTable();
252  QString generateSelectionName();
253  QColor generateSelectionColor() const;
254 
255  // Color synchronization helper
256  void syncInternalColorArray(double r, double g, double b, int mode);
257 
258  // ParaView-style color button icon update helper
259  // Uses QAbstractButton to support both QPushButton and QToolButton
260  void updateColorButtonIcon(QAbstractButton* button, const QColor& color);
261 
262  // Helper to setup collapsible QGroupBox behavior
263  void setupCollapsibleGroupBox(QGroupBox* groupBox);
264 
265  // Helper to update scroll content width (called from resize handlers)
266  void updateScrollContentWidth();
267 
268  // Expression evaluation helpers (ParaView-style selection algebra)
269  cvSelectionData evaluateExpression(const QString& expression);
270  QStringList tokenizeExpression(const QString& expression);
271  cvSelectionData parseOrExpression(const QStringList& tokens, int& pos);
272  cvSelectionData parseXorExpression(const QStringList& tokens, int& pos);
273  cvSelectionData parseAndExpression(const QStringList& tokens, int& pos);
274  cvSelectionData parseUnaryExpression(const QStringList& tokens, int& pos);
275  cvSelectionData parsePrimaryExpression(const QStringList& tokens, int& pos);
276 
277 private:
278  // Core components
279  cvSelectionHighlighter* m_highlighter;
280  cvTooltipFormatter* m_tooltipFormatter;
281  cvViewSelectionManager* m_selectionManager;
282  cvSelectionData m_selectionData;
283  QVector<qint64>
284  m_originalSelectionIds; // Store original IDs for invert toggle
285 
286  // Label properties are now stored in cvSelectionHighlighter (single source
287  // of truth) Local copies only used for dialog initialization before
288  // highlighter is set
289 
290  // Saved selections for Selection Editor
291  QList<SavedSelection> m_savedSelections;
292  QString m_dataProducerName;
293 
294  // Main scroll area
295  QScrollArea* m_scrollArea;
296  QWidget* m_scrollContent;
297 
298  // === Selected Data Header ===
299  cvExpanderButton* m_selectedDataExpander;
300  QWidget* m_selectedDataContainer;
301  QLabel* m_selectedDataLabel;
302  QPushButton* m_freezeButton;
303  QPushButton* m_extractButton;
304  QPushButton* m_plotOverTimeButton;
305 
306  // === Selection Display Section ===
307  cvExpanderButton* m_selectionDisplayExpander;
308  QWidget* m_selectionDisplayContainer;
309  QGroupBox* m_selectionDisplayGroup; // Legacy - may be nullptr
310  // Selection Labels
311  QPushButton* m_cellLabelsButton;
312  QPushButton* m_pointLabelsButton;
313  QMenu* m_cellLabelsMenu;
314  QMenu* m_pointLabelsMenu;
315  QPushButton* m_editLabelPropertiesButton;
316  // Selection Appearance
317  QToolButton* m_selectionColorButton; // ParaView uses QToolButton
318  // (pqColorChooserButton extends
319  // QToolButton)
320  // Interactive Selection
321  QToolButton*
322  m_interactiveSelectionColorButton; // ParaView uses QToolButton
323  QPushButton* m_editInteractiveLabelPropertiesButton;
324 
325  // === Selection Editor Section ===
326  cvExpanderButton* m_selectionEditorExpander;
327  QWidget* m_selectionEditorContainer;
328  QGroupBox* m_selectionEditorGroup; // Legacy - may be nullptr
329  QLabel* m_dataProducerLabel;
330  QLabel* m_dataProducerValue;
331  QLabel* m_elementTypeLabel;
332  QLabel* m_elementTypeValue; // ParaView-style: shows element type in a
333  // styled label
334  QLabel* m_expressionLabel;
335  QLineEdit* m_expressionEdit;
336  QTableWidget* m_selectionEditorTable; // Name, Type, Color columns
337  QToolButton* m_addSelectionButton;
338  QToolButton* m_removeSelectionButton;
339  QToolButton* m_removeAllSelectionsButton;
340  QPushButton* m_activateCombinedSelectionsButton;
341 
342  // === Create Selection Section (ParaView's Find Data) ===
343  cvExpanderButton* m_createSelectionExpander;
344  QWidget* m_createSelectionContainer;
345  QGroupBox* m_createSelectionGroup; // Legacy - may be nullptr
346  QComboBox* m_dataProducerCombo;
347  QComboBox* m_elementTypeCombo;
348  QComboBox* m_attributeCombo;
349  QComboBox* m_operatorCombo;
350  QLineEdit* m_valueEdit;
351  QSpinBox* m_processIdSpinBox;
352  QPushButton* m_findDataButton;
353  QPushButton* m_resetButton;
354  QPushButton* m_clearButton;
355  QVBoxLayout* m_queriesLayout;
356 
357  // Query row structure to manage multiple conditions
358  struct QueryRow {
359  QComboBox* attributeCombo;
360  QComboBox* operatorCombo;
361  QLineEdit* valueEdit;
362  QPushButton* plusButton;
363  QPushButton* minusButton;
364  QWidget* container;
365 
366  // Comparison operator needed for QList
367  bool operator==(const QueryRow& other) const {
368  return container == other.container;
369  }
370  };
371  QList<QueryRow> m_queryRows;
372 
373  // === Selected Data Spreadsheet ===
374  cvExpanderButton* m_selectedDataSpreadsheetExpander;
375  QWidget* m_selectedDataSpreadsheetContainer;
376  QGroupBox* m_selectedDataGroup; // Legacy - may be nullptr
377  QComboBox* m_attributeTypeCombo;
378  QToolButton* m_toggleColumnVisibilityButton;
379  QToolButton* m_toggleFieldDataButton; // ParaView-style: toggle field data
380  // visibility
381  QCheckBox* m_invertSelectionCheck;
382  QTableWidget* m_spreadsheetTable;
383 
384  // === Compact Statistics Section (ParaView-style: no tabs) ===
385  cvExpanderButton* m_compactStatsExpander;
386  QWidget* m_compactStatsContainer;
387  QGroupBox* m_compactStatsGroup; // Legacy - may be nullptr
388  QLabel* m_countLabel;
389  QLabel* m_typeLabel;
390  QLabel* m_boundsLabel;
391  QLabel* m_centerLabel;
392  QLabel* m_volumeLabel;
393 
394  // === Optional: Tab widget pointer (set to nullptr in new design) ===
395  QTabWidget* m_tabWidget;
396 
397  // === Legacy UI elements (kept for backward compatibility, may be nullptr)
398  // === These are initialized to nullptr and can be conditionally shown in
399  // future menus
400  QTableWidget* m_selectionTableWidget; // Legacy selection list table
401  QLabel* m_listInfoLabel; // Legacy "Showing N items" label
402  QComboBox* m_algebraOpCombo; // Algebra operations combo
403  QPushButton* m_applyAlgebraButton; // Apply algebra operation
404  QPushButton* m_extractBoundaryButton; // Extract boundary
405  // Filter UI removed - not implemented
406  // Bookmark UI removed - not implemented
407  QPushButton* m_addAnnotationButton; // Add annotation
408 
409  // Legacy color/opacity controls (may be nullptr in simplified UI)
410  QPushButton* m_hoverColorButton;
411  QPushButton* m_preselectedColorButton;
412  QPushButton* m_selectedColorButton;
413  QPushButton* m_boundaryColorButton;
414  QDoubleSpinBox* m_hoverOpacitySpin;
415  QDoubleSpinBox* m_preselectedOpacitySpin;
416  QDoubleSpinBox* m_selectedOpacitySpin;
417  QDoubleSpinBox* m_boundaryOpacitySpin;
418 
419  // Colors are now stored in cvSelectionHighlighter (single source of truth)
420  // These QColor helpers provide convenient access for UI updates
421  QColor getSelectionColor() const;
422  QColor getInteractiveSelectionColor() const;
423 
424  // Statistics
425  int m_selectionCount;
426  QString m_selectionType;
427  double m_bounds[6];
428  double m_center[3];
429  double m_volume;
430 
431  // Selection name counter
432  int m_selectionNameCounter;
433 
434  // Extract counter (ParaView-style: ExtractSelection1, ExtractSelection2,
435  // ...) Shared between mesh and point cloud for unified indexing
436  int m_extractCounter;
437 
438  // Selection colors palette (like ParaView)
439  static const QColor s_selectionColors[];
440  static const int s_selectionColorsCount;
441 
442  // Current label array selections (for Cell/Point Labels menus)
443  QString m_currentCellLabelArray;
444  QString m_currentPointLabelArray;
445 
446  // For single item highlighting with RED color
447  double m_savedPreselectedColor[3];
448  qint64 m_lastHighlightedId;
449 };
cvViewSelectionManager::getHighlighter
cvSelectionHighlighter * getHighlighter()
Get the shared highlighter.
Definition: cvViewSelectionManager.h:238
ecvColor::white
constexpr Rgb white(MAX, MAX, MAX)
QCustomPlot::xAxis
QCPAxis * xAxis
Definition: qcustomplot.h:2219
ecvGenericVisualizer3D.h
cvSelectionHighlighter::labelPropertiesChanged
void labelPropertiesChanged(bool interactive)
Emitted when label properties change.
QCPScatterStyle::ssCircle
@ ssCircle
\enumimage{ssCircle.png} a circle
Definition: qcustomplot.h:369
SelectionLabelProperties::cellLabelBold
bool cellLabelBold
Definition: cvSelectionHighlighter.h:59
QCPGraph::setScatterStyle
void setScatterStyle(const QCPScatterStyle &style)
Definition: qcustomplot.cpp:15137
QCPAbstractPlottable::setPen
void setPen(const QPen &pen)
Definition: qcustomplot.cpp:7136
cvSelectionHighlighter::opacityChanged
void opacityChanged(int mode)
Emitted when any opacity changes.
cvSelectionPropertiesWidget::extractedObjectReady
void extractedObjectReady(ccHObject *obj)
cvSelectionHighlighter::setHighlightOpacity
void setHighlightOpacity(double opacity, HighlightMode mode=SELECTED)
Set highlight opacity.
Definition: cvSelectionHighlighter.cpp:171
QCustomPlot::clearGraphs
int clearGraphs()
Definition: qcustomplot.cpp:10066
qcustomplot.h
cvExpanderButton
cvExpanderButton provides a frame with a toggle mode for collapsible sections.
Definition: cvExpanderButton.h:27
ecvColor::black
constexpr Rgb black(0, 0, 0)
QtCompat.h
cvSelectionPropertiesWidget::~cvSelectionPropertiesWidget
~cvSelectionPropertiesWidget() override
Definition: cvSelectionPropertiesWidget.cpp:211
cvSelectionData::hasActorInfo
bool hasActorInfo() const
Check if actor information is available.
Definition: cvSelectionData.h:253
cvSelectionPropertiesWidget::expressionChanged
void expressionChanged(const QString &expression)
cloudViewer::t::geometry::ipp::Resize
void Resize(const core::Tensor &src_im, core::Tensor &dst_im, Image::InterpType interp_type)
Definition: IPPImage.cpp:94
cvSelectionLabelPropertiesDialog::LabelProperties::lineWidth
int lineWidth
Definition: cvSelectionLabelPropertiesDialog.h:53
cvSelectionLabelPropertiesDialog::propertiesApplied
void propertiesApplied(const LabelProperties &props)
Emitted when Apply is clicked.
ccMesh::size
virtual unsigned size() const override
Returns the number of triangles.
Definition: ecvMesh.cpp:2143
cvMultiColumnHeaderView
QHeaderView that supports showing multiple sections as one.
Definition: cvMultiColumnHeaderView.h:33
cvSelectionAnnotationManager::applyLabelProperties
void applyLabelProperties(const cvSelectionLabelPropertiesDialog::LabelProperties &props, bool isCellLabel)
Apply label properties to all annotations (for cell or point labels)
Definition: cvSelectionAnnotation.cpp:266
cvSelectionHighlighter::highlightSelection
bool highlightSelection(const vtkSmartPointer< vtkIdTypeArray > &selection, int fieldAssociation, HighlightMode mode=SELECTED)
Highlight selected elements (automatically gets polyData from visualizer)
Definition: cvSelectionHighlighter.cpp:268
cvSelectionData::fieldAssociation
FieldAssociation fieldAssociation() const
Get field association.
Definition: cvSelectionData.h:193
cvSelectionHighlighter::HighlightMode
HighlightMode
Highlight mode (Enhanced multi-level highlighting)
Definition: cvSelectionHighlighter.h:115
data
GraphType data
Definition: graph_cut.cc:138
cvExpanderButton.h
cvExpanderButton::toggled
void toggled(bool checked)
This signal is emitted whenever the button changes its state.
cvSelectionLabelPropertiesDialog::LabelProperties::pointLabelFontSize
int pointLabelFontSize
Definition: cvSelectionLabelPropertiesDialog.h:71
qSetFromVector
QSet< T > qSetFromVector(const QVector< T > &vec)
Definition: QtCompat.h:1073
cvSelectionLabelPropertiesDialog::LabelProperties::pointLabelColor
QColor pointLabelColor
Definition: cvSelectionLabelPropertiesDialog.h:72
CVLog::PrintVerbose
static bool PrintVerbose(const char *format,...)
Prints out a verbose formatted message in console.
Definition: CVLog.cpp:103
SelectionLabelProperties::cellLabelFontSize
int cellLabelFontSize
Definition: cvSelectionHighlighter.h:56
cloudViewer::core::Maximum
Tensor Maximum(const Tensor &input, const Tensor &other)
Computes the element-wise maximum of input and other. The tensors must have same data type and device...
Definition: TensorFunction.cpp:124
signals
#define signals
Definition: PythonPlugin.cpp:26
ccObject::setName
virtual void setName(const QString &name)
Sets object name.
Definition: ecvObject.h:75
cvSelectionPropertiesWidget::SavedSelection::name
QString name
Definition: cvSelectionPropertiesWidget.h:80
cvSelectionPropertiesWidget::findDataRequested
void findDataRequested(const QString &dataProducer, const QString &elementType, const QString &attribute, const QString &op, const QString &value)
CVLog::Print
static bool Print(const char *format,...)
Prints out a formatted message in console.
Definition: CVLog.cpp:113
cvSelectionLabelPropertiesDialog::LabelProperties::opacity
double opacity
Definition: cvSelectionLabelPropertiesDialog.h:51
cvSelectionHighlighter::SELECTED
@ SELECTED
Definition: cvSelectionHighlighter.h:120
QCustomPlot::setInteractions
void setInteractions(const QCP::Interactions &interactions)
Definition: qcustomplot.cpp:9574
cloudViewer::utility::operator==
constexpr bool operator==(const optional< T > &x, const optional< T > &y)
Definition: Optional.h:615
SelectionLabelProperties::maxTooltipAttributes
int maxTooltipAttributes
Definition: cvSelectionHighlighter.h:82
cvSelectionLabelPropertiesDialog::LabelProperties::cellLabelShadow
bool cellLabelShadow
Definition: cvSelectionLabelPropertiesDialog.h:61
ecvDisplayTools.h
cvSelectionLabelPropertiesDialog::LabelProperties::cellLabelItalic
bool cellLabelItalic
Definition: cvSelectionLabelPropertiesDialog.h:60
cvSelectionPropertiesWidget::SavedSelection
Saved selection entry for Selection Editor.
Definition: cvSelectionPropertiesWidget.h:79
cvSelectionData::clear
void clear()
Clear the selection.
Definition: cvSelectionData.cpp:137
CVLog.h
cvSelectionAlgebra::unionOf
static cvSelectionData unionOf(const cvSelectionData &a, const cvSelectionData &b)
Compute union of two selections.
Definition: cvSelectionAlgebra.cpp:37
cloudViewer::PointCloudTpl::size
unsigned size() const override
Definition: PointCloudTpl.h:38
cloudViewer::core::Minimum
Tensor Minimum(const Tensor &input, const Tensor &other)
Computes the element-wise minimum of input and other. The tensors must have same data type and device...
Definition: TensorFunction.cpp:136
ccPointCloud
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
Definition: ecvPointCloud.h:146
cvSelectionPropertiesWidget::cvSelectionPropertiesWidget
cvSelectionPropertiesWidget(QWidget *parent=nullptr)
Definition: cvSelectionPropertiesWidget.cpp:125
SelectionLabelProperties::pointLabelFontFamily
QString pointLabelFontFamily
Definition: cvSelectionHighlighter.h:69
vtkSmartPointer< vtkIdTypeArray >
cvSelectionPropertiesWidget::invertSelectionRequested
void invertSelectionRequested()
cvSelectionPropertiesWidget::extractSelectionRequested
void extractSelectionRequested()
QCustomPlot::replot
Q_SLOT void replot(QCustomPlot::RefreshPriority refreshPriority=QCustomPlot::rpHint)
Definition: qcustomplot.cpp:10636
cvSelectionLabelPropertiesDialog::LabelProperties::cellLabelFormat
QString cellLabelFormat
Definition: cvSelectionLabelPropertiesDialog.h:67
QCustomPlot::removePlottable
bool removePlottable(QCPAbstractPlottable *plottable)
Definition: qcustomplot.cpp:9838
color
math::float4 color
Definition: LineSetBuffers.cpp:46
cvSelectionHighlighter::getPointLabelArrayName
QString getPointLabelArrayName() const
Get current point label array name.
Definition: cvSelectionHighlighter.h:315
cvSelectionExporter.h
cvSelectionAlgebra
Selection algebra operations.
Definition: cvSelectionAlgebra.h:46
cvSelectionLabelPropertiesDialog::LabelProperties
Label properties structure.
Definition: cvSelectionLabelPropertiesDialog.h:49
cvSelectionPropertiesWidget::plotOverTimeRequested
void plotOverTimeRequested()
cvSelectionBase::getPCLVis
PclUtils::PCLVis * getPCLVis() const
Get PCLVis instance (for VTK-specific operations)
Definition: cvSelectionBase.cpp:33
SelectionLabelProperties::cellLabelFontFamily
QString cellLabelFontFamily
Definition: cvSelectionHighlighter.h:55
cvSelectionAnnotationManager::setDefaultLabelProperties
void setDefaultLabelProperties(const cvSelectionLabelPropertiesDialog::LabelProperties &props, bool isCellLabel)
Set default label properties for new annotations.
Definition: cvSelectionAnnotation.cpp:305
QCPGraph
A plottable representing a graph in a plot.
Definition: qcustomplot.h:2973
cvSelectionPropertiesWidget::resizeEvent
void resizeEvent(QResizeEvent *event) override
Definition: cvSelectionPropertiesWidget.cpp:268
normals
double normals[3]
Definition: TriangleMeshIO.cpp:54
cvSelectionBase::getPolyDataForSelection
virtual vtkPolyData * getPolyDataForSelection(const cvSelectionData *selectionData=nullptr)
Get polyData using ParaView-style priority (centralized method)
Definition: cvSelectionBase.cpp:72
result
core::Tensor result
Definition: VtkUtils.cpp:76
cvTooltipFormatter
Formatter class for generating tooltip text from VTK data.
Definition: cvSelectionHighlighter.h:494
QCPAxis::setLabel
void setLabel(const QString &str)
Definition: qcustomplot.cpp:4897
cvSelectionPropertiesWidget::selectionManager
cvViewSelectionManager * selectionManager() const
Definition: cvSelectionPropertiesWidget.h:99
QtCompatRegExpOption::CaseInsensitive
constexpr QRegularExpression::PatternOption CaseInsensitive
Definition: QtCompat.h:174
cvSelectionFilter
Advanced selection filtering system.
Definition: cvSelectionAlgebra.h:271
CVLog::Error
static bool Error(const char *format,...)
Display an error dialog with formatted message.
Definition: CVLog.cpp:143
cvSelectionLabelPropertiesDialog::LabelProperties::pointLabelFormat
QString pointLabelFormat
Definition: cvSelectionLabelPropertiesDialog.h:81
SelectionLabelProperties::showTooltips
bool showTooltips
Definition: cvSelectionHighlighter.h:81
qPCL.h
cvSelectionAlgebra::symmetricDifferenceOf
static cvSelectionData symmetricDifferenceOf(const cvSelectionData &a, const cvSelectionData &b)
Compute symmetric difference of two selections.
Definition: cvSelectionAlgebra.cpp:124
slots
#define slots
Definition: PythonPlugin.cpp:25
QCPScatterStyle
Represents the visual appearance of scatter points.
Definition: qcustomplot.h:345
cvSelectionBase.h
event
MouseEvent event
Definition: BitmapWindowSystem.cpp:61
SelectionLabelProperties::cellLabelFormat
QString cellLabelFormat
Definition: cvSelectionHighlighter.h:64
QCustomPlot::yAxis
QCPAxis * yAxis
Definition: qcustomplot.h:2219
cvSelectionHighlighter::isPointLabelVisible
bool isPointLabelVisible() const
Check if point labels are visible.
Definition: cvSelectionHighlighter.h:325
cvSelectionLabelPropertiesDialog::LabelProperties::pointLabelBold
bool pointLabelBold
Definition: cvSelectionLabelPropertiesDialog.h:73
cvSelectionLabelPropertiesDialog::LabelProperties::cellLabelFontSize
int cellLabelFontSize
Definition: cvSelectionLabelPropertiesDialog.h:57
QCPGraph::setData
void setData(QCPDataMap *data, bool copy=false)
Definition: qcustomplot.cpp:14909
SelectionLabelProperties::pointLabelBold
bool pointLabelBold
Definition: cvSelectionHighlighter.h:73
cvSelectionAlgebra.h
cvSelectionLabelPropertiesDialog::LabelProperties::cellLabelBold
bool cellLabelBold
Definition: cvSelectionLabelPropertiesDialog.h:59
cvViewSelectionManager::getAlgebra
cvSelectionAlgebra * getAlgebra()
Get the selection algebra utility.
Definition: cvViewSelectionManager.h:208
cvSelectionData::isEmpty
bool isEmpty() const
Check if selection is empty.
Definition: cvSelectionData.cpp:114
cvSelectionHighlighter::getHighlightQColor
QColor getHighlightQColor(HighlightMode mode) const
Get highlight color as QColor.
Definition: cvSelectionHighlighter.cpp:1218
QCPLegend::setFont
void setFont(const QFont &font)
Definition: qcustomplot.cpp:13445
e
const double * e
Definition: essential_matrix_poly.h:10
cvSelectionPropertiesWidget::highlightOpacityChanged
void highlightOpacityChanged(double opacity, int mode)
cvSelectionPropertiesWidget::setSelectionManager
void setSelectionManager(cvViewSelectionManager *manager)
Definition: cvSelectionPropertiesWidget.cpp:1483
QCustomPlot::plottableCount
int plottableCount() const
Definition: qcustomplot.cpp:9888
cvSelectionExporter::exportFromSourceMesh
static ccMesh * exportFromSourceMesh(ccMesh *sourceMesh, const cvSelectionData &selectionData, const ExportOptions &options=ExportOptions())
Export selected cells directly from source ccMesh.
Definition: cvSelectionExporter.cpp:302
SelectionLabelProperties::pointLabelOpacity
double pointLabelOpacity
Definition: cvSelectionHighlighter.h:72
cvSelectionPropertiesWidget::selectionData
const cvSelectionData & selectionData() const
Definition: cvSelectionPropertiesWidget.h:98
cvSelectionHighlighter::getCellLabelArrayName
QString getCellLabelArrayName() const
Get current cell label array name.
Definition: cvSelectionHighlighter.h:320
cvSelectionData::CELLS
@ CELLS
Selection applies to cells.
Definition: cvSelectionData.h:142
cvViewSelectionManager.h
SelectionLabelProperties::lineWidth
int lineWidth
Definition: cvSelectionHighlighter.h:50
SelectionLabelProperties::pointLabelItalic
bool pointLabelItalic
Definition: cvSelectionHighlighter.h:74
cvSelectionPropertiesWidget::selectionAdded
void selectionAdded(const cvSelectionData &selection)
cvSelectionHighlighter::PRESELECTED
@ PRESELECTED
Definition: cvSelectionHighlighter.h:118
QCP::iSelectPlottables
@ iSelectPlottables
Definition: qcustomplot.h:248
cvViewSelectionManager::getPolyData
vtkPolyData * getPolyData() const
Get the underlying polyData for selection operations.
Definition: cvViewSelectionManager.cpp:538
cvSelectionHighlighter::HOVER
@ HOVER
Definition: cvSelectionHighlighter.h:116
cvViewSelectionManager
Central manager for all selection operations in the view.
Definition: cvViewSelectionManager.h:52
cvSelectionPropertiesWidget::SavedSelection::type
QString type
Definition: cvSelectionPropertiesWidget.h:81
cvSelectionData::primaryActor
vtkActor * primaryActor() const
Get the primary (front-most) actor.
Definition: cvSelectionData.cpp:181
ecvMesh.h
SelectionLabelProperties::opacity
double opacity
Definition: cvSelectionHighlighter.h:48
cvSelectionHighlighter::setHighlightQColor
void setHighlightQColor(const QColor &color, HighlightMode mode=SELECTED)
Set highlight color from QColor.
Definition: cvSelectionHighlighter.cpp:1227
QCustomPlot::legend
QCPLegend * legend
Definition: qcustomplot.h:2220
cvSelectionData::count
int count() const
Get number of selected items.
Definition: cvSelectionData.cpp:119
cvExpanderButton::setChecked
void setChecked(bool checked)
This property holds whether the button is checked. By default, the button is unchecked (collapsed).
Definition: cvExpanderButton.cpp:83
FileIOFilter.h
QCPAbstractPlottable::setName
void setName(const QString &name)
Definition: qcustomplot.cpp:7092
cvSelectionLabelPropertiesDialog::LabelProperties::maxTooltipAttributes
int maxTooltipAttributes
Definition: cvSelectionLabelPropertiesDialog.h:85
SelectionLabelProperties::pointLabelFormat
QString pointLabelFormat
Definition: cvSelectionHighlighter.h:78
cvSelectionLabelPropertiesDialog::LabelProperties::pointLabelItalic
bool pointLabelItalic
Definition: cvSelectionLabelPropertiesDialog.h:74
cvSelectionPropertiesWidget::syncUIWithHighlighter
void syncUIWithHighlighter()
Definition: cvSelectionPropertiesWidget.cpp:563
cvSelectionPropertiesWidget::refreshDataProducers
void refreshDataProducers()
Refresh the data producer combo box Call this when data sources change (e.g., after loading new data)
Definition: cvSelectionPropertiesWidget.cpp:5438
SelectionLabelProperties::cellLabelOpacity
double cellLabelOpacity
Definition: cvSelectionHighlighter.h:58
cvSelectionLabelPropertiesDialog::LabelProperties::pointLabelShadow
bool pointLabelShadow
Definition: cvSelectionLabelPropertiesDialog.h:75
SelectionLabelProperties::pointLabelColor
QColor pointLabelColor
Definition: cvSelectionHighlighter.h:71
SelectionLabelProperties::pointLabelFontSize
int pointLabelFontSize
Definition: cvSelectionHighlighter.h:70
cvSelectionPropertiesWidget::annotationRequested
void annotationRequested(const QString &text)
ccDrawableObject::setVisible
virtual void setVisible(bool state)
Sets entity visibility.
Definition: ecvDrawableObject.h:40
cvSelectionHighlighter::isCellLabelVisible
bool isCellLabelVisible() const
Check if cell labels are visible.
Definition: cvSelectionHighlighter.h:330
points
int points
Definition: FileIOFactory.cpp:144
cvSelectionExporter::exportFromSourceCloud
static ccPointCloud * exportFromSourceCloud(ccPointCloud *sourceCloud, const cvSelectionData &selectionData, const ExportOptions &options=ExportOptions())
Export selected points directly from source ccPointCloud.
Definition: cvSelectionExporter.cpp:178
cvExpanderButton::setText
void setText(const QString &text)
This property holds the text shown on the button.
Definition: cvExpanderButton.cpp:94
cvSelectionHighlighter::setLabelProperties
void setLabelProperties(const SelectionLabelProperties &props, bool interactive=false)
Set label properties for selection mode.
Definition: cvSelectionHighlighter.cpp:923
cvSelectionData::ids
QVector< qint64 > ids() const
Get selected IDs as a vector (copy)
Definition: cvSelectionData.cpp:124
QCustomPlot::addGraph
QCPGraph * addGraph(QCPAxis *keyAxis=0, QCPAxis *valueAxis=0)
Definition: qcustomplot.cpp:10007
SelectionLabelProperties::cellLabelShadow
bool cellLabelShadow
Definition: cvSelectionHighlighter.h:61
cvSelectionData::POINTS
@ POINTS
Selection applies to points.
Definition: cvSelectionData.h:143
cvSelectionAlgebra::intersectionOf
static cvSelectionData intersectionOf(const cvSelectionData &a, const cvSelectionData &b)
Compute intersection of two selections.
Definition: cvSelectionAlgebra.cpp:63
cvSelectionLabelPropertiesDialog::LabelProperties::pointLabelFontFamily
QString pointLabelFontFamily
Definition: cvSelectionLabelPropertiesDialog.h:70
cvSelectionData::fieldTypeString
QString fieldTypeString() const
Get human-readable field type string.
Definition: cvSelectionData.cpp:143
cvSelectionLabelPropertiesDialog::LabelProperties::pointLabelOpacity
double pointLabelOpacity
Definition: cvSelectionLabelPropertiesDialog.h:76
SelectionLabelProperties::pointSize
int pointSize
Definition: cvSelectionHighlighter.h:49
cvSelectionHighlighter::setPointLabelArray
void setPointLabelArray(const QString &arrayName, bool visible=true)
Set the point label array name.
Definition: cvSelectionHighlighter.cpp:984
cvSelectionHighlighter::getHighlightOpacity
double getHighlightOpacity(HighlightMode mode) const
Get highlight opacity for a specific mode.
Definition: cvSelectionHighlighter.cpp:244
PclUtils::PCLVis::UpdateScreen
void UpdateScreen()
UpdateScreen - Updates/refreshes the render window This method forces a render update after actor cha...
Definition: PCLVis.cpp:3156
QCustomPlot::rescaleAxes
Q_SLOT void rescaleAxes(bool onlyVisiblePlottables=false)
Definition: qcustomplot.cpp:10726
cvViewSelectionManager::getAnnotations
cvSelectionAnnotationManager * getAnnotations()
Get the annotation manager.
Definition: cvViewSelectionManager.h:228
QCustomPlot
The central class of the library. This is the QWidget which displays the plot and interacts with the ...
Definition: qcustomplot.h:2020
PCLVis.h
cvSelectionData
Encapsulates selection data without exposing VTK types.
Definition: cvSelectionData.h:136
cvViewSelectionManager::getSourceObject
ccHObject * getSourceObject() const
Get the source object for the current selection.
Definition: cvViewSelectionManager.cpp:636
CVLog::Warning
static bool Warning(const char *format,...)
Prints out a formatted warning message in console.
Definition: CVLog.cpp:133
cvSelectionBase
Lightweight base class for all selection-related components.
Definition: cvSelectionBase.h:44
QPCL_ENGINE_LIB_API
#define QPCL_ENGINE_LIB_API
Definition: qPCL.h:15
cvSelectionPropertiesWidget::SavedSelection::data
cvSelectionData data
Definition: cvSelectionPropertiesWidget.h:83
cvSelectionLabelPropertiesDialog::LabelProperties::cellLabelFontFamily
QString cellLabelFontFamily
Definition: cvSelectionLabelPropertiesDialog.h:56
cvViewSelectionManager::isSourceObjectValid
bool isSourceObjectValid() const
Check if the source object is still valid.
Definition: cvViewSelectionManager.cpp:706
cvSelectionHighlighter::setHighlightColor
void setHighlightColor(double r, double g, double b, HighlightMode mode=SELECTED)
Set highlight color.
Definition: cvSelectionHighlighter.cpp:105
cvSelectionHighlighter.h
cvViewSelectionManager::getSourcePointCloud
ccPointCloud * getSourcePointCloud() const
Get the source object as ccPointCloud.
Definition: cvViewSelectionManager.cpp:641
cvSelectionHighlighter::setCellLabelArray
void setCellLabelArray(const QString &arrayName, bool visible=true)
Set the cell label array name.
Definition: cvSelectionHighlighter.cpp:1003
cvSelectionAnnotationManager
Selection annotation manager.
Definition: cvSelectionAnnotation.h:112
cvSelectionLabelPropertiesDialog.h
ccMesh
Triangular mesh.
Definition: ecvMesh.h:35
sourceCloud
ccGenericPointCloud * sourceCloud
Definition: qCanupoTools.cpp:36
cvSelectionPropertiesWidget::SavedSelection::color
QColor color
Definition: cvSelectionPropertiesWidget.h:82
cvSelectionAlgebra::extractBoundary
static cvSelectionData extractBoundary(vtkPolyData *polyData, const cvSelectionData &input)
Extract boundary elements of selection.
Definition: cvSelectionAlgebra.cpp:370
cvViewSelectionManager::instance
static cvViewSelectionManager * instance()
Get the singleton instance.
Definition: cvViewSelectionManager.cpp:38
ccHObject
Hierarchical CLOUDVIEWER Object.
Definition: ecvHObject.h:25
ccObject::getName
virtual QString getName() const
Returns object name.
Definition: ecvObject.h:72
cvSelectionHighlighter::colorChanged
void colorChanged(int mode)
Emitted when any highlight color changes.
cvSelectionExporter::exportToMesh
static ccMesh * exportToMesh(vtkPolyData *polyData, const cvSelectionData &selectionData, const ExportOptions &options=ExportOptions())
Export selected cells to ccMesh.
Definition: cvSelectionExporter.cpp:60
cvSelectionPropertiesWidget::allSelectionsRemoved
void allSelectionsRemoved()
cvSelectionData.h
cvViewSelectionManager::setCurrentSelection
void setCurrentSelection(const cvSelectionData &selectionData, bool resetLayers=true)
Set the current selection data.
Definition: cvViewSelectionManager.cpp:370
QCPLayerable::setVisible
void setVisible(bool on)
Definition: qcustomplot.cpp:944
cvSelectionAlgebra::complementOf
static cvSelectionData complementOf(vtkPolyData *polyData, const cvSelectionData &input)
Compute complement of a selection.
Definition: cvSelectionAlgebra.cpp:165
SelectionLabelProperties::cellLabelItalic
bool cellLabelItalic
Definition: cvSelectionHighlighter.h:60
cvSelectionHighlighter::getHighlightColor
const double * getHighlightColor(HighlightMode mode) const
Get highlight color for a specific mode.
Definition: cvSelectionHighlighter.cpp:227
cvSelectionAnnotation.h
cvSelectionExporter::ExportOptions
Options for exporting selections.
Definition: cvSelectionExporter.h:47
cvSelectionLabelPropertiesDialog::LabelProperties::showTooltips
bool showTooltips
Definition: cvSelectionLabelPropertiesDialog.h:84
SelectionLabelProperties
Label properties for selection annotations.
Definition: cvSelectionHighlighter.h:46
cvSelectionData::FieldAssociation
FieldAssociation
Field association for selection.
Definition: cvSelectionData.h:141
PclUtils::PCLVis
Definition: PCLVis.h:80
cvSelectionLabelPropertiesDialog
Dialog for editing selection label properties.
Definition: cvSelectionLabelPropertiesDialog.h:42
SelectionLabelProperties::cellLabelColor
QColor cellLabelColor
Definition: cvSelectionHighlighter.h:57
cvSelectionData::primaryPolyData
vtkPolyData * primaryPolyData() const
Get the primary (front-most) polyData.
Definition: cvSelectionData.cpp:186
cvSelectionPropertiesWidget::freezeSelectionRequested
void freezeSelectionRequested()
cvSelectionPropertiesWidget::algebraOperationRequested
void algebraOperationRequested(int operation)
cvViewSelectionManager::getSourceMesh
ccMesh * getSourceMesh() const
Get the source object as ccMesh.
Definition: cvViewSelectionManager.cpp:675
cvSelectionExporter::exportToPointCloud
static ccPointCloud * exportToPointCloud(vtkPolyData *polyData, const cvSelectionData &selectionData, const ExportOptions &options=ExportOptions())
Export selected points to ccPointCloud.
Definition: cvSelectionExporter.cpp:117
ccObject::setEnabled
virtual void setEnabled(bool state)
Sets the "enabled" property.
Definition: ecvObject.h:102
cvSelectionPropertiesWidget::setHighlighter
void setHighlighter(cvSelectionHighlighter *highlighter)
Definition: cvSelectionPropertiesWidget.cpp:279
QCP::iRangeZoom
@ iRangeZoom
Definition: qcustomplot.h:239
cvSelectionPropertiesWidget::selectionRemoved
void selectionRemoved(int index)
cvSelectionPropertiesWidget::clearSelection
void clearSelection()
Definition: cvSelectionPropertiesWidget.cpp:1717
cvSelectionPropertiesWidget::setDataProducerName
void setDataProducerName(const QString &name)
Set the data producer name (source of selection)
Definition: cvSelectionPropertiesWidget.cpp:5423
cvSelectionHighlighter
Helper class for highlighting selected elements in the visualizer.
Definition: cvSelectionHighlighter.h:101
ecvPointCloud.h
cvSelectionLabelPropertiesDialog::LabelProperties::cellLabelOpacity
double cellLabelOpacity
Definition: cvSelectionLabelPropertiesDialog.h:62
cvSelectionAlgebra::Operation
Operation
Algebra operations Using enum class to avoid macro conflicts (e.g., DIFFERENCE may be defined as a ma...
Definition: cvSelectionAlgebra.h:57
QCP::iRangeDrag
@ iRangeDrag
Definition: qcustomplot.h:235
cvMultiColumnHeaderView.h
cvSelectionLabelPropertiesDialog::LabelProperties::cellLabelColor
QColor cellLabelColor
Definition: cvSelectionLabelPropertiesDialog.h:58
cvSelectionHighlighter::getLabelProperties
const SelectionLabelProperties & getLabelProperties(bool interactive=false) const
Get label properties for selection mode.
Definition: cvSelectionHighlighter.cpp:917
cvSelectionPropertiesWidget::activateCombinedSelectionsRequested
void activateCombinedSelectionsRequested()
cvSelectionPropertiesWidget::eventFilter
bool eventFilter(QObject *obj, QEvent *event) override
Definition: cvSelectionPropertiesWidget.cpp:240
cvSelectionLabelPropertiesDialog::LabelProperties::pointSize
int pointSize
Definition: cvSelectionLabelPropertiesDialog.h:52
SelectionLabelProperties::pointLabelShadow
bool pointLabelShadow
Definition: cvSelectionHighlighter.h:75
cvSelectionPropertiesWidget
Comprehensive selection properties and management widget.
Definition: cvSelectionPropertiesWidget.h:71
cvSelectionAnnotationManager::addAnnotation
QString addAnnotation(const cvSelectionData &selection, const QString &text, bool autoPosition=true)
Add annotation for a selection.
Definition: cvSelectionAnnotation.cpp:51
cvSelectionPropertiesWidget::updateSelection
bool updateSelection(const cvSelectionData &selectionData, vtkPolyData *polyData=nullptr)
Definition: cvSelectionPropertiesWidget.cpp:1541
name
std::string name
Definition: FileIOFactory.cpp:129
cvSelectionHighlighter::BOUNDARY
@ BOUNDARY
Definition: cvSelectionHighlighter.h:122
cvSelectionPropertiesWidget.h
cvSelectionPropertiesWidget::highlightColorChanged
void highlightColorChanged(double r, double g, double b, int mode)