 |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Go to the documentation of this file.
12 #include <QtCore/QMap>
13 #include <QtCore/QObject>
99 void disableSelection();
104 bool isSelectionActive()
const;
131 void clearSelection();
139 void clearCurrentSelection();
146 void growSelection();
153 void shrinkSelection();
179 bool resetLayers =
true);
189 int fieldAssociation,
190 bool resetLayers =
true);
196 bool hasSelection()
const;
262 vtkPolyData* getPolyData()
const;
291 ccMesh* getSourceMesh()
const;
297 bool isSourceObjectValid()
const;
308 void notifyDataUpdated();
318 void setPointPickingRadius(
unsigned int radius);
323 unsigned int getPointPickingRadius()
const;
336 void setGrowSelectionRemoveSeed(
bool remove);
342 void setGrowSelectionRemoveIntermediateLayers(
bool remove);
344 return m_growRemoveIntermediateLayers;
356 void expandSelection(
int layers,
357 bool removeSeed =
false,
358 bool removeIntermediateLayers =
false);
382 void selectionCompleted();
394 void selectionChanged();
414 void customBoxSelected(
int region[4]);
415 void customBoxSelected(
int xmin,
int ymin,
int xmax,
int ymax);
423 void customPolygonSelected(vtkIntArray*
polygon);
431 void zoomToBoxRequested(
int region[4]);
432 void zoomToBoxRequested(
int xmin,
int ymin,
int xmax,
int ymax);
453 int m_currentSelectionFieldAssociation;
468 bool m_growRemoveSeed =
false;
469 bool m_growRemoveIntermediateLayers =
false;
473 int m_numberOfLayers = 0;
cvSelectionHighlighter * getHighlighter()
Get the shared highlighter.
Definition: cvViewSelectionManager.h:238
vtkDataSet * getDataFromActor(vtkActor *actor)
Get data object from a specific actor (ParaView-style)
Definition: cvSelectionBase.cpp:49
const cvSelectionData & currentSelection() const
Get the current selection data (VTK-independent)
Definition: cvViewSelectionManager.cpp:356
bool isKindOf(CV_CLASS_ENUM type) const
Definition: ecvObject.h:128
void setSelectionModifier(SelectionModifier modifier)
Set the selection modifier.
Definition: cvViewSelectionManager.cpp:165
void setVisualizer(PclUtils::PCLVis *viewer)
Set the visualizer for selection operations.
Definition: cvSelectionPipeline.cpp:74
@ SELECT_FRUSTUM_POINTS
Select points in frustum.
void growSelection()
Grow the current selection by one layer.
Definition: cvViewSelectionManager.cpp:188
bool isCompatible(SelectionMode mode1, SelectionMode mode2) const
Check if a selection mode is compatible with the current mode.
Definition: cvViewSelectionManager.cpp:314
virtual unsigned size() const override
Returns the number of triangles.
Definition: ecvMesh.cpp:2143
SelectionModifier
Selection modifiers for combining selections.
Definition: cvSelectionData.h:80
void invalidateCachedSelection()
Clear selection cache and invalidate cached buffers.
Definition: cvSelectionPipeline.cpp:491
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
@ SELECT_SURFACE_CELLS_POLYGON
Select cells on surface (polygon)
GraphType data
Definition: graph_cut.cc:138
void setPointPickingRadius(unsigned int radius)
Point Picking Radius support (ParaView-aligned)
Definition: cvSelectionPipeline.cpp:516
@ MESH
Definition: CVTypes.h:105
static bool PrintVerbose(const char *format,...)
Prints out a verbose formatted message in console.
Definition: CVLog.cpp:103
#define signals
Definition: PythonPlugin.cpp:26
bool isA(CV_CLASS_ENUM type) const
Definition: ecvObject.h:131
vtkSmartPointer< vtkSelection > getLastSelection() const
Get the last selection result.
Definition: cvSelectionPipeline.h:195
static bool Print(const char *format,...)
Prints out a formatted message in console.
Definition: CVLog.cpp:113
@ POINT_CLOUD
Definition: CVTypes.h:104
@ SELECTED
Definition: cvSelectionHighlighter.h:120
virtual void setVisualizer(ecvGenericVisualizer3D *viewer)
Set the visualizer instance.
Definition: cvSelectionBase.h:56
unsigned int getPointPickingRadius() const
Get the current point picking radius.
Definition: cvSelectionPipeline.h:271
unsigned size() const override
Definition: PointCloudTpl.h:38
unsigned int getPointPickingRadius() const
Get the current point picking radius.
Definition: cvViewSelectionManager.cpp:593
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
Definition: ecvPointCloud.h:146
void shrinkSelection()
Shrink the current selection by one layer.
Definition: cvViewSelectionManager.cpp:194
Definition: CustomContextItem.cpp:18
SelectionModifier getCurrentModifier() const
Get the current selection modifier.
Definition: cvViewSelectionManager.h:124
void setGrowSelectionRemoveSeed(bool remove)
Grow/Shrink Selection Settings (ParaView-aligned)
Definition: cvViewSelectionManager.cpp:300
@ SELECT_SURFACE_CELLS_INTERACTIVELY
@ SHRINK_SELECTION
Shrink selection by one layer.
Selection algebra operations.
Definition: cvSelectionAlgebra.h:46
int getNumberOfLayers() const
Get the current number of layers.
Definition: cvViewSelectionManager.h:375
PclUtils::PCLVis * getPCLVis() const
Get PCLVis instance (for VTK-specific operations)
Definition: cvSelectionBase.cpp:33
bool isSelectionActive() const
Check if any selection mode is currently active.
Definition: cvViewSelectionManager.cpp:162
bool hasSelection() const
Check if there is a current selection.
Definition: cvViewSelectionManager.cpp:510
core::Tensor result
Definition: VtkUtils.cpp:76
CV_CLASS_ENUM getClassID() const override
Returns class ID.
Definition: ecvHObject.h:232
Advanced selection filtering system.
Definition: cvSelectionAlgebra.h:271
static bool Error(const char *format,...)
Display an error dialog with formatted message.
Definition: CVLog.cpp:143
SelectionMode getCurrentMode() const
Get the current active selection mode.
Definition: cvViewSelectionManager.h:110
void modifierChanged(SelectionModifier modifier)
Emitted when selection modifier changes.
@ SELECT_SURFACE_CELLS
Select cells on surface (rectangle)
cvSelectionAlgebra * getAlgebra()
Get the selection algebra utility.
Definition: cvViewSelectionManager.h:208
bool isEmpty() const
Check if selection is empty.
Definition: cvSelectionData.cpp:114
const double * e
Definition: essential_matrix_poly.h:10
@ SELECTION_DEFAULT
Replace selection (default)
cvSelectionData performAlgebraOperation(int op, const cvSelectionData &selectionA, const cvSelectionData &selectionB=cvSelectionData())
Perform algebra operation on selections.
Definition: cvViewSelectionManager.cpp:517
void clearHighlights()
Clear all highlights.
Definition: cvSelectionHighlighter.cpp:430
Selection pipeline abstraction layer.
Definition: cvSelectionPipeline.h:53
bool getGrowSelectionRemoveIntermediateLayers() const
Definition: cvViewSelectionManager.h:343
vtkPolyData * getPolyData() const
Get the underlying polyData for selection operations.
Definition: cvViewSelectionManager.cpp:538
Central manager for all selection operations in the view.
Definition: cvViewSelectionManager.h:52
Generic visualizer 3D interface.
Definition: ecvGenericVisualizer3D.h:15
int count() const
Get number of selected items.
Definition: cvSelectionData.cpp:119
cvSelectionPipeline * getPipeline()
Get the selection pipeline.
Definition: cvViewSelectionManager.h:214
void setVisualizer(PclUtils::PCLVis *viewer)
Set the visualizer.
Definition: cvSelectionAnnotation.cpp:46
bool getGrowSelectionRemoveSeed() const
Definition: cvViewSelectionManager.h:337
static vtkDataSet * getPrimaryDataFromSelection(vtkSelection *selection)
Get the primary data object from selection.
Definition: cvSelectionPipeline.cpp:768
void setGrowSelectionRemoveIntermediateLayers(bool remove)
Set whether to remove intermediate layers when growing selection.
Definition: cvViewSelectionManager.cpp:305
void modeChanged(SelectionMode mode)
Emitted when the selection mode changes.
@ SELECT_BLOCKS
Select blocks (rectangle)
cvSelectionFilter * getFilter()
Get the selection filter.
Definition: cvViewSelectionManager.h:220
QString fieldTypeString() const
Get human-readable field type string.
Definition: cvSelectionData.cpp:143
void setPointPickingRadius(unsigned int radius)
Set the point picking radius for single-point selection.
Definition: cvViewSelectionManager.cpp:586
QList< vtkActor * > getDataActors() const
Get all visible data actors from visualizer.
Definition: cvSelectionBase.cpp:117
static cvSelectionData expandSelection(vtkPolyData *polyData, const cvSelectionData &input, int layers, bool removeSeed=false, bool removeIntermediateLayers=false)
Expand selection (ParaView-compatible)
Definition: cvSelectionAlgebra.cpp:462
void clearSelection()
Clear all selections.
Definition: cvViewSelectionManager.cpp:175
cvSelectionAnnotationManager * getAnnotations()
Get the annotation manager.
Definition: cvViewSelectionManager.h:228
Encapsulates selection data without exposing VTK types.
Definition: cvSelectionData.h:136
ccHObject * getSourceObject() const
Get the source object for the current selection.
Definition: cvViewSelectionManager.cpp:636
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
ecvGenericVisualizer3D * getVisualizer() const
Get the visualizer instance.
Definition: cvSelectionBase.h:64
bool isSourceObjectValid() const
Check if the source object is still valid.
Definition: cvViewSelectionManager.cpp:706
ccPointCloud * getSourcePointCloud() const
Get the source object as ccPointCloud.
Definition: cvViewSelectionManager.cpp:641
@ SELECT_FRUSTUM_CELLS
Select cells in frustum.
void selectionChanged()
Emitted when the selection has changed (legacy - for backward compatibility)
Selection annotation manager.
Definition: cvSelectionAnnotation.h:112
void disableSelection()
Disable the current selection mode (legacy - state tracking only)
Definition: cvViewSelectionManager.cpp:147
SelectionMode
Selection modes matching ParaView's SelectionMode enum.
Definition: cvSelectionData.h:36
void expandSelection(int layers, bool removeSeed=false, bool removeIntermediateLayers=false)
Expand selection by given number of layers.
Definition: cvViewSelectionManager.cpp:200
Triangular mesh.
Definition: ecvMesh.h:35
boost::geometry::model::polygon< point_xy > polygon
Definition: TreeIso.cpp:37
bool canShrinkSelection() const
Check if the selection can be shrunk.
Definition: cvViewSelectionManager.h:368
@ SELECT_FRUSTUM_BLOCKS
Select blocks in frustum.
static cvViewSelectionManager * instance()
Get the singleton instance.
Definition: cvViewSelectionManager.cpp:38
Hierarchical CLOUDVIEWER Object.
Definition: ecvHObject.h:25
virtual QString getName() const
Returns object name.
Definition: ecvObject.h:72
@ SELECT_SURFACE_POINTS_INTERACTIVELY
vtkSmartPointer< vtkIdTypeArray > vtkArray() const
Get the underlying VTK array (for internal use only)
Definition: cvSelectionData.h:204
void setCurrentSelection(const cvSelectionData &selectionData, bool resetLayers=true)
Set the current selection data.
Definition: cvViewSelectionManager.cpp:370
void clearCurrentSelection()
Clear the current selection data (prevents crashes from stale references)
Definition: cvViewSelectionManager.cpp:601
@ CLEAR_SELECTION
Clear current selection.
@ SELECT_SURFACE_POINTS_POLYGON
Select points on surface (polygon)
@ SELECT_SURFACE_POINTS
Select points on surface (rectangle)
@ GROW_SELECTION
Expand selection by one layer.
ccMesh * getSourceMesh() const
Get the source object as ccMesh.
Definition: cvViewSelectionManager.cpp:675
void setSourceObject(ccHObject *obj)
Set the source object for selection operations.
Definition: cvViewSelectionManager.cpp:631
void enableSelection(SelectionMode mode)
Enable a selection mode (legacy - state tracking only)
Definition: cvViewSelectionManager.cpp:121
Helper class for highlighting selected elements in the visualizer.
Definition: cvSelectionHighlighter.h:101
Operation
Algebra operations Using enum class to avoid macro conflicts (e.g., DIFFERENCE may be defined as a ma...
Definition: cvSelectionAlgebra.h:57
static cvSelectionData performOperation(Operation op, const cvSelectionData &a, const cvSelectionData &b, vtkPolyData *polyData=nullptr)
Perform algebra operation on two selections.
Definition: cvSelectionAlgebra.cpp:211
void notifyDataUpdated()
Notify that scene data has been updated.
Definition: cvViewSelectionManager.cpp:577
void setVisualizer(ecvGenericVisualizer3D *viewer) override
Set the visualizer for all selection operations.
Definition: cvViewSelectionManager.cpp:89