ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
PclTools Namespace Reference

Functions

QPCL_ENGINE_LIB_API PCLTextureMesh::Ptr CreateTexturingMesh (const std::string &filePath, bool show_cameras=false, bool verbose=false)
 
QPCL_ENGINE_LIB_API PCLTextureMesh::Ptr CreateTexturingMesh (const std::string &filePath, const cloudViewer::camera::PinholeCameraTrajectory &cameraTrajectory, bool show_cameras=false, bool verbose=false)
 
PCLTextureMesh::Ptr CreateTexturingMesh (const PCLMesh::ConstPtr &triangles, const pcl::texture_mapping::CameraVector &cameras, bool show_cameras=false, bool verbose=false)
 
int GetDefaultScalarInterpolationForDataSet (vtkDataSet *data)
 
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. More...
 
void CreateActorFromVTKDataSet (const vtkSmartPointer< vtkDataSet > &data, vtkSmartPointer< vtkLODActor > &actor, bool use_scalars=true, bool use_vbos=false)
 Internal method. Creates a vtk actor from a vtk polydata object. More...
 
void AllocVtkUnstructuredGrid (vtkSmartPointer< vtkUnstructuredGrid > &polydata)
 Allocate a new unstructured grid smartpointer. For internal use only. More...
 
bool UpdateScalarBar (vtkAbstractWidget *widget, const CC_DRAW_CONTEXT &CONTEXT)
 
bool TransformPolyData (vtkSmartPointer< vtkPolyData > polyData, const ccGLMatrixd &trans)
 
bool TransformVtkPoints (vtkSmartPointer< vtkPoints > points, const ccGLMatrixd &trans)
 
vtkSmartPointer< vtkPoints > GetVtkPointsFromLineSet (const cloudViewer::geometry::LineSet &lineset)
 
bool GetVtkPointsAndLinesFromLineSet (const cloudViewer::geometry::LineSet &lineset, vtkSmartPointer< vtkPoints > points, vtkSmartPointer< vtkCellArray > lines, vtkSmartPointer< vtkUnsignedCharArray > colors)
 
vtkSmartPointer< vtkPolyData > CreateCoordinateFromLineSet (const cloudViewer::geometry::LineSet &lineset)
 
vtkSmartPointer< vtkPolyData > CreatePolyDataFromLineSet (const cloudViewer::geometry::LineSet &lineset, bool useLineSource=true)
 
void SetPolyDataColor (vtkSmartPointer< vtkPolyData > polyData, const ecvColor::Rgb &color, bool is_cell=false)
 
void AddPolyDataCell (vtkSmartPointer< vtkPolyData > polyData)
 
vtkSmartPointer< vtkPolyData > CreateLine (vtkSmartPointer< vtkPoints > points)
 
vtkSmartPointer< vtkPolyData > CreateLine (vtkSmartPointer< vtkPoints > points, vtkSmartPointer< vtkCellArray > lines, vtkSmartPointer< vtkUnsignedCharArray > colors)
 
vtkSmartPointer< vtkPolyData > CreateCube (double width, double height, double depth, const ccGLMatrixd &trans)
 
vtkSmartPointer< vtkPolyData > CreateCube (double width, double height, double depth)
 
vtkSmartPointer< vtkPolyData > CreateGBLSensor (const ccGBLSensor *gBLSensor)
 
vtkSmartPointer< vtkPolyData > CreateCameraSensor (const ccCameraSensor *cameraSensor, const ecvColor::Rgb &lineColor, const ecvColor::Rgb &planeColor)
 
vtkSmartPointer< vtkPolyData > CreatePlane (const pcl::ModelCoefficients &coefficients, double x, double y, double z, double scale=1)
 
vtkSmartPointer< vtkPolyData > CreatePlane (const pcl::ModelCoefficients &coefficients)
 
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")
 

Function Documentation

◆ AddPolyDataCell()

void PclTools::AddPolyDataCell ( vtkSmartPointer< vtkPolyData >  polyData)

Definition at line 371 of file PclTools.cpp.

Referenced by CreateCameraSensor().

◆ AllocVtkUnstructuredGrid()

void PclTools::AllocVtkUnstructuredGrid ( vtkSmartPointer< vtkUnstructuredGrid > &  polydata)

Allocate a new unstructured grid smartpointer. For internal use only.

Parameters
[out]polydatathe resultant unstructured grid.

Definition at line 255 of file PclTools.cpp.

◆ CreateActorFromVTKDataSet() [1/2]

void PclTools::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.

Parameters
[in]datathe vtk polydata object to create an actor for
[out]actorthe resultant vtk actor object
[in]use_scalarsset scalar properties to the mapper if it exists in the data. Default: true.

FIXME disabling backface culling due to known VTK bug: vtkTextActors are not shown when there is a vtkActor with backface culling on present in the scene Please see VTK bug tracker for more details: http://www.vtk.org/Bug/view.php?id=12588

FIXME disabling backface culling due to known VTK bug: vtkTextActors are not shown when there is a vtkActor with backface culling on present in the scene Please see VTK bug tracker for more details: http://www.vtk.org/Bug/view.php?id=12588

Definition at line 166 of file PclTools.cpp.

References data, and GetDefaultScalarInterpolationForDataSet().

Referenced by PclUtils::PCLVis::addOrientedCube(), PclUtils::PCLVis::addPolyline(), and PclUtils::PCLVis::draw().

◆ CreateActorFromVTKDataSet() [2/2]

void PclTools::CreateActorFromVTKDataSet ( const vtkSmartPointer< vtkDataSet > &  data,
vtkSmartPointer< vtkLODActor > &  actor,
bool  use_scalars = true,
bool  use_vbos = false 
)

Internal method. Creates a vtk actor from a vtk polydata object.

Parameters
[in]datathe vtk polydata object to create an actor for
[out]actorthe resultant vtk actor object
[in]use_scalarsset scalar properties to the mapper if it exists in the data. Default: true.

FIXME disabling backface culling due to known VTK bug: vtkTextActors are not shown when there is a vtkActor with backface culling on present in the scene Please see VTK bug tracker for more details: http://www.vtk.org/Bug/view.php?id=12588

FIXME disabling backface culling due to known VTK bug: vtkTextActors are not shown when there is a vtkActor with backface culling on present in the scene Please see VTK bug tracker for more details: http://www.vtk.org/Bug/view.php?id=12588

Definition at line 81 of file PclTools.cpp.

References data, and GetDefaultScalarInterpolationForDataSet().

◆ CreateCameraSensor()

vtkSmartPointer< vtkPolyData > PclTools::CreateCameraSensor ( const ccCameraSensor cameraSensor,
const ecvColor::Rgb lineColor,
const ecvColor::Rgb planeColor 
)

◆ CreateCoordinate()

vtkSmartPointer< vtkPropAssembly > PclTools::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 at line 581 of file PclTools.cpp.

Referenced by PclUtils::PCLVis::showOrientationMarkerWidgetAxes().

◆ CreateCoordinateFromLineSet()

◆ CreateCube() [1/2]

vtkSmartPointer< vtkPolyData > PclTools::CreateCube ( double  width,
double  height,
double  depth 
)

Definition at line 1113 of file PclTools.cpp.

References height, and width.

◆ CreateCube() [2/2]

vtkSmartPointer< vtkPolyData > PclTools::CreateCube ( double  width,
double  height,
double  depth,
const ccGLMatrixd trans 
)

Definition at line 1101 of file PclTools.cpp.

References data, CVLog::Error(), height, TransformPolyData(), and width.

Referenced by PclUtils::PCLVis::addOrientedCube().

◆ CreateGBLSensor()

◆ CreateLine() [1/2]

vtkSmartPointer< vtkPolyData > PclTools::CreateLine ( vtkSmartPointer< vtkPoints >  points)

◆ CreateLine() [2/2]

vtkSmartPointer< vtkPolyData > PclTools::CreateLine ( vtkSmartPointer< vtkPoints >  points,
vtkSmartPointer< vtkCellArray >  lines,
vtkSmartPointer< vtkUnsignedCharArray >  colors 
)

Definition at line 325 of file PclTools.cpp.

References colors, and points.

◆ CreatePlane() [1/2]

vtkSmartPointer< vtkPolyData > PclTools::CreatePlane ( const pcl::ModelCoefficients &  coefficients)

Definition at line 501 of file PclTools.cpp.

◆ CreatePlane() [2/2]

vtkSmartPointer< vtkPolyData > PclTools::CreatePlane ( const pcl::ModelCoefficients &  coefficients,
double  x,
double  y,
double  z,
double  scale = 1 
)

Definition at line 517 of file PclTools.cpp.

References x, y, and z.

◆ CreatePolyDataFromLineSet()

vtkSmartPointer< vtkPolyData > PclTools::CreatePolyDataFromLineSet ( const cloudViewer::geometry::LineSet lineset,
bool  useLineSource = true 
)

◆ CreateTexturingMesh() [1/3]

PCLTextureMesh::Ptr PclTools::CreateTexturingMesh ( const PCLMesh::ConstPtr &  triangles,
const pcl::texture_mapping::CameraVector &  cameras,
bool  show_cameras = false,
bool  verbose = false 
)

Definition at line 1417 of file PclTools.cpp.

References FROM_PCL_CLOUD, normals, CVLog::Print(), and TO_PCL_CLOUD.

◆ CreateTexturingMesh() [2/3]

PCLTextureMesh::Ptr PclTools::CreateTexturingMesh ( const std::string &  filePath,
bool  show_cameras = false,
bool  verbose = false 
)

◆ CreateTexturingMesh() [3/3]

PCLTextureMesh::Ptr PclTools::CreateTexturingMesh ( const std::string &  filePath,
const cloudViewer::camera::PinholeCameraTrajectory cameraTrajectory,
bool  show_cameras = false,
bool  verbose = false 
)

◆ GetDefaultScalarInterpolationForDataSet()

int PclTools::GetDefaultScalarInterpolationForDataSet ( vtkDataSet *  data)
inline

Definition at line 73 of file PclTools.h.

References data.

Referenced by CreateActorFromVTKDataSet().

◆ GetVtkPointsAndLinesFromLineSet()

bool PclTools::GetVtkPointsAndLinesFromLineSet ( const cloudViewer::geometry::LineSet lineset,
vtkSmartPointer< vtkPoints >  points,
vtkSmartPointer< vtkCellArray >  lines,
vtkSmartPointer< vtkUnsignedCharArray >  colors 
)

◆ GetVtkPointsFromLineSet()

vtkSmartPointer< vtkPoints > PclTools::GetVtkPointsFromLineSet ( const cloudViewer::geometry::LineSet lineset)

◆ SetPolyDataColor()

void PclTools::SetPolyDataColor ( vtkSmartPointer< vtkPolyData >  polyData,
const ecvColor::Rgb color,
bool  is_cell = false 
)

Definition at line 347 of file PclTools.cpp.

References color, and colors.

Referenced by CreateCameraSensor(), and CreateCoordinateFromLineSet().

◆ TransformPolyData()

bool PclTools::TransformPolyData ( vtkSmartPointer< vtkPolyData >  polyData,
const ccGLMatrixd trans 
)

Definition at line 1074 of file PclTools.cpp.

References points, and TransformVtkPoints().

Referenced by CreateCube().

◆ TransformVtkPoints()

bool PclTools::TransformVtkPoints ( vtkSmartPointer< vtkPoints >  points,
const ccGLMatrixd trans 
)

Definition at line 1087 of file PclTools.cpp.

References ccGLMatrixTpl< T >::apply(), and points.

Referenced by TransformPolyData().

◆ UpdateScalarBar()