41 #pragma GCC system_header
47 #include <vtkMatrix4x4.h>
48 #include <vtkSmartPointer.h>
49 #include <vtkLookupTable.h>
52 class vtkRenderWindow;
58 namespace visualization
68 getRandomColors (
double &r,
double &g,
double &b,
double min = 0.2,
double max = 2.8);
82 worldToView (
const Eigen::Vector4d &world_pt,
const Eigen::Matrix4d &view_projection_matrix,
int width,
int height);
85 getViewFrustum (
const Eigen::Matrix4d &view_projection_matrix,
double planes[24]);
95 cullFrustum (
double planes[24],
const Eigen::Vector3d &min_bb,
const Eigen::Vector3d &max_bb);
98 viewScreenArea (
const Eigen::Vector3d &eye,
const Eigen::Vector3d &min_bb,
const Eigen::Vector3d &max_bb,
const Eigen::Matrix4d &view_projection_matrix,
int width,
int height);
165 Camera (vtkCamera& camera, vtkRenderWindow& window);
189 double window_size[2];
190 double window_pos[2];
212 template<
typename Po
intT>
void
213 cvtWindowCoordinates (
const PointT& pt, Eigen::Vector4d& window_cord)
const;
225 template<
typename Po
intT>
void
226 cvtWindowCoordinates (
const PointT& pt, Eigen::Vector4d& window_cord,
const Eigen::Matrix4d& composite_mat)
const;
231 #include <pcl/visualization/common/impl/common.hpp>
Camera class holds a set of camera parameters together with the window pos/size.
Camera(vtkCamera &camera, vtkRenderWindow &window)
Construct a camera by copying parameters from a VTK camera and a VTK render window.
Camera(vtkCamera &camera)
Construct a camera by copying parameters from a VTK camera.
void computeViewMatrix(Eigen::Matrix4d &view_mat) const
Computes View matrix for Camera (Based on gluLookAt)
double fovy
Field of view angle in y direction (radians).
Camera()
Construct a camera with meaningful default values.
void computeProjectionMatrix(Eigen::Matrix4d &proj) const
Computes Projection Matrix for Camera.
PCL_EXPORTS Eigen::Vector2i worldToView(const Eigen::Vector4d &world_pt, const Eigen::Matrix4d &view_projection_matrix, int width, int height)
RenderingProperties
Set of rendering properties.
@ PCL_VISUALIZER_COLOR
3 floats (R, G, B) going from 0.0 (dark) to 1.0 (light)
@ PCL_VISUALIZER_LUT_RANGE
two doubles (min and max) or PCL_VISUALIZER_LUT_RANGE_AUTO
@ PCL_VISUALIZER_REPRESENTATION
@ PCL_VISUALIZER_OPACITY
Float going from 0.0 (transparent) to 1.0 (opaque)
@ PCL_VISUALIZER_POINT_SIZE
integer starting from 1
@ PCL_VISUALIZER_IMMEDIATE_RENDERING
@ PCL_VISUALIZER_LUT
colormap type pcl::visualization::LookUpTableRepresentationProperties
@ PCL_VISUALIZER_LINE_WIDTH
Integer starting from 1.
@ PCL_VISUALIZER_FONT_SIZE
PCL_EXPORTS void getRandomColors(double &r, double &g, double &b, double min=0.2, double max=2.8)
Get (good) random values for R/G/B.
RenderingRepresentationProperties
@ PCL_VISUALIZER_REPRESENTATION_SURFACE
@ PCL_VISUALIZER_REPRESENTATION_POINTS
@ PCL_VISUALIZER_REPRESENTATION_WIREFRAME
PCL_EXPORTS void getViewFrustum(const Eigen::Matrix4d &view_projection_matrix, double planes[24])
LookUpTableRepresentationProperties
@ PCL_VISUALIZER_LUT_GREY
Grey colormap (black to white)
@ PCL_VISUALIZER_LUT_HSV_INVERSE
Inverse HSV colormap.
@ PCL_VISUALIZER_LUT_RANGE_AUTO
Set LUT range to min and max values of the data.
@ PCL_VISUALIZER_LUT_VIRIDIS
Viridis colormap.
@ PCL_VISUALIZER_LUT_BLUE2RED
Blue to red colormap (blue to white to red)
@ PCL_VISUALIZER_LUT_HSV
HSV colormap.
@ PCL_VISUALIZER_LUT_JET
Jet colormap.
@ PCL_VISUALIZER_LUT_JET_INVERSE
Inverse jet colormap.
ShadingRepresentationProperties
@ PCL_VISUALIZER_SHADING_GOURAUD
@ PCL_VISUALIZER_SHADING_PHONG
@ PCL_VISUALIZER_SHADING_FLAT
PCL_EXPORTS bool getColormapLUT(LookUpTableRepresentationProperties colormap_type, vtkSmartPointer< vtkLookupTable > &table)
Generate a lookup table for a colormap.
PCL_EXPORTS Eigen::Matrix4d vtkToEigen(vtkMatrix4x4 *vtk_matrix)
PCL_EXPORTS float viewScreenArea(const Eigen::Vector3d &eye, const Eigen::Vector3d &min_bb, const Eigen::Vector3d &max_bb, const Eigen::Matrix4d &view_projection_matrix, int width, int height)
PCL_EXPORTS int cullFrustum(double planes[24], const Eigen::Vector3d &min_bb, const Eigen::Vector3d &max_bb)
Defines all the PCL and non-PCL macros used.
A point structure representing Euclidean xyz coordinates, and the RGB color.
A structure representing RGB color information.