ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
PCLVis.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 #ifdef _MSC_VER
11 #pragma warning(disable : 4996) // Use of [[deprecated]] feature
12 #endif
13 
14 // LOCAL
15 #include <Utils/PCLCloud.h>
16 
17 #include <map>
18 #include <mutex>
19 #include <thread>
20 
21 #include "WidgetMap.h"
22 #include "qPCL.h"
23 
24 // Forward declaration
25 namespace PclUtils {
26 namespace renders {
28 }
29 } // namespace PclUtils
30 
31 // CV_DB_LIB
32 #include <ecvColorTypes.h>
33 #include <ecvDisplayTools.h> // For AxesGridProperties
34 #include <ecvDrawContext.h>
35 #include <ecvGenericVisualizer3D.h>
36 #include <ecvHObject.h>
37 
38 // VTK
39 #include <vtkBoundingBox.h> // needed for iVar
40 
41 // PCL
42 #include <pcl/visualization/pcl_visualizer.h>
43 
44 class vtkLODActor;
45 class vtkCamera;
46 class vtkRender;
47 class vtkPointPicker;
48 class vtkAreaPicker;
49 class vtkPropPicker;
50 class vtkAbstractWidget;
51 class vtkRenderWindow;
52 class vtkMatrix4x4;
53 class vtkLightKit;
54 class vtkCubeAxesActor;
55 class vtkCameraOrientationWidget;
56 class ccGenericMesh;
57 class ccPointCloud;
58 class ccMesh;
59 class ccHObject;
60 class ccBBox;
61 class ecvOrientedBBox;
62 class ccSensor;
63 class ecvPointpickingTools;
64 class ccMaterial;
65 class ccMaterialSet;
66 
67 namespace cloudViewer {
68 namespace geometry {
69 class LineSet;
70 }
71 } // namespace cloudViewer
72 
73 namespace VTKExtensions {
76 } // namespace VTKExtensions
77 
78 namespace PclUtils {
79 
81  public pcl::visualization::PCLVisualizer {
82  Q_OBJECT
83 public:
86  interactor_style,
87  const std::string& viewerName = "",
88  bool initIterator = false,
89  int argc = 0,
90  char** argv = nullptr); // deprecated!
94  interactor_style,
95  const std::string& viewerName = "",
96  bool initIterator = false,
97  int argc = 0,
98  char** argv = nullptr);
99 
100  virtual ~PCLVis();
101 
102  // do some initialization jobs
103  void initialize();
104 
105  // center axes configuration
106  void configCenterAxes();
107 
108  void configInteractorStyle(
110  interactor_style);
111 
112 public:
115  void hidePclMarkerAxes();
116  bool pclMarkerAxesShown();
117  void showPclMarkerAxes(vtkRenderWindowInteractor* interactor = nullptr);
118  void hideOrientationMarkerWidgetAxes();
119  void showOrientationMarkerWidgetAxes(vtkRenderWindowInteractor* interactor);
120  void toggleOrientationMarkerWidgetAxes();
121 
127  bool removeActorFromRenderer(const vtkSmartPointer<vtkProp>& actor,
128  int viewport = 0);
129 
130  void addActorToRenderer(const vtkSmartPointer<vtkProp>& actor,
131  int viewport = 0);
132 
137  void UpdateScreen();
138 
144  void setupInteractor(vtkRenderWindowInteractor* iren, vtkRenderWindow* win);
145 
149  return (interactor_);
150  }
151 
152  // Camera Tools
153  pcl::visualization::Camera getCamera(int viewport = 0);
154  vtkSmartPointer<vtkCamera> getVtkCamera(int viewport = 0);
155 
156  void setModelViewMatrix(const ccGLMatrixd& viewMat, int viewport = 0);
157  double getParallelScale(int viewport = 0);
158  void setParallelScale(double scale, int viewport = 0);
159 
160  void setOrthoProjection(int viewport = 0);
161  void setPerspectiveProjection(int viewport = 0);
162  bool getPerspectiveState(int viewport = 0);
163 
164  inline bool getAutoUpateCameraPos() { return m_autoUpdateCameraPos; }
165  inline void setAutoUpateCameraPos(bool state) {
166  m_autoUpdateCameraPos = state;
167  }
168 
169  void rotateWithAxis(const CCVector2i& pos,
170  const CCVector3d& axis,
171  double angle,
172  int viewport = 0);
173 
174 public:
178  void getCenterOfRotation(double center[3]);
182  void resetCenterOfRotation(int viewport = 0);
183 
184  static void ExpandBounds(double bounds[6], vtkMatrix4x4* matrix);
185 
192  void setCenterOfRotation(double x, double y, double z);
193  inline void setCenterOfRotation(double xyz[3]) {
194  setCenterOfRotation(xyz[0], xyz[1], xyz[2]);
195  }
196 
197  void setRotationFactor(double factor);
198  double getRotationFactor();
199 
200  //*****************************************************************
201  // Forwarded to center axes.
202  void setCenterAxesVisibility(bool);
203 
204  //*****************************************************************
205  // Forwarded to vtkPVInteractorStyle if present on local processes.
206  virtual void setCamera2DManipulators(const int manipulators[9]);
207  virtual void setCamera3DManipulators(const int manipulators[9]);
208  void setCameraManipulators(VTKExtensions::vtkCustomInteractorStyle* style,
209  const int manipulators[9]);
210  virtual void setCamera2DMouseWheelMotionFactor(double factor);
211  virtual void setCamera3DMouseWheelMotionFactor(double factor);
216  virtual void updateCenterAxes();
217 
222  void synchronizeGeometryBounds(int viewport = 0);
223 
224  // Return a depth value for z-buffer
225  double getGLDepth(int x, int y);
226 
227  double getCameraFocalDistance(int viewport = 0);
228  void setCameraFocalDistance(double focal_distance, int viewport = 0);
229 
237  void zoomCamera(double zoomFactor, int viewport = 0);
238 
239  void getProjectionTransformMatrix(Eigen::Matrix4d& proj);
240 
241  void getModelViewTransformMatrix(Eigen::Matrix4d& view);
242 
252  void resetCameraClippingRange(int viewport = 0);
254  this->resetCameraClippingRange(0);
255  }
256  void resetCamera(const ccBBox* bbox);
257  void resetCamera(double xMin,
258  double xMax,
259  double yMin,
260  double yMax,
261  double zMin,
262  double zMax);
263  inline void resetCamera() {
264  pcl::visualization::PCLVisualizer::resetCamera();
265  }
266  inline void resetCamera(double bounds[6]) {
267  resetCamera(bounds[0], bounds[1], bounds[2], bounds[3], bounds[4],
268  bounds[5]);
269  }
270  void getReasonableClippingRange(double range[2], int viewport = 0);
271  void expandBounds(double bounds[6], vtkMatrix4x4* matrix);
272  void setCameraViewAngle(double viewAngle, int viewport = 0);
273 
274  void draw(const CC_DRAW_CONTEXT& context, const PCLCloud::Ptr& smCloud);
275  void draw(const CC_DRAW_CONTEXT& context, const PCLMesh::Ptr& pclMesh);
276  void draw(const CC_DRAW_CONTEXT& context,
277  const PCLTextureMesh::Ptr& textureMesh);
278  void draw(const CC_DRAW_CONTEXT& context,
279  const PCLPolygon::Ptr& pclPolygon,
280  bool closed);
281  void draw(const CC_DRAW_CONTEXT& context, const ccSensor* sensor);
282  void draw(const CC_DRAW_CONTEXT& context,
283  const cloudViewer::geometry::LineSet* lineset);
284 
285  void transformEntities(const CC_DRAW_CONTEXT& context);
286  vtkSmartPointer<vtkTransform> getTransformation(
287  const CC_DRAW_CONTEXT& context, const CCVector3d& origin);
288  void updateNormals(const CC_DRAW_CONTEXT& context,
289  const PCLCloud::Ptr& smCloud);
290  void updateShadingMode(const CC_DRAW_CONTEXT& context, PCLCloud& smCloud);
291  bool removeEntities(const CC_DRAW_CONTEXT& context);
292  void hideShowActors(bool visibility,
293  const std::string& viewID,
294  int viewport = 0);
295  void hideShowWidgets(bool visibility,
296  const std::string& viewID,
297  int viewport = 0);
298 
299  bool addScalarBar(const CC_DRAW_CONTEXT& context);
300  bool updateScalarBar(const CC_DRAW_CONTEXT& context);
301  bool addCaption(const std::string& text,
302  const CCVector2& pos2D,
303  const CCVector3& anchorPos,
304  double r,
305  double g,
306  double b,
307  double a,
308  int fontSize = 10,
309  const std::string& viewID = "caption",
310  bool anchorDragable = false,
311  int viewport = 0);
312 
313  bool updateCaption(const std::string& text,
314  const CCVector2& pos2D,
315  const CCVector3& anchorPos,
316  double r,
317  double g,
318  double b,
319  double a,
320  int fontSize = 10,
321  const std::string& viewID = "caption",
322  int viewport = 0);
323 
325 
331  bool getCaptionPosition(const std::string& viewID,
332  float& posX,
333  float& posY);
334 
335  bool addPolyline(const PCLPolygon::ConstPtr pclPolygon,
336  double r,
337  double g,
338  double b,
339  float width = 1.0f,
340  const std::string& id = "multiline",
341  int viewport = 0);
342  bool updateTexture(const CC_DRAW_CONTEXT& context,
343  const ccMaterialSet* materials);
349  bool addTextureMesh(const PCLTextureMesh& mesh,
350  const std::string& id,
351  int viewport);
361  bool addTextureMeshFromCCMesh(ccGenericMesh* mesh,
362  const std::string& id,
363  int viewport = 0);
364 
374  bool addTextureMeshFromOBJ(const std::string& obj_path,
375  const std::string& id,
376  int viewport = 0,
377  int quality = 2,
378  bool enable_cache = true);
379 
391  bool addTextureMeshFromOBJAdvanced(const std::string& obj_path,
392  const std::string& mtl_path,
393  const std::string& id,
394  int viewport = 0,
395  int max_texture_size = 4096,
396  bool use_mipmaps = true,
397  bool enable_cache = true);
398 
402  void clearTextureCache();
403 
409  void getTextureCacheInfo(size_t& count, size_t& memory_bytes) const;
410 
411  bool addOrientedCube(const ccGLMatrixd& trans,
412  double width,
413  double height,
414  double depth,
415  double r = 1.0,
416  double g = 1.0,
417  double b = 1.0,
418  const std::string& id = "cube",
419  int viewport = 0);
420  bool addOrientedCube(const Eigen::Vector3f& translation,
421  const Eigen::Quaternionf& rotation,
422  double width,
423  double height,
424  double depth,
425  double r = 1.0,
426  double g = 1.0,
427  double b = 1.0,
428  const std::string& id = "cube",
429  int viewport = 0);
430  bool addOrientedCube(const ecvOrientedBBox& obb,
431  const std::string& id = "cube",
432  int viewport = 0);
433  void displayText(const CC_DRAW_CONTEXT& context);
434 
435 private:
436  // Texture rendering manager
437  std::unique_ptr<renders::TextureRenderManager> texture_render_manager_;
438 
439  // Store transformation matrices to prevent memory leaks
440  // Maps view ID to transformation matrix smart pointer
441  std::map<std::string, vtkSmartPointer<vtkMatrix4x4>> transformation_map_;
442 
443 public:
444  void setPointSize(const unsigned char pointSize,
445  const std::string& viewID,
446  int viewport = 0);
447  void setScalarFieldName(const std::string& viewID,
448  const std::string& scalarName,
449  int viewport = 0);
450 
458  void addScalarFieldToVTK(const std::string& viewID,
459  ccPointCloud* cloud,
460  int scalarFieldIndex,
461  int viewport = 0);
462 
473  void syncAllScalarFieldsToVTK(const std::string& viewID,
474  ccPointCloud* cloud,
475  int viewport = 0);
476 
488  void setCurrentSourceObject(ccHObject* obj, const std::string& viewID);
489 
494  void removeSourceObject(const std::string& viewID);
495 
501  ccHObject* getSourceObject(const std::string& viewID) const;
502 
508  ccPointCloud* getSourceCloud(const std::string& viewID) const;
509 
515  ccMesh* getSourceMesh(const std::string& viewID) const;
516 
522  bool hasSourceObject(const std::string& viewID) const;
523 
524  void setPointCloudUniqueColor(double r,
525  double g,
526  double b,
527  const std::string& viewID,
528  int viewport = 0);
529  void resetScalarColor(const std::string& viewID,
530  bool flag = true,
531  int viewport = 0);
532  void setShapeUniqueColor(float r,
533  float g,
534  float b,
535  const std::string& viewID,
536  int viewport = 0);
537  void setLineWidth(const unsigned char lineWidth,
538  const std::string& viewID,
539  int viewport = 0);
540  void setMeshRenderingMode(MESH_RENDERING_MODE mode,
541  const std::string& viewID,
542  int viewport = 0);
543  void setLightMode(const std::string& viewID, int viewport = 0);
544  void setPointCloudOpacity(double opacity,
545  const std::string& viewID,
546  int viewport = 0);
547  void setShapeOpacity(double opacity,
548  const std::string& viewID,
549  int viewport = 0);
550 
564  void setMeshOpacity(double opacity,
565  const std::string& viewID,
566  int viewport = 0);
567 
568  /*
569  * value = 0, PCL_VISUALIZER_SHADING_FLAT
570  * value = 1, PCL_VISUALIZER_SHADING_GOURAUD
571  * value = 2, PCL_VISUALIZER_SHADING_PHONG
572  */
573  void setShapeShadingMode(SHADING_MODE mode,
574  const std::string& viewID,
575  int viewport = 0);
576  void setMeshShadingMode(SHADING_MODE mode,
577  const std::string& viewID,
578  int viewport = 0);
579 
581  getPCLInteractorStyle();
582  vtkActor* getActorById(const std::string& viewId);
583  vtkProp* getPropById(const std::string& viewId);
584  vtkSmartPointer<vtkPropCollection> getPropCollectionById(
585  const std::string& viewId);
586  std::string getIdByActor(vtkProp* actor);
587  vtkAbstractWidget* getWidgetById(const std::string& viewId);
588 
593  vtkRenderer* getCurrentRenderer(int viewport = 0);
594 
595 public:
600  inline bool containWidget(const std::string& id) const {
601  return (m_widget_map->find(id) != m_widget_map->end() ||
602  m_prop_map->find(id) != m_prop_map->end());
603  }
604 
606  inline WidgetActorMapPtr getWidgetActorMap() { return (m_widget_map); }
607 
609  inline PropActorMapPtr getPropActorMap() { return (m_prop_map); }
610 
611  inline vtkBoundingBox getVisibleGeometryBounds() { return GeometryBounds; }
612 
615  return TwoDInteractorStyle;
616  }
617 
620  return ThreeDInteractorStyle;
621  }
622 
623 protected:
626 
629 
630  vtkBoundingBox GeometryBounds;
638 
639 private:
640  bool removeWidgets(const std::string& viewId, int viewport);
641  void removePointClouds(const std::string& viewId, int viewport = 0);
642  void removeShapes(const std::string& viewId, int viewport = 0);
643  void removeMesh(const std::string& viewId, int viewport = 0);
644  void removeText2D(const std::string& viewId, int viewport = 0);
645  void removeText3D(const std::string& viewId, int viewport = 0);
646  void removeALL(int viewport = 0);
647 
648 private:
649  void registerMouse();
650  void registerKeyboard();
651  void registerAreaPicking();
652  void registerPointPicking();
653 
654  void registerInteractorStyle(bool useDefault = false);
655 
656  void pointPickingProcess(const pcl::visualization::PointPickingEvent& event,
657  void* args);
658  void areaPickingEventProcess(
659  const pcl::visualization::AreaPickingEvent& event, void* args);
660  void mouseEventProcess(const pcl::visualization::MouseEvent& event,
661  void* args);
662  void keyboardEventProcess(const pcl::visualization::KeyboardEvent& event,
663  void* args);
664 
665 public:
666  // Util Tools
667  inline bool isPointPickingEnabled() { return m_pointPickingEnabled; }
668  inline void setPointPickingEnabled(bool state) {
669  m_pointPickingEnabled = state;
670  }
671  inline void togglePointPicking() {
672  setPointPickingEnabled(!isPointPickingEnabled());
673  }
674 
675  inline bool isAreaPickingEnabled() { return m_areaPickingEnabled; }
676  inline void setAreaPickingEnabled(bool state) {
677  m_areaPickingEnabled = state;
678  }
679 
680  inline bool isActorPickingEnabled() { return m_actorPickingEnabled; }
681  inline void setActorPickingEnabled(bool state) {
682  m_actorPickingEnabled = state;
683  }
684  inline void toggleActorPicking() {
685  setActorPickingEnabled(!isActorPickingEnabled());
686  }
687 
688  void toggleAreaPicking();
689  void exitCallbackProcess();
690  void setAreaPickingMode(bool state);
691  vtkActor* pickActor(double x, double y);
692  std::string pickItem(double x0 = -1,
693  double y0 = -1,
694  double x1 = 5.0,
695  double y1 = 5.0);
696 
697  QImage renderToImage(int zoomFactor = 1,
698  bool renderOverlayItems = false,
699  bool silent = false,
700  int viewport = 0);
701 
702 protected:
703  // Util Variables
708 
710 
711  std::mutex m_cloud_mutex;
712 
713 signals:
714  void interactorPickedEvent(vtkActor* actor);
715 
716 public:
717  // ========== View Properties (ParaView-compatible) ==========
718 
727  void setLightIntensity(double intensity);
728 
733  double getLightIntensity() const;
734 
735  // ========================================================================
736  // Data Axes Grid (Unified Interface with DataAxesGridProperties struct)
737  // ========================================================================
738 
750  void SetDataAxesGridProperties(const std::string& viewID,
751  const AxesGridProperties& props);
752 
758  void GetDataAxesGridProperties(const std::string& viewID,
759  AxesGridProperties& props) const;
760 
765  void RemoveDataAxesGrid(const std::string& viewID);
766 
775  void ToggleCameraOrientationWidget(bool show);
776 
781  bool IsCameraOrientationWidgetShown() const;
782 
783 protected:
788 
789  std::vector<int> m_selected_slice;
790 
791  // Source objects for selection operations (allows direct extraction)
792  // Maps viewID -> ccHObject* to support multiple objects in the scene
793  // Note: ccHObject is not a QObject, so we use raw pointers
794  std::map<std::string, ccHObject*> m_sourceObjectMap;
795 
796  // View Properties (ParaView-compatible)
797  double m_lightIntensity; // Current light intensity (0.0-1.0)
798 
799  // Axes Grid actors (ParaView-style)
800  // Data Axes Grid: one per object (viewID -> actor mapping)
801  // Data Axes Grid: per-object, bound to viewID
802  std::map<std::string, vtkSmartPointer<vtkCubeAxesActor>> m_dataAxesGridMap;
803 
804  // Camera Orientation Widget (ParaView-style)
806 };
807 
808 typedef std::shared_ptr<PCLVis> PCLVisPtr;
809 } // namespace PclUtils
PclUtils::PCLVis::toggleActorPicking
void toggleActorPicking()
Definition: PCLVis.h:684
ecvColor::white
constexpr Rgb white(MAX, MAX, MAX)
ecvGenericVisualizer3D.h
PclUtils::PCLVisPtr
std::shared_ptr< PCLVis > PCLVisPtr
Definition: PCLVis.h:808
ecvDisplayTools::ToggleOrientationMarker
static void ToggleOrientationMarker(bool state=true)
Definition: ecvDisplayTools.h:489
PclUtils::PCLVis::setCurrentSourceObject
void setCurrentSourceObject(ccHObject *obj, const std::string &viewID)
Set the source object for selection operations.
Definition: PCLVis.cpp:2400
cloudViewer
Generic file read and write utility for python interface.
Definition: CloudViewerConfig.cpp:12
colors
double colors[3]
Definition: TriangleMeshIO.cpp:53
PclUtils::PCLVis::m_axes_widget
vtkSmartPointer< vtkOrientationMarkerWidget > m_axes_widget
Definition: PCLVis.h:784
ecvMaterial.h
FROM_PCL_CLOUD
#define FROM_PCL_CLOUD
Definition: PCLConv.h:11
ecvTools.h
PclUtils::PCLVis::hidePclMarkerAxes
void hidePclMarkerAxes()
Marker Axes.
Definition: PCLVis.cpp:2864
PclUtils::PCLVis::updateTexture
bool updateTexture(const CC_DRAW_CONTEXT &context, const ccMaterialSet *materials)
Definition: PCLVis.cpp:1542
PclUtils::PCLVis::GetDataAxesGridProperties
void GetDataAxesGridProperties(const std::string &viewID, AxesGridProperties &props) const
Get Data Axes Grid properties (Unified Interface)
Definition: PCLVis.cpp:3811
M_PI
constexpr double M_PI
Pi.
Definition: CVConst.h:19
pcl
Definition: MaterialConverter.h:18
ORIENT_MODE
#define ORIENT_MODE
Definition: PCLVis.cpp:124
ecvColor::light
constexpr Rgbaf light(0.66f, 0.66f, 0.66f, 1.00f)
ecvColorScale.h
AxesGridProperties::zUseCustomLabels
bool zUseCustomLabels
Definition: ecvDisplayTools.h:71
ccObject::isKindOf
bool isKindOf(CV_CLASS_ENUM type) const
Definition: ecvObject.h:128
ECV_TEXT2D
@ ECV_TEXT2D
Definition: ecvDrawContext.h:71
CV_TYPES::CAMERA_SENSOR
@ CAMERA_SENSOR
Definition: CVTypes.h:118
FileSystem.h
AxesGridProperties::zMax
double zMax
Definition: ecvDisplayTools.h:82
PclUtils::PCLVis::updateScalarBar
bool updateScalarBar(const CC_DRAW_CONTEXT &context)
Definition: PCLVis.cpp:1241
PclUtils::PCLVis::showOrientationMarkerWidgetAxes
void showOrientationMarkerWidgetAxes(vtkRenderWindowInteractor *interactor)
Definition: PCLVis.cpp:2889
x
normal_z x
Definition: my_point_types.h:165
AxesGridProperties::opacity
double opacity
Definition: ecvDisplayTools.h:62
PclUtils::PCLVis::getWidgetActorMap
WidgetActorMapPtr getWidgetActorMap()
Return a pointer to the WidgetActorMap this visualizer uses.
Definition: PCLVis.h:606
PclUtils::PCLVis::getReasonableClippingRange
void getReasonableClippingRange(double range[2], int viewport=0)
Definition: PCLVis.cpp:664
ecvColor::RgbTpl::ToEigen
static Eigen::Vector3d ToEigen(const Type col[3])
Definition: ecvColorTypes.h:72
Tuple3Tpl::x
Type x
Definition: CVGeom.h:137
PclUtils::PCLVis::getVisibleGeometryBounds
vtkBoundingBox getVisibleGeometryBounds()
Definition: PCLVis.h:611
PclUtils::PropActorMapPtr
std::shared_ptr< PropActorMap > PropActorMapPtr
Definition: WidgetMap.h:40
ecvColorTypes.h
cloudViewer::geometry::LineSet::CreateFromOrientedBoundingBox
static std::shared_ptr< LineSet > CreateFromOrientedBoundingBox(const ecvOrientedBBox &box)
Factory function to create a LineSet from an OrientedBoundingBox.
Definition: LineSetFactory.cpp:71
PclUtils::PCLVis::getCameraFocalDistance
double getCameraFocalDistance(int viewport=0)
Definition: PCLVis.cpp:586
PclUtils::PCLVis::getCenterOfRotation
void getCenterOfRotation(double center[3])
Definition: PCLVis.cpp:323
PclUtils::PCLVis::interactorPickedEvent
void interactorPickedEvent(vtkActor *actor)
PclUtils::PCLVis::m_cloud_mutex
std::mutex m_cloud_mutex
Definition: PCLVis.h:711
normal
double normal[3]
Definition: FileIOFactory.cpp:53
PclUtils::PCLVis::containWidget
bool containWidget(const std::string &id) const
Check if the widgets or props with the given id was already added to this visualizer.
Definition: PCLVis.h:600
cloudViewer::ScalarField::getValue
ScalarType & getValue(std::size_t index)
Definition: ScalarField.h:92
CV_TYPES::GBL_SENSOR
@ GBL_SENSOR
Definition: CVTypes.h:117
PclUtils::PCLVis::setCenterOfRotation
void setCenterOfRotation(double x, double y, double z)
Definition: PCLVis.cpp:389
VTKExtensions::vtkPVCenterAxesActor::New
static vtkPVCenterAxesActor * New()
data
GraphType data
Definition: graph_cut.cc:138
PclUtils::PCLVis::setMeshOpacity
void setMeshOpacity(double opacity, const std::string &viewID, int viewport=0)
Set opacity for mesh (textured or non-textured)
Definition: PCLVis.cpp:2541
TransformInfo::eulerZYX
CCVector3d eulerZYX
Definition: ecvDrawContext.h:215
ccGenericMesh::getMaterialSet
virtual const ccMaterialSet * getMaterialSet() const =0
ccHObjectCaster::ToPointCloud
static ccPointCloud * ToPointCloud(ccHObject *obj, bool *isLockedVertices=nullptr)
Converts current object to 'equivalent' ccPointCloud.
Definition: ecvHObjectCaster.cpp:54
AxesGridProperties::spacing
double spacing
Definition: ecvDisplayTools.h:59
PclUtils::PCLVis::getCamera
pcl::visualization::Camera getCamera(int viewport=0)
Definition: PCLVis.cpp:2722
CV_TYPES::MESH
@ MESH
Definition: CVTypes.h:105
PclUtils::PCLVis::addCaption
bool addCaption(const std::string &text, const CCVector2 &pos2D, const CCVector3 &anchorPos, double r, double g, double b, double a, int fontSize=10, const std::string &viewID="caption", bool anchorDragable=false, int viewport=0)
Definition: PCLVis.cpp:1353
vtkPVTrackballZoom.h
PclUtils::PCLVis::updateCenterAxes
virtual void updateCenterAxes()
Definition: PCLVis.cpp:502
ccGLMatrixd
Double version of ccGLMatrixTpl.
Definition: ecvGLMatrix.h:56
CVLog::PrintVerbose
static bool PrintVerbose(const char *format,...)
Prints out a verbose formatted message in console.
Definition: CVLog.cpp:103
TransformInfo::RotateParam::rotAxis
CCVector3 rotAxis
Definition: ecvDrawContext.h:203
position
math::float3 position
Definition: LineSetBuffers.cpp:44
PclUtils::PCLVis::transformEntities
void transformEntities(const CC_DRAW_CONTEXT &context)
Definition: PCLVis.cpp:1011
PclUtils::PCLVis::setScalarFieldName
void setScalarFieldName(const std::string &viewID, const std::string &scalarName, int viewport=0)
Definition: PCLVis.cpp:2457
PclUtils::PCLVis::getCurrentRenderer
vtkRenderer * getCurrentRenderer(int viewport=0)
Definition: PCLVis.cpp:2924
signals
#define signals
Definition: PythonPlugin.cpp:26
PclUtils::PCLVis::setCamera2DMouseWheelMotionFactor
virtual void setCamera2DMouseWheelMotionFactor(double factor)
Definition: PCLVis.cpp:488
ccObject::isA
bool isA(CV_CLASS_ENUM type) const
Definition: ecvObject.h:131
ccBBox
Bounding box structure.
Definition: ecvBBox.h:25
PclUtils::PCLVis::m_cameraOrientationWidget
vtkSmartPointer< vtkCameraOrientationWidget > m_cameraOrientationWidget
Definition: PCLVis.h:805
PclTools::CreateCube
vtkSmartPointer< vtkPolyData > CreateCube(double width, double height, double depth, const ccGLMatrixd &trans)
Definition: PclTools.cpp:1101
cloudViewer::PointCloudTpl::getNumberOfScalarFields
unsigned getNumberOfScalarFields() const
Returns the number of associated (and active) scalar fields.
Definition: PointCloudTpl.h:345
ECV_WIREFRAME_MODE
@ ECV_WIREFRAME_MODE
Definition: ecvDrawContext.h:46
CVLog::Print
static bool Print(const char *format,...)
Prints out a formatted message in console.
Definition: CVLog.cpp:113
PclUtils::PCLVis::internalResetCameraClippingRange
void internalResetCameraClippingRange()
Definition: PCLVis.h:253
PclUtils::PCLVis::setParallelScale
void setParallelScale(double scale, int viewport=0)
Definition: PCLVis.cpp:2781
CV_TYPES::POINT_CLOUD
@ POINT_CLOUD
Definition: CVTypes.h:104
PclUtils::PCLVis::addActorToRenderer
void addActorToRenderer(const vtkSmartPointer< vtkProp > &actor, int viewport=0)
Definition: PCLVis.cpp:3137
vtkScalarBarWidgetCustom.h
CustomVtkCaptionWidget.h
ccGenericMesh::getAssociatedCloud
virtual ccGenericPointCloud * getAssociatedCloud() const =0
Returns the vertices cloud.
ecvBBox.h
PclUtils::PCLVis::synchronizeGeometryBounds
void synchronizeGeometryBounds(int viewport=0)
Definition: PCLVis.cpp:525
ecvDisplayTools.h
PclUtils::PCLVis::getWidgetById
vtkAbstractWidget * getWidgetById(const std::string &viewId)
Definition: PCLVis.cpp:3072
PclUtils::PCLVis::getSourceObject
ccHObject * getSourceObject(const std::string &viewID) const
Get the source object for a given viewID.
Definition: PCLVis.cpp:2425
PclUtils::PCLVis::GeometryBounds
vtkBoundingBox GeometryBounds
Definition: PCLVis.h:630
PclUtils::PCLVis::PCLVis
PCLVis(vtkSmartPointer< VTKExtensions::vtkCustomInteractorStyle > interactor_style, const std::string &viewerName="", bool initIterator=false, int argc=0, char **argv=nullptr)
Default constructor.
Definition: PCLVis.cpp:132
PclUtils::PCLVis::m_area_picker
vtkSmartPointer< vtkAreaPicker > m_area_picker
Definition: PCLVis.h:786
PclUtils::PCLVis::pickItem
std::string pickItem(double x0=-1, double y0=-1, double x1=5.0, double y1=5.0)
Definition: PCLVis.cpp:3332
PclUtils::PCLVis::ExpandBounds
static void ExpandBounds(double bounds[6], vtkMatrix4x4 *matrix)
Definition: PCLVis.cpp:329
PclUtils::PCLVis::setPointSize
void setPointSize(const unsigned char pointSize, const std::string &viewID, int viewport=0)
Definition: PCLVis.cpp:2237
cloudViewer::PointCloudTpl::size
unsigned size() const override
Definition: PointCloudTpl.h:38
PclUtils::PCLVis::getProjectionTransformMatrix
void getProjectionTransformMatrix(Eigen::Matrix4d &proj)
Definition: PCLVis.cpp:608
ccPointCloud
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
Definition: ecvPointCloud.h:146
PCLCloud.h
cc2DLabel
2D label (typically attached to points)
Definition: ecv2DLabel.h:22
cloudViewer::ScalarField
A simple scalar field (to be associated to a point cloud)
Definition: ScalarField.h:25
vtkSmartPointer< VTKExtensions::vtkCustomInteractorStyle >
PclUtils::PCLVis::ToggleCameraOrientationWidget
void ToggleCameraOrientationWidget(bool show)
Toggle Camera Orientation Widget visibility (ParaView-style)
Definition: PCLVis.cpp:3872
MeshTextureApplier.h
ccHObjectCaster::To2DLabel
static cc2DLabel * To2DLabel(ccHObject *obj)
Converts current object to cc2DLabel (if possible)
Definition: ecvHObjectCaster.cpp:262
PclUtils
Definition: CustomContextItem.cpp:18
ecvColor::RgbTpl::r
Type r
Definition: ecvColorTypes.h:54
PclUtils::PCLVis::hasSourceObject
bool hasSourceObject(const std::string &viewID) const
Check if a source object exists for the given viewID.
Definition: PCLVis.cpp:2453
PclUtils::PCLVis::addScalarFieldToVTK
void addScalarFieldToVTK(const std::string &viewID, ccPointCloud *cloud, int scalarFieldIndex, int viewport=0)
Add scalar field data from ccPointCloud to VTK polydata.
Definition: PCLVis.cpp:2249
CVLog::PrintDebug
static bool PrintDebug(const char *format,...)
Same as Print, but works only in Debug mode.
Definition: CVLog.cpp:153
PclUtils::PCLVis::rotateWithAxis
void rotateWithAxis(const CCVector2i &pos, const CCVector3d &axis, double angle, int viewport=0)
Definition: PCLVis.cpp:261
AxesGridProperties
Data Axes Grid properties structure Encapsulates all properties for vtkCubeAxesActor configuration.
Definition: ecvDisplayTools.h:54
PclUtils::PCLVis::setPointCloudOpacity
void setPointCloudOpacity(double opacity, const std::string &viewID, int viewport=0)
Definition: PCLVis.cpp:2514
ecvTextParam::textScale
double textScale
Definition: ecvDrawContext.h:321
PclUtils::PCLVis::setActorPickingEnabled
void setActorPickingEnabled(bool state)
Definition: PCLVis.h:681
PclUtils::PCLVis::getPropActorMap
PropActorMapPtr getPropActorMap()
Return a pointer to the PropActorMap this visualizer uses.
Definition: PCLVis.h:609
color
math::float4 color
Definition: LineSetBuffers.cpp:46
TransformInfo::transVecEnd
CCVector3 transVecEnd
Definition: ecvDrawContext.h:221
ccHObject::getDisplayBB_recursive
virtual ccBBox getDisplayBB_recursive(bool relative)
Returns the bounding-box of this entity and it's children WHEN DISPLAYED.
Definition: ecvHObject.cpp:817
PclUtils::WidgetActorMapPtr
std::shared_ptr< WidgetActorMap > WidgetActorMapPtr
Definition: WidgetMap.h:37
PclUtils::PCLVis::m_pointPickingEnabled
bool m_pointPickingEnabled
Definition: PCLVis.h:705
PclUtils::PCLVis::getGLDepth
double getGLDepth(int x, int y)
Definition: PCLVis.cpp:571
AxesGridProperties::yMax
double yMax
Definition: ecvDisplayTools.h:81
AxesGridProperties::xCustomLabels
QList< QPair< double, QString > > xCustomLabels
Definition: ecvDisplayTools.h:75
AxesGridProperties::showGrid
bool showGrid
Definition: ecvDisplayTools.h:65
ECV_LINES_3D
@ ECV_LINES_3D
Definition: ecvDrawContext.h:59
PclUtils::PCLVis::setCamera3DMouseWheelMotionFactor
virtual void setCamera3DMouseWheelMotionFactor(double factor)
Definition: PCLVis.cpp:495
PclUtils::PCLVis::showPclMarkerAxes
void showPclMarkerAxes(vtkRenderWindowInteractor *interactor=nullptr)
Definition: PCLVis.cpp:2858
PclUtils::PCLVis::updateShadingMode
void updateShadingMode(const CC_DRAW_CONTEXT &context, PCLCloud &smCloud)
Definition: PCLVis.cpp:1110
PclUtils::renders::TextureRenderManager
Texture rendering manager.
Definition: TextureRenderManager.h:32
PCLConv.h
CCVector3
Vector3Tpl< PointCoordinateType > CCVector3
Default 3D Vector.
Definition: CVGeom.h:798
cc2sm.h
ecvGenericMesh.h
PCLCloud
pcl::PCLPointCloud2 PCLCloud
Definition: PCLCloud.h:34
PclUtils::PCLVis::updateCaption
bool updateCaption(const std::string &text, const CCVector2 &pos2D, const CCVector3 &anchorPos, double r, double g, double b, double a, int fontSize=10, const std::string &viewID="caption", int viewport=0)
Definition: PCLVis.cpp:1276
PclUtils::PCLVis::~PCLVis
virtual ~PCLVis()
Definition: PCLVis.cpp:195
PclUtils::PCLVis::setModelViewMatrix
void setModelViewMatrix(const ccGLMatrixd &viewMat, int viewport=0)
Definition: PCLVis.cpp:2776
ECV_SURFACE_MODE
@ ECV_SURFACE_MODE
Definition: ecvDrawContext.h:47
cloudViewer::PointCloudTpl::getScalarField
ScalarField * getScalarField(int index) const
Returns a pointer to a specific scalar field.
Definition: PointCloudTpl.h:354
PclUtils::PCLVis::m_prop_map
PropActorMapPtr m_prop_map
Internal list with actor pointers and name IDs for props.
Definition: PCLVis.h:628
normals
double normals[3]
Definition: TriangleMeshIO.cpp:54
PointRGBNormal
pcl::PointXYZRGBNormal PointRGBNormal
Definition: PCLCloud.h:28
vtkPVTrackballRotate
Definition: vtkPVTrackballRotate.h:13
PclUtils::PCLVis::m_currentMode
int m_currentMode
Definition: PCLVis.h:704
cloudViewer::OrientedBoundingBox::GetColor
const Eigen::Vector3d & GetColor() const
Gets the bounding box color.
Definition: OrientedBoundingBox.h:63
width
int width
Definition: FileIOFactory.cpp:142
cloudViewer::BoundingBoxTpl::getBounds
void getBounds(double bounds[6]) const
Definition: BoundingBox.h:283
PclUtils::PCLVis::resetCameraClippingRange
void resetCameraClippingRange(int viewport=0)
Definition: PCLVis.cpp:628
ccHObject::getClassID
CV_CLASS_ENUM getClassID() const override
Returns class ID.
Definition: ecvHObject.h:232
CVLog::Error
static bool Error(const char *format,...)
Display an error dialog with formatted message.
Definition: CVLog.cpp:143
ecvDrawContext.h
Vector2Tpl
2D Vector
Definition: CVGeom.h:32
ECV_SHADING_GOURAUD
@ ECV_SHADING_GOURAUD
Definition: ecvDrawContext.h:42
PclUtils::PCLVis::setShapeOpacity
void setShapeOpacity(double opacity, const std::string &viewID, int viewport=0)
Definition: PCLVis.cpp:2531
ECV_ALL
@ ECV_ALL
Definition: ecvDrawContext.h:74
context
ImGuiContext * context
Definition: Window.cpp:76
qPCL.h
TransformInfo::transVecStart
CCVector3 transVecStart
Definition: ecvDrawContext.h:220
AxesGridProperties::xTitle
QString xTitle
Definition: ecvDisplayTools.h:66
PclUtils::PCLVis::getAutoUpateCameraPos
bool getAutoUpateCameraPos()
Definition: PCLVis.h:164
size
int size
Definition: FileIOFactory.cpp:130
TransformInfo
Definition: ecvDrawContext.h:200
height
int height
Definition: FileIOFactory.cpp:143
y
normal_z y
Definition: my_point_types.h:168
PclTools::CreatePolyDataFromLineSet
vtkSmartPointer< vtkPolyData > CreatePolyDataFromLineSet(const cloudViewer::geometry::LineSet &lineset, bool useLineSource=true)
Definition: PclTools.cpp:1124
PclUtils::PCLVis::RemoveDataAxesGrid
void RemoveDataAxesGrid(const std::string &viewID)
Remove Data Axes Grid for a specific object.
Definition: PCLVis.cpp:3961
VTKExtensions::vtkPVCenterAxesActor
Definition: vtkPVCenterAxesActor.h:17
ecvTextParam
Definition: ecvDrawContext.h:319
VTKExtensions
Definition: PCLVis.h:73
PclUtils::PCLVis::getActorById
vtkActor * getActorById(const std::string &viewId)
Definition: PCLVis.cpp:3022
PclUtils::PCLVis::isPointPickingEnabled
bool isPointPickingEnabled()
Definition: PCLVis.h:667
ecvDisplayTools::OrientationMarkerShown
static bool OrientationMarkerShown()
Definition: ecvDisplayTools.h:496
PclUtils::PCLVis::setCamera2DManipulators
virtual void setCamera2DManipulators(const int manipulators[9])
Definition: PCLVis.cpp:418
PclUtils::renders::MeshTextureApplier::ApplyPBRTextures
static bool ApplyPBRTextures(vtkLODActor *actor, const pcl::TextureMesh &mesh, vtkPolyData *polydata, TextureRenderManager *render_manager, vtkRenderer *renderer)
Apply PBR textures from PCLTextureMesh (deprecated)
Definition: MeshTextureApplier.cpp:250
event
MouseEvent event
Definition: BitmapWindowSystem.cpp:61
ccMaterial
Mesh (triangle) material.
Definition: ecvMaterial.h:28
TransformInfo::isRotate
bool isRotate
Definition: ecvDrawContext.h:207
VTKExtensions::vtkCustomInteractorStyle
vtkCustomInteractorStyle defines an unique, custom VTK based interactory style for PCL Visualizer app...
Definition: vtkCustomInteractorStyle.h:57
PclUtils::PCLVis::getModelViewTransformMatrix
void getModelViewTransformMatrix(Eigen::Matrix4d &view)
Definition: PCLVis.cpp:615
PclUtils::PCLVis::getPropById
vtkProp * getPropById(const std::string &viewId)
Definition: PCLVis.cpp:2957
NormalT
pcl::Normal NormalT
Definition: PCLCloud.h:26
PclUtils::WidgetActorMap
std::unordered_map< std::string, WidgetMap > WidgetActorMap
Definition: WidgetMap.h:36
PclUtils::PCLVis::getIdByActor
std::string getIdByActor(vtkProp *actor)
Definition: PCLVis.cpp:3079
PclUtils::PCLVis::setMeshShadingMode
void setMeshShadingMode(SHADING_MODE mode, const std::string &viewID, int viewport=0)
Definition: PCLVis.cpp:2617
PclUtils::PCLVis::ThreeDInteractorStyle
vtkSmartPointer< VTKExtensions::vtkCustomInteractorStyle > ThreeDInteractorStyle
Definition: PCLVis.h:635
Vector3Tpl< double >
AxesGridProperties::useCustomBounds
bool useCustomBounds
Definition: ecvDisplayTools.h:72
CustomVtkCaptionWidget
Definition: CustomVtkCaptionWidget.h:25
ecvGenericVisualizer3D::interactorAreaPickedEvent
void interactorAreaPickedEvent(const std::vector< int > &selected_slice)
ecvOrientedBBox.h
ccSensor
Generic sensor interface.
Definition: ecvSensor.h:27
PointCloudRGB
pcl::PointCloud< PointRGB > PointCloudRGB
Definition: PCLCloud.h:21
e
const double * e
Definition: essential_matrix_poly.h:10
PclUtils::PCLVis::getPropCollectionById
vtkSmartPointer< vtkPropCollection > getPropCollectionById(const std::string &viewId)
Definition: PCLVis.cpp:3009
ecv2DLabel.h
PclUtils::PCLVis::getRotationFactor
double getRotationFactor()
Definition: PCLVis.cpp:409
PclUtils::PCLVis::isActorPickingEnabled
bool isActorPickingEnabled()
Definition: PCLVis.h:680
PclUtils::PCLVis::addScalarBar
bool addScalarBar(const CC_DRAW_CONTEXT &context)
Definition: PCLVis.cpp:1253
vtkPVTrackballMultiRotate.h
ECV_SHADING_PHONG
@ ECV_SHADING_PHONG
Definition: ecvDrawContext.h:42
ecvColor::RgbTpl::g
Type g
Definition: ecvColorTypes.h:54
cc2smReader
CC to PCL cloud converter.
Definition: cc2sm.h:43
PclUtils::PCLVis::exitCallbackProcess
void exitCallbackProcess()
Definition: PCLVis.cpp:2852
PclUtils::PCLVis::draw
void draw(const CC_DRAW_CONTEXT &context, const PCLCloud::Ptr &smCloud)
Definition: PCLVis.cpp:846
PclUtils::PCLVis::setAreaPickingMode
void setAreaPickingMode(bool state)
Definition: PCLVis.cpp:2822
PclTools.h
AxesGridProperties::yTitle
QString yTitle
Definition: ecvDisplayTools.h:67
vtkPVTrackballZoom::New
static vtkPVTrackballZoom * New()
cloudViewer::BoundingBoxTpl::isValid
bool isValid() const
Returns whether bounding box is valid or not.
Definition: BoundingBox.h:203
PclUtils::PCLVis::getTransformation
vtkSmartPointer< vtkTransform > getTransformation(const CC_DRAW_CONTEXT &context, const CCVector3d &origin)
Definition: PCLVis.cpp:1031
vtkTrackballPan::New
static vtkTrackballPan * New()
PclUtils::PCLVis::get2DInteractorStyle
vtkSmartPointer< VTKExtensions::vtkCustomInteractorStyle > get2DInteractorStyle()
Definition: PCLVis.h:614
PclUtils::PCLVis::m_centerAxes
vtkSmartPointer< VTKExtensions::vtkPVCenterAxesActor > m_centerAxes
Definition: PCLVis.h:631
AxesGridProperties::xUseCustomLabels
bool xUseCustomLabels
Definition: ecvDisplayTools.h:69
PclUtils::PCLVis::getRenderWindowInteractor
vtkSmartPointer< vtkRenderWindowInteractor > getRenderWindowInteractor()
Get a pointer to the current interactor style used.
Definition: PCLVis.h:148
TransformInfo::applyEuler
bool applyEuler
Definition: ecvDrawContext.h:208
TransformInfo::scaleXYZ
CCVector3 scaleXYZ
the x y z scale
Definition: ecvDrawContext.h:218
Vector2Tpl::x
Type x
Definition: CVGeom.h:36
PclTools::UpdateScalarBar
bool UpdateScalarBar(vtkAbstractWidget *widget, const CC_DRAW_CONTEXT &CONTEXT)
Definition: PclTools.cpp:719
PclUtils::PCLVis::setShapeShadingMode
void setShapeShadingMode(SHADING_MODE mode, const std::string &viewID, int viewport=0)
Definition: PCLVis.cpp:2607
PclUtils::PCLVis::IsCameraOrientationWidgetShown
bool IsCameraOrientationWidgetShown() const
Check if Camera Orientation Widget is shown.
Definition: PCLVis.cpp:3952
PclUtils::PCLVis::initialize
void initialize()
Definition: PCLVis.cpp:254
PclUtils::PCLVis::resetCamera
void resetCamera()
Definition: PCLVis.h:263
PCLTextureMesh
pcl::TextureMesh PCLTextureMesh
Definition: PCLCloud.h:33
ecvGenericVisualizer3D
Generic visualizer 3D interface.
Definition: ecvGenericVisualizer3D.h:15
CV_TYPES::LABEL_2D
@ LABEL_2D
Definition: CVTypes.h:140
ecvMesh.h
ECV_MESH
@ ECV_MESH
Definition: ecvDrawContext.h:54
ecvScalarField.h
vtkPVTrackballZoomToMouse.h
AxesGridProperties::yUseCustomLabels
bool yUseCustomLabels
Definition: ecvDisplayTools.h:70
PclUtils::PCLVis::setMeshRenderingMode
void setMeshRenderingMode(MESH_RENDERING_MODE mode, const std::string &viewID, int viewport=0)
Definition: PCLVis.cpp:2672
ccGBLSensor
Ground-based Laser sensor.
Definition: ecvGBLSensor.h:26
vtkPVTrackballRoll.h
vtkPVTrackballZoom
Definition: vtkPVTrackballZoom.h:13
ecvDisplayTools::OverlayEntitiesAreDisplayed
static bool OverlayEntitiesAreDisplayed()
Definition: ecvDisplayTools.h:1797
PclUtils::PCLVis::removeEntities
bool removeEntities(const CC_DRAW_CONTEXT &context)
Definition: PCLVis.cpp:2085
PclUtils::PCLVis::addOrientedCube
bool addOrientedCube(const ccGLMatrixd &trans, double width, double height, double depth, double r=1.0, double g=1.0, double b=1.0, const std::string &id="cube", int viewport=0)
Definition: PCLVis.cpp:1940
PclUtils::PCLVis::pickActor
vtkActor * pickActor(double x, double y)
Definition: PCLVis.cpp:3323
PclUtils::PCLVis::setCamera3DManipulators
virtual void setCamera3DManipulators(const int manipulators[9])
Definition: PCLVis.cpp:423
Utils::vtkColor
void vtkColor(const QColor &clr, double *vtkClr)
Definition: utils.cpp:60
ccGenericMesh
Generic mesh interface.
Definition: ecvGenericMesh.h:28
PclUtils::PCLVis::TwoDInteractorStyle
vtkSmartPointer< VTKExtensions::vtkCustomInteractorStyle > TwoDInteractorStyle
Definition: PCLVis.h:633
PclUtils::PCLVis::addTextureMeshFromCCMesh
bool addTextureMeshFromCCMesh(ccGenericMesh *mesh, const std::string &id, int viewport=0)
Add texture mesh directly from ccGenericMesh (preferred)
Definition: PCLVis.cpp:1837
PclUtils::PCLVis::removeActorFromRenderer
bool removeActorFromRenderer(const vtkSmartPointer< vtkProp > &actor, int viewport=0)
Internal method. Adds a vtk actor to screen.
Definition: PCLVis.cpp:3105
ECV_TEXT3D
@ ECV_TEXT3D
Definition: ecvDrawContext.h:70
ecvCameraSensor.h
AxesGridProperties::subdivisions
int subdivisions
Definition: ecvDisplayTools.h:60
PclUtils::PCLVis::setLineWidth
void setLineWidth(const unsigned char lineWidth, const std::string &viewID, int viewport=0)
Definition: PCLVis.cpp:2708
ecvTools::TransFormRGB
static ecvColor::Rgbf TransFormRGB(const ecvColor::Rgb &col)
Definition: ecvTools.h:53
PclUtils::PCLVis::updateNormals
void updateNormals(const CC_DRAW_CONTEXT &context, const PCLCloud::Ptr &smCloud)
Definition: PCLVis.cpp:1074
a
a[190]
Definition: essential_matrix_poly.h:19
ecvTextParam::display3D
bool display3D
Definition: ecvDrawContext.h:320
PclUtils::PCLVis::toggleOrientationMarkerWidgetAxes
void toggleOrientationMarkerWidgetAxes()
Definition: PCLVis.cpp:2907
PclTools::CreateCameraSensor
vtkSmartPointer< vtkPolyData > CreateCameraSensor(const ccCameraSensor *cameraSensor, const ecvColor::Rgb &lineColor, const ecvColor::Rgb &planeColor)
Definition: PclTools.cpp:464
PclUtils::PCLVis::getSourceMesh
ccMesh * getSourceMesh(const std::string &viewID) const
Get the source object as ccMesh.
Definition: PCLVis.cpp:2443
AxesGridProperties::visible
bool visible
Definition: ecvDisplayTools.h:56
ecvDisplayTools::DisplayOverlayEntities
static void DisplayOverlayEntities(bool state)
Definition: ecvDisplayTools.cpp:2081
PclUtils::PCLVis::m_areaPickingEnabled
bool m_areaPickingEnabled
Definition: PCLVis.h:706
PclUtils::PCLVis::m_actorPickingEnabled
bool m_actorPickingEnabled
Definition: PCLVis.h:707
vtkCustomInteractorStyle.h
PclUtils::PCLVis::togglePointPicking
void togglePointPicking()
Definition: PCLVis.h:671
PclUtils::PCLVis::setShapeUniqueColor
void setShapeUniqueColor(float r, float g, float b, const std::string &viewID, int viewport=0)
Definition: PCLVis.cpp:2229
PointCloudRGBNormal
pcl::PointCloud< PointRGBNormal > PointCloudRGBNormal
Definition: PCLCloud.h:29
vtkutils.h
PclUtils::PCLVis::expandBounds
void expandBounds(double bounds[6], vtkMatrix4x4 *matrix)
Definition: PCLVis.cpp:776
Tuple3Tpl::z
Type z
Definition: CVGeom.h:137
ECV_SHADING_FLAT
@ ECV_SHADING_FLAT
Definition: ecvDrawContext.h:42
ccCameraSensor
Camera (projective) sensor.
Definition: ecvCameraSensor.h:24
AxesGridProperties::lineWidth
double lineWidth
Definition: ecvDisplayTools.h:58
ECV_SHAPE
@ ECV_SHAPE
Definition: ecvDrawContext.h:55
ecvColor::RgbTpl::b
Type b
Definition: ecvColorTypes.h:54
TransformInfo::isTranslate
bool isTranslate
Definition: ecvDrawContext.h:210
CVTools::FromQString
static std::string FromQString(const QString &qs)
Definition: CVTools.cpp:100
PclUtils::PCLVis::renderToImage
QImage renderToImage(int zoomFactor=1, bool renderOverlayItems=false, bool silent=false, int viewport=0)
Definition: PCLVis.cpp:3351
SHADING_MODE
SHADING_MODE
Definition: ecvDrawContext.h:42
origin
Eigen::Vector3d origin
Definition: VoxelGridIO.cpp:26
PclUtils::PCLVis::resetCenterOfRotation
void resetCenterOfRotation(int viewport=0)
Definition: PCLVis.cpp:380
TransformInfo::isScale
bool isScale
Definition: ecvDrawContext.h:209
Vector2Tpl::y
Type y
Definition: CVGeom.h:36
PclUtils::PCLVis::setAreaPickingEnabled
void setAreaPickingEnabled(bool state)
Definition: PCLVis.h:676
PclTools::CreateGBLSensor
vtkSmartPointer< vtkPolyData > CreateGBLSensor(const ccGBLSensor *gBLSensor)
Definition: PclTools.cpp:436
PclUtils::PCLVis::isAreaPickingEnabled
bool isAreaPickingEnabled()
Definition: PCLVis.h:675
PclUtils::PCLVis::resetCamera
void resetCamera(double bounds[6])
Definition: PCLVis.h:266
VTKExtensions::vtkCustomInteractorStyle::AddManipulator
void AddManipulator(vtkCameraManipulator *m)
Definition: vtkCustomInteractorStyle.cpp:86
PclUtils::PCLVis::setAutoUpateCameraPos
void setAutoUpateCameraPos(bool state)
Definition: PCLVis.h:165
TransformInfo::rotateParam
RotateParam rotateParam
Definition: ecvDrawContext.h:206
PclUtils::PCLVis::getCaptionPosition
bool getCaptionPosition(const std::string &viewID, float &posX, float &posY)
Get caption widget 2D position (normalized coordinates 0.0-1.0)
Definition: PCLVis.cpp:1317
AxesGridProperties::xMax
double xMax
Definition: ecvDisplayTools.h:80
ecvHObjectCaster.h
PclTools::CreateCoordinate
vtkSmartPointer< vtkPropAssembly > CreateCoordinate(double axesLength=1.5, const std::string &xLabel="x", const std::string &yLabel="y", const std::string &zLabel="z", const std::string &xPlus="R", const std::string &xMinus="L", const std::string &yPlus="A", const std::string &yMinus="P", const std::string &zPlus="I", const std::string &zMinus="S")
Definition: PclTools.cpp:581
ccHObject::getChildrenNumber
unsigned getChildrenNumber() const
Returns the number of children.
Definition: ecvHObject.h:312
ecvTextParam::font
QFont font
Definition: ecvDrawContext.h:325
vtkTrackballPan.h
PclUtils::PCLVis::m_propPicker
vtkSmartPointer< vtkPropPicker > m_propPicker
Definition: PCLVis.h:787
ecvTextParam::text
QString text
Definition: ecvDrawContext.h:324
PclUtils::PCLVis::UpdateScreen
void UpdateScreen()
UpdateScreen - Updates/refreshes the render window This method forces a render update after actor cha...
Definition: PCLVis.cpp:3156
PointNT
pcl::PointNormal PointNT
Definition: PCLCloud.h:24
AxesGridProperties::xMin
double xMin
Definition: ecvDisplayTools.h:80
PclUtils::PCLVis::setOrthoProjection
void setOrthoProjection(int viewport=0)
Definition: PCLVis.cpp:2794
PclUtils::PCLVis::setPointCloudUniqueColor
void setPointCloudUniqueColor(double r, double g, double b, const std::string &viewID, int viewport=0)
Definition: PCLVis.cpp:2205
AxesGridProperties::color
CCVector3 color
Definition: ecvDisplayTools.h:57
CVTools.h
PclUtils::PCLVis::m_selected_slice
std::vector< int > m_selected_slice
Definition: PCLVis.h:789
vtkMemberFunctionCommand.h
cloudViewer::PointCloudTpl::getScalarFieldName
const char * getScalarFieldName(int index) const
Returns the name of a specific scalar field.
Definition: PointCloudTpl.h:365
PCLVis.h
count
int count
Definition: FileIOFactory.cpp:132
vtkPVTrackballRotate.h
vtkCameraManipulator
Definition: vtkCameraManipulator.h:17
CVLog::Warning
static bool Warning(const char *format,...)
Prints out a formatted warning message in console.
Definition: CVLog.cpp:133
ecvGBLSensor.h
QPCL_ENGINE_LIB_API
#define QPCL_ENGINE_LIB_API
Definition: qPCL.h:15
PclUtils::PCLVis::configInteractorStyle
void configInteractorStyle(vtkSmartPointer< VTKExtensions::vtkCustomInteractorStyle > interactor_style)
Definition: PCLVis.cpp:241
ecvColor::RgbTpl
RGB color structure.
Definition: ecvColorTypes.h:49
AxesGridProperties::showLabels
bool showLabels
Definition: ecvDisplayTools.h:61
std
Definition: Eigen.h:85
WidgetMap.h
ecvMaterialSet.h
PclUtils::PCLVis::addPolyline
bool addPolyline(const PCLPolygon::ConstPtr pclPolygon, double r, double g, double b, float width=1.0f, const std::string &id="multiline", int viewport=0)
Definition: PCLVis.cpp:1461
ccMesh
Triangular mesh.
Definition: ecvMesh.h:35
AxesGridProperties::zMin
double zMin
Definition: ecvDisplayTools.h:82
ccHObject::getChild
ccHObject * getChild(unsigned childPos) const
Returns the ith child.
Definition: ecvHObject.h:325
ECV_POINTS_MODE
@ ECV_POINTS_MODE
Definition: ecvDrawContext.h:45
ECV_SENSOR
@ ECV_SENSOR
Definition: ecvDrawContext.h:73
ecvTextParam::textPos
CCVector3d textPos
Definition: ecvDrawContext.h:323
PclUtils::PCLVis::m_lightIntensity
double m_lightIntensity
Definition: PCLVis.h:797
PclUtils::PCLVis::configCenterAxes
void configCenterAxes()
Definition: PCLVis.cpp:233
cc2smReader::getVtkPolyDataWithTextures
bool getVtkPolyDataWithTextures(ccGenericMesh *mesh, vtkSmartPointer< vtkPolyData > &polydata, vtkSmartPointer< vtkMatrix4x4 > &transformation, std::vector< std::vector< Eigen::Vector2f >> &tex_coordinates)
Convert ccGenericMesh to vtkPolyData with texture coordinates Reuses getPclTextureMesh logic to ensur...
Definition: cc2sm.cpp:1566
PclUtils::PCLVis::m_sourceObjectMap
std::map< std::string, ccHObject * > m_sourceObjectMap
Definition: PCLVis.h:794
PclUtils::PCLVis::pclMarkerAxesShown
bool pclMarkerAxesShown()
Definition: PCLVis.cpp:2870
TransformInfo::RotateParam::angle
double angle
Definition: ecvDrawContext.h:202
PclUtils::PCLVis::getSourceCloud
ccPointCloud * getSourceCloud(const std::string &viewID) const
Get the source object as ccPointCloud.
Definition: PCLVis.cpp:2433
ecvOrientedBBox
Definition: ecvOrientedBBox.h:29
ccMaterialSet
Mesh (triangle) material.
Definition: ecvMaterialSet.h:16
ECV_CAPTION
@ ECV_CAPTION
Definition: ecvDrawContext.h:68
PclUtils::PCLVis::m_point_picker
vtkSmartPointer< vtkPointPicker > m_point_picker
Definition: PCLVis.h:785
ccHObject
Hierarchical CLOUDVIEWER Object.
Definition: ecvHObject.h:25
Tuple3Tpl::y
Type y
Definition: CVGeom.h:137
ccObject::getName
virtual QString getName() const
Returns object name.
Definition: ecvObject.h:72
PclUtils::PCLVis::setCameraViewAngle
void setCameraViewAngle(double viewAngle, int viewport=0)
Definition: PCLVis.cpp:827
PclUtils::PCLVis::get3DInteractorStyle
vtkSmartPointer< VTKExtensions::vtkCustomInteractorStyle > get3DInteractorStyle()
Definition: PCLVis.h:619
PclUtils::renders::MeshTextureApplier::ApplyTexturesFromMaterialSet
static bool ApplyTexturesFromMaterialSet(vtkLODActor *actor, const ccMaterialSet *materials, const std::vector< std::vector< Eigen::Vector2f >> &tex_coordinates, vtkPolyData *polydata, TextureRenderManager *render_manager, vtkRenderer *renderer)
Apply textures from ccMaterialSet with texture coordinates.
Definition: MeshTextureApplier.cpp:111
TextureRenderManager.h
ecvColor::FromRgb
Rgbf FromRgb(const Rgb &color)
Definition: ecvColorTypes.h:386
cloudViewer::BoundingBoxTpl::maxCorner
const Vector3Tpl< T > & maxCorner() const
Returns max corner (const)
Definition: BoundingBox.h:156
PclUtils::PCLVis::setPerspectiveProjection
void setPerspectiveProjection(int viewport=0)
Definition: PCLVis.cpp:2804
PclUtils::PCLVis::setCenterOfRotation
void setCenterOfRotation(double xyz[3])
Definition: PCLVis.h:193
PclUtils::PCLVis::hideShowWidgets
void hideShowWidgets(bool visibility, const std::string &viewID, int viewport=0)
Definition: PCLVis.cpp:2073
ccGLMatrixTpl::data
T * data()
Returns a pointer to internal data.
Definition: ecvGLMatrixTpl.h:810
PclUtils::PCLVis::getLightIntensity
double getLightIntensity() const
Get current global light intensity.
Definition: PCLVis.cpp:3547
ecvColor::red
constexpr Rgb red(MAX, 0, 0)
ecvGenericVisualizer3D::interactorPointPickedEvent
void interactorPointPickedEvent(const CCVector3 &p, int index, const std::string &id)
PclUtils::PCLVis::setupInteractor
void setupInteractor(vtkRenderWindowInteractor *iren, vtkRenderWindow *win)
setupInteractor override to init interactor_
Definition: PCLVis.cpp:3164
ccGLDrawContext
Display context.
Definition: ecvDrawContext.h:365
rotation
Eigen::Matrix3d rotation
Definition: VoxelGridIO.cpp:27
PclUtils::PCLVis::setRotationFactor
void setRotationFactor(double factor)
Definition: PCLVis.cpp:400
PclUtils::PCLVis::getPCLInteractorStyle
vtkSmartPointer< pcl::visualization::PCLVisualizerInteractorStyle > getPCLInteractorStyle()
Definition: PCLVis.cpp:2953
PclUtils::PCLVis::zoomCamera
void zoomCamera(double zoomFactor, int viewport=0)
Definition: PCLVis.cpp:599
PclUtils::PCLVis::setLightMode
void setLightMode(const std::string &viewID, int viewport=0)
Definition: PCLVis.cpp:2699
AxesGridProperties::zCustomLabels
QList< QPair< double, QString > > zCustomLabels
Definition: ecvDisplayTools.h:77
PclUtils::PCLVis::getVtkCamera
vtkSmartPointer< vtkCamera > getVtkCamera(int viewport=0)
Definition: PCLVis.cpp:2772
z
normal_z z
Definition: my_point_types.h:165
PclUtils::PCLVis::SetDataAxesGridProperties
void SetDataAxesGridProperties(const std::string &viewID, const AxesGridProperties &props)
Set Data Axes Grid properties (Unified Interface)
Definition: PCLVis.cpp:3553
MESH_RENDERING_MODE
MESH_RENDERING_MODE
Definition: ecvDrawContext.h:44
vtkPVTrackballRotate::New
static vtkPVTrackballRotate * New()
ROTATE
#define ROTATE(a, i, j, k, l)
Definition: Jacobi.h:13
Tuple3Tpl::u
Type u[3]
Definition: CVGeom.h:139
PclUtils::PCLVis::m_dataAxesGridMap
std::map< std::string, vtkSmartPointer< vtkCubeAxesActor > > m_dataAxesGridMap
Definition: PCLVis.h:802
PclUtils::PCLVis::setCameraManipulators
void setCameraManipulators(VTKExtensions::vtkCustomInteractorStyle *style, const int manipulators[9])
Definition: PCLVis.cpp:428
PclUtils::PCLVis::m_autoUpdateCameraPos
bool m_autoUpdateCameraPos
Definition: PCLVis.h:709
vtkPVCenterAxesActor.h
PclUtils::PCLVis::setCameraFocalDistance
void setCameraFocalDistance(double focal_distance, int viewport=0)
Definition: PCLVis.cpp:590
PclUtils::PCLVis
Definition: PCLVis.h:80
SELECT_MODE
#define SELECT_MODE
Definition: PCLVis.cpp:125
PclUtils::PCLVis::setLightIntensity
void setLightIntensity(double intensity)
Set global light intensity (ParaView-style)
Definition: PCLVis.cpp:3448
AxesGridProperties::yCustomLabels
QList< QPair< double, QString > > yCustomLabels
Definition: ecvDisplayTools.h:76
PclUtils::PCLVis::displayText
void displayText(const CC_DRAW_CONTEXT &context)
Definition: PCLVis.cpp:1509
ecvGLMatrix.h
PclUtils::PCLVis::hideOrientationMarkerWidgetAxes
void hideOrientationMarkerWidgetAxes()
Definition: PCLVis.cpp:2874
normalScale
ccScalarField * normalScale
Definition: qM3C2Tools.cpp:44
PclUtils::PropActorMap
std::unordered_map< std::string, vtkSmartPointer< vtkProp > > PropActorMap
Definition: WidgetMap.h:39
CloudNormal
pcl::PointCloud< NormalT > CloudNormal
Definition: PCLCloud.h:27
PointCloudNormal
pcl::PointCloud< PointNT > PointCloudNormal
Definition: PCLCloud.h:25
PclUtils::PCLVis::setPointPickingEnabled
void setPointPickingEnabled(bool state)
Definition: PCLVis.h:668
PclUtils::PCLVis::getPerspectiveState
bool getPerspectiveState(int viewport=0)
Definition: PCLVis.cpp:2814
PclTools::CreateLine
vtkSmartPointer< vtkPolyData > CreateLine(vtkSmartPointer< vtkPoints > points)
Definition: PclTools.cpp:316
ecvHObject.h
Vector3Tpl< double >::fromArray
static Vector3Tpl fromArray(const int a[3])
Constructor from an int array.
Definition: CVGeom.h:268
PclUtils::PCLVis::m_widget_map
WidgetActorMapPtr m_widget_map
Internal list with actor pointers and name IDs for widgets.
Definition: PCLVis.h:625
ecvGenericVisualizer3D::interactorKeyboardEvent
void interactorKeyboardEvent(const std::string &symKey)
ECV_SCALAR_BAR
@ ECV_SCALAR_BAR
Definition: ecvDrawContext.h:69
PclUtils::PCLVis::setCenterAxesVisibility
void setCenterAxesVisibility(bool)
Definition: PCLVis.cpp:565
sm2cc.h
PclTools::CreateActorFromVTKDataSet
void CreateActorFromVTKDataSet(const vtkSmartPointer< vtkDataSet > &data, vtkSmartPointer< vtkActor > &actor, bool use_scalars=true, bool use_vbos=false)
Internal method. Creates a vtk actor from a vtk polydata object.
Definition: PclTools.cpp:166
ECV_POLYLINE_2D
@ ECV_POLYLINE_2D
Definition: ecvDrawContext.h:63
PclUtils::PCLVis::m_interactorStyle
vtkSmartPointer< pcl::visualization::PCLVisualizerInteractorStyle > m_interactorStyle
Definition: PCLVis.h:637
ecvPointCloud.h
PclUtils::PCLVis::addTextureMesh
bool addTextureMesh(const PCLTextureMesh &mesh, const std::string &id, int viewport)
Add texture mesh from PCLTextureMesh (deprecated)
Definition: PCLVis.cpp:1578
AxesGridProperties::yMin
double yMin
Definition: ecvDisplayTools.h:81
ecvDisplayTools::GetSceneDB
static ccHObject * GetSceneDB()
Definition: ecvDisplayTools.h:701
ECV_POINT_CLOUD
@ ECV_POINT_CLOUD
Definition: ecvDrawContext.h:52
PointCloudT
pcl::PointCloud< PointT > PointCloudT
Definition: PCLCloud.h:17
VTKExtensions::vtkCustomInteractorStyle::RemoveAllManipulators
void RemoveAllManipulators()
Definition: vtkCustomInteractorStyle.cpp:81
cloudViewer::geometry::LineSet
LineSet define a sets of lines in 3D. A typical application is to display the point cloud corresponde...
Definition: LineSet.h:29
PclUtils::PCLVis::removeSourceObject
void removeSourceObject(const std::string &viewID)
Remove a source object from the map.
Definition: PCLVis.cpp:2421
PclUtils::PCLVis::toggleAreaPicking
void toggleAreaPicking()
Definition: PCLVis.cpp:2845
vtkTrackballPan
Definition: vtkTrackballPan.h:13
cloudViewer::BoundingBoxTpl::minCorner
const Vector3Tpl< T > & minCorner() const
Returns min corner (const)
Definition: BoundingBox.h:154
PclUtils::PCLVis::getParallelScale
double getParallelScale(int viewport=0)
Definition: PCLVis.cpp:2790
PclUtils::PCLVis::syncAllScalarFieldsToVTK
void syncAllScalarFieldsToVTK(const std::string &viewID, ccPointCloud *cloud, int viewport=0)
Sync ALL scalar fields from ccPointCloud to VTK polydata.
Definition: PCLVis.cpp:2377
PclUtils::PCLVis::resetScalarColor
void resetScalarColor(const std::string &viewID, bool flag=true, int viewport=0)
Definition: PCLVis.cpp:2214
AxesGridProperties::zTitle
QString zTitle
Definition: ecvDisplayTools.h:68
PclUtils::PCLVis::hideShowActors
void hideShowActors(bool visibility, const std::string &viewID, int viewport=0)
Definition: PCLVis.cpp:2061
ccHObject::getViewId
QString getViewId() const
Definition: ecvHObject.h:225