Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #ifndef PCL_IO_VTK_LIB_IO_H_
00042 #define PCL_IO_VTK_LIB_IO_H_
00043
00044 #include <boost/filesystem.hpp>
00045 #include <pcl/point_types.h>
00046 #include <pcl/point_cloud.h>
00047 #include <pcl/PolygonMesh.h>
00048 #include <pcl/pcl_macros.h>
00049 #include <pcl/ros/conversions.h>
00050 #include <pcl/io/pcd_io.h>
00051 #include <pcl/range_image/range_image_planar.h>
00052
00053
00054 #ifdef __GNUC__
00055 #pragma GCC system_header
00056 #endif
00057 #include <vtkSmartPointer.h>
00058 #include <vtkStructuredGrid.h>
00059 #include <vtkPoints.h>
00060 #include <vtkPointData.h>
00061 #include <vtkCellArray.h>
00062 #include <vtkUnsignedCharArray.h>
00063 #include <vtkFloatArray.h>
00064 #include <vtkPolyDataReader.h>
00065 #include <vtkPolyDataWriter.h>
00066 #include <vtkPLYReader.h>
00067 #include <vtkPLYWriter.h>
00068 #include <vtkOBJReader.h>
00069 #include <vtkSTLReader.h>
00070 #include <vtkSTLWriter.h>
00071
00072 namespace pcl
00073 {
00074 namespace io
00075 {
00081 PCL_EXPORTS int
00082 vtk2mesh (const vtkSmartPointer<vtkPolyData>& poly_data,
00083 pcl::PolygonMesh& mesh);
00084
00090 PCL_EXPORTS int
00091 mesh2vtk (const pcl::PolygonMesh& mesh,
00092 vtkSmartPointer<vtkPolyData>& poly_data);
00093
00099 PCL_EXPORTS int
00100 loadPolygonFile (const std::string &file_name,
00101 pcl::PolygonMesh& mesh);
00102
00108 PCL_EXPORTS int
00109 savePolygonFile (const std::string &file_name,
00110 const pcl::PolygonMesh& mesh);
00111
00117 PCL_EXPORTS int
00118 loadPolygonFileVTK (const std::string &file_name,
00119 pcl::PolygonMesh& mesh);
00120
00126 PCL_EXPORTS int
00127 loadPolygonFilePLY (const std::string &file_name,
00128 pcl::PolygonMesh& mesh);
00129
00135 PCL_EXPORTS int
00136 loadPolygonFileOBJ (const std::string &file_name,
00137 pcl::PolygonMesh& mesh);
00138
00144 PCL_EXPORTS int
00145 loadPolygonFileSTL (const std::string &file_name,
00146 pcl::PolygonMesh& mesh);
00147
00153 PCL_EXPORTS int
00154 savePolygonFileVTK (const std::string &file_name,
00155 const pcl::PolygonMesh& mesh);
00156
00162 PCL_EXPORTS int
00163 savePolygonFilePLY (const std::string &file_name,
00164 const pcl::PolygonMesh& mesh);
00165
00171 PCL_EXPORTS int
00172 savePolygonFileSTL (const std::string &file_name,
00173 const pcl::PolygonMesh& mesh);
00174
00180 PCL_EXPORTS void
00181 saveRangeImagePlanarFilePNG (const std::string &file_name,
00182 const pcl::RangeImagePlanar& range_image);
00183
00189 template <typename PointT> void
00190 pointCloudTovtkPolyData (const pcl::PointCloud<PointT>& cloud,
00191 vtkPolyData* const polydata);
00192
00198 template <typename PointT> void
00199 pointCloudTovtkStructuredGrid (const pcl::PointCloud<PointT>& cloud,
00200 vtkStructuredGrid* const structured_grid);
00201
00207 template <typename PointT> void
00208 vtkPolyDataToPointCloud (vtkPolyData* const polydata,
00209 pcl::PointCloud<PointT>& cloud);
00210
00216 template <typename PointT> void
00217 vtkStructuredGridToPointCloud (vtkStructuredGrid* const structured_grid,
00218 pcl::PointCloud<PointT>& cloud);
00219
00220 }
00221 }
00222
00223 #endif