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 <pcl/point_types.h>
00045 #include <pcl/point_cloud.h>
00046 #include <pcl/PolygonMesh.h>
00047 #include <pcl/TextureMesh.h>
00048 #include <pcl/pcl_macros.h>
00049 #include <pcl/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 #include <vtkPNGReader.h>
00072 #include <vtkImageData.h>
00073 #include <vtkPolyDataNormals.h>
00074
00075 namespace pcl
00076 {
00077 namespace io
00078 {
00084 PCL_EXPORTS int
00085 vtk2mesh (const vtkSmartPointer<vtkPolyData>& poly_data,
00086 pcl::PolygonMesh& mesh);
00087
00095 PCL_EXPORTS int
00096 vtk2mesh (const vtkSmartPointer<vtkPolyData>& poly_data,
00097 pcl::TextureMesh& mesh);
00098
00099
00105 PCL_EXPORTS int
00106 mesh2vtk (const pcl::PolygonMesh& mesh,
00107 vtkSmartPointer<vtkPolyData>& poly_data);
00108
00114 PCL_EXPORTS int
00115 loadPolygonFile (const std::string &file_name,
00116 pcl::PolygonMesh& mesh);
00117
00123 PCL_EXPORTS int
00124 savePolygonFile (const std::string &file_name,
00125 const pcl::PolygonMesh& mesh);
00126
00132 PCL_EXPORTS int
00133 loadPolygonFileVTK (const std::string &file_name,
00134 pcl::PolygonMesh& mesh);
00135
00141 PCL_EXPORTS int
00142 loadPolygonFilePLY (const std::string &file_name,
00143 pcl::PolygonMesh& mesh);
00144
00150 PCL_EXPORTS int
00151 loadPolygonFileOBJ (const std::string &file_name,
00152 pcl::PolygonMesh& mesh);
00153
00162 PCL_EXPORTS int
00163 loadPolygonFileOBJ (const std::string &file_name,
00164 pcl::TextureMesh& mesh);
00165
00166
00172 PCL_EXPORTS int
00173 loadPolygonFileSTL (const std::string &file_name,
00174 pcl::PolygonMesh& mesh);
00175
00181 PCL_EXPORTS int
00182 savePolygonFileVTK (const std::string &file_name,
00183 const pcl::PolygonMesh& mesh);
00184
00190 PCL_EXPORTS int
00191 savePolygonFilePLY (const std::string &file_name,
00192 const pcl::PolygonMesh& mesh);
00193
00199 PCL_EXPORTS int
00200 savePolygonFileSTL (const std::string &file_name,
00201 const pcl::PolygonMesh& mesh);
00202
00208 PCL_EXPORTS void
00209 saveRangeImagePlanarFilePNG (const std::string &file_name,
00210 const pcl::RangeImagePlanar& range_image);
00211
00217 template <typename PointT> void
00218 pointCloudTovtkPolyData (const pcl::PointCloud<PointT>& cloud,
00219 vtkPolyData* const polydata);
00220
00226 PCL_EXPORTS void
00227 pointCloudTovtkPolyData(const pcl::PCLPointCloud2Ptr& cloud, vtkSmartPointer<vtkPolyData>& poly_data);
00228
00234 template <typename PointT> void
00235 pointCloudTovtkStructuredGrid (const pcl::PointCloud<PointT>& cloud,
00236 vtkStructuredGrid* const structured_grid);
00237
00243 template <typename PointT> void
00244 vtkPolyDataToPointCloud (vtkPolyData* const polydata,
00245 pcl::PointCloud<PointT>& cloud);
00246
00252 template <typename PointT> void
00253 vtkStructuredGridToPointCloud (vtkStructuredGrid* const structured_grid,
00254 pcl::PointCloud<PointT>& cloud);
00255
00256 }
00257 }
00258
00259 #include <pcl/io/impl/vtk_lib_io.hpp>
00260
00261 #endif