41 #ifndef PCL_IO_VTK_LIB_IO_H_
42 #define PCL_IO_VTK_LIB_IO_H_
44 #include <pcl/point_types.h>
45 #include <pcl/point_cloud.h>
46 #include <pcl/PolygonMesh.h>
47 #include <pcl/TextureMesh.h>
48 #include <pcl/pcl_macros.h>
49 #include <pcl/conversions.h>
50 #include <pcl/io/pcd_io.h>
51 #include <pcl/range_image/range_image_planar.h>
55 #pragma GCC system_header
57 #include <vtkSmartPointer.h>
58 #include <vtkStructuredGrid.h>
59 #include <vtkPoints.h>
60 #include <vtkPointData.h>
61 #include <vtkCellArray.h>
62 #include <vtkUnsignedCharArray.h>
63 #include <vtkFloatArray.h>
64 #include <vtkPolyDataReader.h>
65 #include <vtkPolyDataWriter.h>
66 #include <vtkPLYReader.h>
67 #include <vtkPLYWriter.h>
68 #include <vtkOBJReader.h>
69 #include <vtkSTLReader.h>
70 #include <vtkSTLWriter.h>
71 #include <vtkPNGReader.h>
72 #include <vtkImageData.h>
73 #include <vtkPolyDataNormals.h>
217 template <
typename Po
intT>
void
219 vtkPolyData*
const polydata);
234 template <
typename Po
intT>
void
236 vtkStructuredGrid*
const structured_grid);
243 template <
typename Po
intT>
void
252 template <
typename Po
intT>
void
259 #include <pcl/io/impl/vtk_lib_io.hpp>
PCL_EXPORTS int loadPolygonFile(const std::string &file_name, pcl::PolygonMesh &mesh)
Load a PolygonMesh object given an input file name, based on the file extension.
PCL_EXPORTS int loadPolygonFileSTL(const std::string &file_name, pcl::PolygonMesh &mesh)
Load an STL file into a PolygonMesh object.
void pointCloudTovtkPolyData(const pcl::PointCloud< PointT > &cloud, vtkPolyData *const polydata)
Convert a pcl::PointCloud object to a VTK PolyData one.
PCL_EXPORTS void saveRangeImagePlanarFilePNG(const std::string &file_name, const pcl::RangeImagePlanar &range_image)
Write a RangeImagePlanar object to a PNG file.
PCL_EXPORTS int loadPolygonFilePLY(const std::string &file_name, pcl::PolygonMesh &mesh)
Load a PLY file into a PolygonMesh object.
PCL_EXPORTS int savePolygonFile(const std::string &file_name, const pcl::PolygonMesh &mesh)
Save a PolygonMesh object given an input file name, based on the file extension.
void vtkPolyDataToPointCloud(vtkPolyData *const polydata, pcl::PointCloud< PointT > &cloud)
Convert a VTK PolyData object to a pcl::PointCloud one.
PCL_EXPORTS int loadPolygonFileVTK(const std::string &file_name, pcl::PolygonMesh &mesh)
Load a VTK file into a PolygonMesh object.
PCL_EXPORTS int savePolygonFileSTL(const std::string &file_name, const pcl::PolygonMesh &mesh)
Save a PolygonMesh object into an STL file.
PCL_EXPORTS int loadPolygonFileOBJ(const std::string &file_name, pcl::PolygonMesh &mesh)
Load an OBJ file into a PolygonMesh object.
PCL_EXPORTS int savePolygonFilePLY(const std::string &file_name, const pcl::PolygonMesh &mesh)
Save a PolygonMesh object into a PLY file.
boost::shared_ptr< ::pcl::PCLPointCloud2 > PCLPointCloud2Ptr
void vtkStructuredGridToPointCloud(vtkStructuredGrid *const structured_grid, pcl::PointCloud< PointT > &cloud)
Convert a VTK StructuredGrid object to a pcl::PointCloud one.
PCL_EXPORTS int mesh2vtk(const pcl::PolygonMesh &mesh, vtkSmartPointer< vtkPolyData > &poly_data)
Convert a PCL PolygonMesh to a vtkPolyData object.
PCL_EXPORTS int savePolygonFileVTK(const std::string &file_name, const pcl::PolygonMesh &mesh)
Save a PolygonMesh object into a VTK file.
PCL_EXPORTS int vtk2mesh(const vtkSmartPointer< vtkPolyData > &poly_data, pcl::PolygonMesh &mesh)
Convert vtkPolyData object to a PCL PolygonMesh.
RangeImagePlanar is derived from the original range image and differs from it because it's not a sphe...
void pointCloudTovtkStructuredGrid(const pcl::PointCloud< PointT > &cloud, vtkStructuredGrid *const structured_grid)
Convert a pcl::PointCloud object to a VTK StructuredGrid one.