Permalink
Browse files

Merge pull request #1770 from v4hn/vtk71-support

compile-time support for VTK7.1
  • Loading branch information...
2 parents a2648ba + 7884dbd commit ad67293f02f9ca12234500e13de46085105ea5e9 @jspricke jspricke committed on GitHub Jan 5, 2017
@@ -61,6 +61,13 @@
#include <vtkStructuredGrid.h>
#include <vtkVertexGlyphFilter.h>
+// Support for VTK 7.1 upwards
+#ifdef vtkGenericDataArray_h
+#define SetTupleValue SetTypedTuple
+#define InsertNextTupleValue InsertNextTypedTuple
+#define GetTupleValue GetTypedTuple
+#endif
+
///////////////////////////////////////////////////////////////////////////////////////////
template <typename PointT> void
pcl::io::vtkPolyDataToPointCloud (vtkPolyData* const polydata, pcl::PointCloud<PointT>& cloud)
@@ -503,5 +510,11 @@ pcl::io::pointCloudTovtkStructuredGrid (const pcl::PointCloud<PointT>& cloud, vt
}
}
+#ifdef vtkGenericDataArray_h
+#undef SetTupleValue
+#undef InsertNextTupleValue
+#undef GetTupleValue
+#endif
+
#endif //#ifndef PCL_IO_VTK_IO_H_
@@ -46,6 +46,13 @@
#include <vtkImageShiftScale.h>
#include <vtkPNGWriter.h>
+// Support for VTK 7.1 upwards
+#ifdef vtkGenericDataArray_h
+#define SetTupleValue SetTypedTuple
+#define InsertNextTupleValue InsertNextTypedTuple
+#define GetTupleValue GetTypedTuple
+#endif
+
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
int
pcl::io::loadPolygonFile (const std::string &file_name, pcl::PolygonMesh& mesh)
@@ -49,6 +49,12 @@
#include <vtkPointData.h>
#include <vtkFloatArray.h>
+// Support for VTK 7.1 upwards
+#ifdef vtkGenericDataArray_h
+#define SetTupleValue SetTypedTuple
+#define InsertNextTupleValue InsertNextTypedTuple
+#define GetTupleValue GetTypedTuple
+#endif
//////////////////////////////////////////////////////////////////////////////////////////////
int
@@ -64,6 +64,13 @@
#include <pcl/visualization/common/shapes.h>
+// Support for VTK 7.1 upwards
+#ifdef vtkGenericDataArray_h
+#define SetTupleValue SetTypedTuple
+#define InsertNextTupleValue InsertNextTypedTuple
+#define GetTupleValue GetTypedTuple
+#endif
+
//////////////////////////////////////////////////////////////////////////////////////////////
template <typename PointT> bool
pcl::visualization::PCLVisualizer::addPointCloud (
@@ -1843,4 +1850,10 @@ pcl::visualization::PCLVisualizer::updatePolygonMesh (
return (true);
}
+#ifdef vtkGenericDataArray_h
+#undef SetTupleValue
+#undef InsertNextTupleValue
+#undef GetTupleValue
+#endif
+
#endif
@@ -104,6 +104,13 @@
#include <boost/filesystem.hpp>
#include <pcl/console/parse.h>
+// Support for VTK 7.1 upwards
+#ifdef vtkGenericDataArray_h
+#define SetTupleValue SetTypedTuple
+#define InsertNextTupleValue InsertNextTypedTuple
+#define GetTupleValue GetTypedTuple
+#endif
+
#if defined(_WIN32)
// Remove macros defined in Windows.h
#undef near

0 comments on commit ad67293

Please sign in to comment.