 |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Go to the documentation of this file.
23 #include <vtkSmartPointer.h>
28 class vtkDataSetMapper;
29 class vtkExtractSelection;
31 class vtkSelectionNode;
34 class vtkLabeledDataMapper;
55 QString cellLabelFontFamily =
"Arial";
56 int cellLabelFontSize = 18;
57 QColor cellLabelColor = QColor(0, 255, 0);
58 double cellLabelOpacity = 1.0;
59 bool cellLabelBold =
false;
60 bool cellLabelItalic =
false;
61 bool cellLabelShadow =
false;
62 int cellLabelHorizontalJustification = 0;
63 int cellLabelVerticalJustification = 0;
64 QString cellLabelFormat =
"";
69 QString pointLabelFontFamily =
"Arial";
70 int pointLabelFontSize = 18;
71 QColor pointLabelColor = QColor(255, 255, 0);
72 double pointLabelOpacity = 1.0;
73 bool pointLabelBold =
false;
74 bool pointLabelItalic =
false;
75 bool pointLabelShadow =
false;
76 int pointLabelHorizontalJustification = 0;
77 int pointLabelVerticalJustification = 0;
78 QString pointLabelFormat =
"";
81 bool showTooltips =
true;
82 int maxTooltipAttributes = 15;
148 int fieldAssociation,
149 HighlightMode mode = SELECTED);
161 bool highlightSelection(vtkPolyData* polyData,
163 int fieldAssociation,
164 HighlightMode mode = SELECTED);
175 HighlightMode mode = SELECTED);
184 bool highlightElement(vtkPolyData* polyData,
186 int fieldAssociation);
191 void clearHighlights();
197 void clearHoverHighlight();
205 void setHighlightsVisible(
bool visible);
214 void setHighlightColor(
double r,
217 HighlightMode mode = SELECTED);
224 void setHighlightOpacity(
double opacity, HighlightMode mode = SELECTED);
231 const double* getHighlightColor(HighlightMode mode)
const;
238 double getHighlightOpacity(HighlightMode mode)
const;
245 void setPointSize(
int size, HighlightMode mode = SELECTED);
252 int getPointSize(HighlightMode mode)
const;
259 void setLineWidth(
int width, HighlightMode mode = SELECTED);
266 int getLineWidth(HighlightMode mode)
const;
272 void setEnabled(
bool enabled);
284 bool interactive =
false)
const;
292 bool interactive =
false);
303 void setPointLabelArray(
const QString& arrayName,
bool visible =
true);
310 void setCellLabelArray(
const QString& arrayName,
bool visible =
true);
339 QColor getHighlightQColor(HighlightMode mode)
const;
344 void setHighlightQColor(
const QColor&
color, HighlightMode mode = SELECTED);
351 void colorChanged(
int mode);
357 void opacityChanged(
int mode);
363 void pointSizeChanged(
int mode);
369 void lineWidthChanged(
int mode);
375 void labelPropertiesChanged(
bool interactive);
380 void propertiesChanged();
388 vtkIdTypeArray* selection,
389 int fieldAssociation,
397 vtkIdTypeArray* selection,
int fieldAssociation);
402 void addActorToVisualizer(vtkActor* actor,
const QString&
id);
407 void removeActorFromVisualizer(
const QString&
id);
413 void updateLabelActor(
bool isPointLabels);
425 double m_hoverColor[3];
426 double m_preselectedColor[3];
428 double m_selectedColor[3];
430 double m_boundaryColor[3];
435 double m_hoverOpacity;
436 double m_preselectedOpacity;
437 double m_selectedOpacity;
438 double m_boundaryOpacity;
441 int m_hoverPointSize;
442 int m_preselectedPointSize;
443 int m_selectedPointSize;
444 int m_boundaryPointSize;
447 int m_hoverLineWidth;
448 int m_preselectedLineWidth;
449 int m_selectedLineWidth;
450 int m_boundaryLineWidth;
453 QString m_hoverActorId;
454 QString m_preselectedActorId;
455 QString m_selectedActorId;
456 QString m_boundaryActorId;
463 QString m_pointLabelArrayName;
464 QString m_cellLabelArrayName;
466 bool m_pointLabelVisible;
468 bool m_cellLabelVisible;
474 m_lastSelectionPolyData;
519 QString getTooltipInfo(vtkPolyData* polyData,
521 AssociationType association,
522 const QString& datasetName = QString());
532 QString getPlainTooltipInfo(vtkPolyData* polyData,
534 AssociationType association,
535 const QString& datasetName = QString());
541 void setMaxAttributes(
int maxAttribs);
547 QString formatPointTooltip(vtkPolyData* polyData,
549 const QString& datasetName);
554 QString formatCellTooltip(vtkPolyData* polyData,
556 const QString& datasetName);
561 void addArrayValues(QString& tooltip,
562 vtkFieldData* fieldData,
563 vtkIdType tupleIndex);
568 QString formatArrayValue(vtkDataArray* array, vtkIdType tupleIndex);
575 QString formatNumber(
double value);
void labelPropertiesChanged(bool interactive)
Emitted when label properties change.
bool cellLabelBold
Definition: cvSelectionHighlighter.h:59
void opacityChanged(int mode)
Emitted when any opacity changes.
void setHighlightOpacity(double opacity, HighlightMode mode=SELECTED)
Set highlight opacity.
Definition: cvSelectionHighlighter.cpp:171
double normal[3]
Definition: FileIOFactory.cpp:53
bool highlightSelection(const vtkSmartPointer< vtkIdTypeArray > &selection, int fieldAssociation, HighlightMode mode=SELECTED)
Highlight selected elements (automatically gets polyData from visualizer)
Definition: cvSelectionHighlighter.cpp:268
FieldAssociation fieldAssociation() const
Get field association.
Definition: cvSelectionData.h:193
HighlightMode
Highlight mode (Enhanced multi-level highlighting)
Definition: cvSelectionHighlighter.h:115
GraphType data
Definition: graph_cut.cc:138
static bool PrintVerbose(const char *format,...)
Prints out a verbose formatted message in console.
Definition: CVLog.cpp:103
int cellLabelFontSize
Definition: cvSelectionHighlighter.h:56
vtkRenderer * getCurrentRenderer(int viewport=0)
Definition: PCLVis.cpp:2924
#define signals
Definition: PythonPlugin.cpp:26
@ SELECTED
Definition: cvSelectionHighlighter.h:120
int maxTooltipAttributes
Definition: cvSelectionHighlighter.h:82
void clearHoverHighlight()
Clear only hover highlight (keep selected/preselected)
Definition: cvSelectionHighlighter.cpp:452
void setLineWidth(int width, HighlightMode mode=SELECTED)
Set line width for highlight rendering.
Definition: cvSelectionHighlighter.cpp:856
QRegularExpression QtCompatRegExp
Definition: QtCompat.h:170
Definition: CustomContextItem.cpp:18
math::float4 color
Definition: LineSetBuffers.cpp:46
QString getPointLabelArrayName() const
Get current point label array name.
Definition: cvSelectionHighlighter.h:315
PclUtils::PCLVis * getPCLVis() const
Get PCLVis instance (for VTK-specific operations)
Definition: cvSelectionBase.cpp:33
void lineWidthChanged(int mode)
Emitted when line width changes.
core::Tensor result
Definition: VtkUtils.cpp:76
int width
Definition: FileIOFactory.cpp:142
constexpr QRegularExpression::PatternOption CaseInsensitive
Definition: QtCompat.h:174
static bool Error(const char *format,...)
Display an error dialog with formatted message.
Definition: CVLog.cpp:143
int size
Definition: FileIOFactory.cpp:130
void pointSizeChanged(int mode)
Emitted when point size changes.
bool isPointLabelVisible() const
Check if point labels are visible.
Definition: cvSelectionHighlighter.h:325
bool highlightElement(vtkPolyData *polyData, vtkIdType elementId, int fieldAssociation)
Highlight a single element (for hover preview)
Definition: cvSelectionHighlighter.cpp:394
bool pointLabelBold
Definition: cvSelectionHighlighter.h:73
bool isEmpty() const
Check if selection is empty.
Definition: cvSelectionData.cpp:114
QColor getHighlightQColor(HighlightMode mode) const
Get highlight color as QColor.
Definition: cvSelectionHighlighter.cpp:1218
double pointLabelOpacity
Definition: cvSelectionHighlighter.h:72
QString getCellLabelArrayName() const
Get current cell label array name.
Definition: cvSelectionHighlighter.h:320
normal_z scalar
Definition: my_point_types.h:169
void clearHighlights()
Clear all highlights.
Definition: cvSelectionHighlighter.cpp:430
int lineWidth
Definition: cvSelectionHighlighter.h:50
bool pointLabelItalic
Definition: cvSelectionHighlighter.h:74
@ PRESELECTED
Definition: cvSelectionHighlighter.h:118
@ HOVER
Definition: cvSelectionHighlighter.h:116
double opacity
Definition: cvSelectionHighlighter.h:48
void setHighlightQColor(const QColor &color, HighlightMode mode=SELECTED)
Set highlight color from QColor.
Definition: cvSelectionHighlighter.cpp:1227
int count() const
Get number of selected items.
Definition: cvSelectionData.cpp:119
int getLineWidth(HighlightMode mode) const
Get line width for a specific mode.
Definition: cvSelectionHighlighter.cpp:901
void propertiesChanged()
Emitted when any property changes (general notification)
double cellLabelOpacity
Definition: cvSelectionHighlighter.h:58
QColor pointLabelColor
Definition: cvSelectionHighlighter.h:71
int pointLabelFontSize
Definition: cvSelectionHighlighter.h:70
bool isCellLabelVisible() const
Check if cell labels are visible.
Definition: cvSelectionHighlighter.h:330
void setLabelProperties(const SelectionLabelProperties &props, bool interactive=false)
Set label properties for selection mode.
Definition: cvSelectionHighlighter.cpp:923
bool cellLabelShadow
Definition: cvSelectionHighlighter.h:61
void setEnabled(bool enabled)
Enable/disable highlight.
Definition: cvSelectionHighlighter.cpp:260
int getPointSize(HighlightMode mode) const
Get point size for a specific mode.
Definition: cvSelectionHighlighter.cpp:840
QString fieldTypeString() const
Get human-readable field type string.
Definition: cvSelectionData.cpp:143
int pointSize
Definition: cvSelectionHighlighter.h:49
void setPointLabelArray(const QString &arrayName, bool visible=true)
Set the point label array name.
Definition: cvSelectionHighlighter.cpp:984
double getHighlightOpacity(HighlightMode mode) const
Get highlight opacity for a specific mode.
Definition: cvSelectionHighlighter.cpp:244
void setPointSize(int size, HighlightMode mode=SELECTED)
Set point size for highlight rendering.
Definition: cvSelectionHighlighter.cpp:795
~cvSelectionHighlighter()
Destructor.
Definition: cvSelectionHighlighter.cpp:100
Encapsulates selection data without exposing VTK types.
Definition: cvSelectionData.h:136
static bool Warning(const char *format,...)
Prints out a formatted warning message in console.
Definition: CVLog.cpp:133
#define QPCL_ENGINE_LIB_API
Definition: qPCL.h:15
void setHighlightColor(double r, double g, double b, HighlightMode mode=SELECTED)
Set highlight color.
Definition: cvSelectionHighlighter.cpp:105
void setCellLabelArray(const QString &arrayName, bool visible=true)
Set the cell label array name.
Definition: cvSelectionHighlighter.cpp:1003
void colorChanged(int mode)
Emitted when any highlight color changes.
vtkSmartPointer< vtkIdTypeArray > vtkArray() const
Get the underlying VTK array (for internal use only)
Definition: cvSelectionData.h:204
void setHighlightsVisible(bool visible)
Set visibility of all highlight actors.
Definition: cvSelectionHighlighter.cpp:460
bool cellLabelItalic
Definition: cvSelectionHighlighter.h:60
const double * getHighlightColor(HighlightMode mode) const
Get highlight color for a specific mode.
Definition: cvSelectionHighlighter.cpp:227
cvSelectionHighlighter()
Constructor.
Definition: cvSelectionHighlighter.cpp:45
ecvGenericVisualizer3D * m_viewer
Visualizer instance (abstract interface)
Definition: cvSelectionBase.h:129
Label properties for selection annotations.
Definition: cvSelectionHighlighter.h:46
QColor cellLabelColor
Definition: cvSelectionHighlighter.h:57
Helper class for highlighting selected elements in the visualizer.
Definition: cvSelectionHighlighter.h:101
const SelectionLabelProperties & getLabelProperties(bool interactive=false) const
Get label properties for selection mode.
Definition: cvSelectionHighlighter.cpp:917
bool pointLabelShadow
Definition: cvSelectionHighlighter.h:75
std::string name
Definition: FileIOFactory.cpp:129
@ BOUNDARY
Definition: cvSelectionHighlighter.h:122