pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/graphics/pcl
Module Name: pkgsrc
Committed By: thor
Date: Fri May 7 11:36:30 UTC 2021
Modified Files:
pkgsrc/graphics/pcl: Makefile PLIST buildlink3.mk distinfo
Added Files:
pkgsrc/graphics/pcl: options.mk
pkgsrc/graphics/pcl/patches: patch-2d_CMakeLists.txt
patch-CMakeLists.txt patch-apps_3d__rec__framework_CMakeLists.txt
patch-apps_3d__rec__framework_include_pcl_apps_3d__rec__framework_utils_vtk__model__sampling.h
patch-apps_CMakeLists.txt patch-apps_cloud__composer_CMakeLists.txt
patch-apps_cloud__composer_include_pcl_apps_cloud__composer_cloud__view.h
patch-apps_cloud__composer_include_pcl_apps_cloud__composer_items_cloud__item.h
patch-apps_cloud__composer_include_pcl_apps_cloud__composer_items_fpfh__item.h
patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_click__trackball__interactor__style.h
patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_interactor__style__switch.h
patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_manipulation__event.h
patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_rectangular__frustum__selector.h
patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_selected__trackball__interactor__style.h
patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_selection__event.h
patch-apps_cloud__composer_src_cloud__view.cpp
patch-apps_cloud__composer_src_items_fpfh__item.cpp
patch-apps_cloud__composer_src_point__selectors_click__trackball__interactor__style.cpp
patch-apps_cloud__composer_src_point__selectors_interactor__style__switch.cpp
patch-apps_cloud__composer_src_point__selectors_rectangular__frustum__selector.cpp
patch-apps_cloud__composer_src_point__selectors_selected__trackball__interactor__style.cpp
patch-apps_cloud__composer_src_project__model.cpp
patch-apps_include_pcl_apps_manual__registration.h
patch-apps_include_pcl_apps_openni__passthrough.h
patch-apps_include_pcl_apps_organized__segmentation__demo.h
patch-apps_include_pcl_apps_pcd__video__player.h
patch-apps_modeler_CMakeLists.txt
patch-apps_modeler_include_pcl_apps_modeler_render__window.h
patch-apps_modeler_src_cloud__mesh.cpp
patch-apps_modeler_src_cloud__mesh__item.cpp
patch-apps_modeler_src_render__window.cpp
patch-apps_src_manual__registration_manual__registration.cpp
patch-apps_src_manual__registration_manual__registration.ui
patch-apps_src_openni__octree__compression.cpp
patch-apps_src_openni__passthrough.cpp
patch-apps_src_openni__passthrough.ui
patch-apps_src_organized__segmentation__demo.cpp
patch-apps_src_organized__segmentation__demo.ui
patch-apps_src_pcd__video__player_pcd__video__player.cpp
patch-apps_src_pcd__video__player_pcd__video__player.ui
patch-apps_src_render__views__tesselated__sphere.cpp
patch-cmake_Modules_FindGLEW.cmake patch-cmake_pcl__find__vtk.cmake
patch-examples_keypoints_CMakeLists.txt
patch-examples_outofcore_CMakeLists.txt
patch-examples_segmentation_CMakeLists.txt
patch-examples_stereo_CMakeLists.txt
patch-examples_surface_CMakeLists.txt
patch-gpu_kinfu__large__scale_tools_CMakeLists.txt
patch-gpu_kinfu_tools_CMakeLists.txt
patch-gpu_people_tools_CMakeLists.txt patch-io_CMakeLists.txt
patch-io_src_vtk__lib__io.cpp patch-outofcore_tools_CMakeLists.txt
patch-pcl__config.h.in patch-people_CMakeLists.txt
patch-registration_include_pcl_registration_impl_ppf__registration.hpp
patch-registration_include_pcl_registration_ppf__registration.h
patch-simulation_CMakeLists.txt patch-simulation_src_model.cpp
patch-surface_CMakeLists.txt
patch-surface_src_vtk__smoothing_vtk__utils.cpp
patch-tools_CMakeLists.txt patch-tools_mesh__sampling.cpp
patch-tools_openni__save__image.cpp patch-tools_pcd__viewer.cpp
patch-tools_virtual__scanner.cpp patch-visualization_CMakeLists.txt
patch-visualization_include_pcl_visualization_common_actor__map.h
patch-visualization_include_pcl_visualization_common_ren__win__interact__map.h
patch-visualization_include_pcl_visualization_impl_pcl__visualizer.hpp
patch-visualization_include_pcl_visualization_interactor__style.h
patch-visualization_include_pcl_visualization_pcl__plotter.h
patch-visualization_include_pcl_visualization_pcl__visualizer.h
patch-visualization_include_pcl_visualization_qvtk__compatibility.h
patch-visualization_include_pcl_visualization_vtk.h
patch-visualization_include_pcl_visualization_vtk_pcl__vtk__compatibility.h
patch-visualization_src_cloud__viewer.cpp
patch-visualization_src_histogram__visualizer.cpp
patch-visualization_src_interactor__style.cpp
patch-visualization_src_pcl__visualizer.cpp
patch-visualization_src_point__picking__event.cpp
Log Message:
graphics/pcl: enable visualization using VTK
This is a very common use-case and thus VTK is on by default. As there
are cases where you just need PCL for the data formats and algorithms,
it can be disabled.
There is another change pending to add Qt support to VTK, which will
be inherited here, as I am told the (a?) standard use case for VTK is via
Qt. The option is: Either just computations (headless) or the full
visualization stuff.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 pkgsrc/graphics/pcl/Makefile \
pkgsrc/graphics/pcl/buildlink3.mk
cvs rdiff -u -r1.2 -r1.3 pkgsrc/graphics/pcl/PLIST
cvs rdiff -u -r1.1 -r1.2 pkgsrc/graphics/pcl/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/graphics/pcl/options.mk
cvs rdiff -u -r0 -r1.1 pkgsrc/graphics/pcl/patches/patch-2d_CMakeLists.txt \
pkgsrc/graphics/pcl/patches/patch-CMakeLists.txt \
pkgsrc/graphics/pcl/patches/patch-apps_3d__rec__framework_CMakeLists.txt \
pkgsrc/graphics/pcl/patches/patch-apps_3d__rec__framework_include_pcl_apps_3d__rec__framework_utils_vtk__model__sampling.h \
pkgsrc/graphics/pcl/patches/patch-apps_CMakeLists.txt \
pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_CMakeLists.txt \
pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_cloud__view.h \
pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_items_cloud__item.h \
pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_items_fpfh__item.h \
pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_click__trackball__interactor__style.h \
pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_interactor__style__switch.h \
pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_manipulation__event.h \
pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_rectangular__frustum__selector.h \
pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_selected__trackball__interactor__style.h \
pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_selection__event.h \
pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_src_cloud__view.cpp \
pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_src_items_fpfh__item.cpp \
pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_src_point__selectors_click__trackball__interactor__style.cpp \
pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_src_point__selectors_interactor__style__switch.cpp \
pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_src_point__selectors_rectangular__frustum__selector.cpp \
pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_src_point__selectors_selected__trackball__interactor__style.cpp \
pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_src_project__model.cpp \
pkgsrc/graphics/pcl/patches/patch-apps_include_pcl_apps_manual__registration.h \
pkgsrc/graphics/pcl/patches/patch-apps_include_pcl_apps_openni__passthrough.h \
pkgsrc/graphics/pcl/patches/patch-apps_include_pcl_apps_organized__segmentation__demo.h \
pkgsrc/graphics/pcl/patches/patch-apps_include_pcl_apps_pcd__video__player.h \
pkgsrc/graphics/pcl/patches/patch-apps_modeler_CMakeLists.txt \
pkgsrc/graphics/pcl/patches/patch-apps_modeler_include_pcl_apps_modeler_render__window.h \
pkgsrc/graphics/pcl/patches/patch-apps_modeler_src_cloud__mesh.cpp \
pkgsrc/graphics/pcl/patches/patch-apps_modeler_src_cloud__mesh__item.cpp \
pkgsrc/graphics/pcl/patches/patch-apps_modeler_src_render__window.cpp \
pkgsrc/graphics/pcl/patches/patch-apps_src_manual__registration_manual__registration.cpp \
pkgsrc/graphics/pcl/patches/patch-apps_src_manual__registration_manual__registration.ui \
pkgsrc/graphics/pcl/patches/patch-apps_src_openni__octree__compression.cpp \
pkgsrc/graphics/pcl/patches/patch-apps_src_openni__passthrough.cpp \
pkgsrc/graphics/pcl/patches/patch-apps_src_openni__passthrough.ui \
pkgsrc/graphics/pcl/patches/patch-apps_src_organized__segmentation__demo.cpp \
pkgsrc/graphics/pcl/patches/patch-apps_src_organized__segmentation__demo.ui \
pkgsrc/graphics/pcl/patches/patch-apps_src_pcd__video__player_pcd__video__player.cpp \
pkgsrc/graphics/pcl/patches/patch-apps_src_pcd__video__player_pcd__video__player.ui \
pkgsrc/graphics/pcl/patches/patch-apps_src_render__views__tesselated__sphere.cpp \
pkgsrc/graphics/pcl/patches/patch-cmake_Modules_FindGLEW.cmake \
pkgsrc/graphics/pcl/patches/patch-cmake_pcl__find__vtk.cmake \
pkgsrc/graphics/pcl/patches/patch-examples_keypoints_CMakeLists.txt \
pkgsrc/graphics/pcl/patches/patch-examples_outofcore_CMakeLists.txt \
pkgsrc/graphics/pcl/patches/patch-examples_segmentation_CMakeLists.txt \
pkgsrc/graphics/pcl/patches/patch-examples_stereo_CMakeLists.txt \
pkgsrc/graphics/pcl/patches/patch-examples_surface_CMakeLists.txt \
pkgsrc/graphics/pcl/patches/patch-gpu_kinfu__large__scale_tools_CMakeLists.txt \
pkgsrc/graphics/pcl/patches/patch-gpu_kinfu_tools_CMakeLists.txt \
pkgsrc/graphics/pcl/patches/patch-gpu_people_tools_CMakeLists.txt \
pkgsrc/graphics/pcl/patches/patch-io_CMakeLists.txt \
pkgsrc/graphics/pcl/patches/patch-io_src_vtk__lib__io.cpp \
pkgsrc/graphics/pcl/patches/patch-outofcore_tools_CMakeLists.txt \
pkgsrc/graphics/pcl/patches/patch-pcl__config.h.in \
pkgsrc/graphics/pcl/patches/patch-people_CMakeLists.txt \
pkgsrc/graphics/pcl/patches/patch-registration_include_pcl_registration_impl_ppf__registration.hpp \
pkgsrc/graphics/pcl/patches/patch-registration_include_pcl_registration_ppf__registration.h \
pkgsrc/graphics/pcl/patches/patch-simulation_CMakeLists.txt \
pkgsrc/graphics/pcl/patches/patch-simulation_src_model.cpp \
pkgsrc/graphics/pcl/patches/patch-surface_CMakeLists.txt \
pkgsrc/graphics/pcl/patches/patch-surface_src_vtk__smoothing_vtk__utils.cpp \
pkgsrc/graphics/pcl/patches/patch-tools_CMakeLists.txt \
pkgsrc/graphics/pcl/patches/patch-tools_mesh__sampling.cpp \
pkgsrc/graphics/pcl/patches/patch-tools_openni__save__image.cpp \
pkgsrc/graphics/pcl/patches/patch-tools_pcd__viewer.cpp \
pkgsrc/graphics/pcl/patches/patch-tools_virtual__scanner.cpp \
pkgsrc/graphics/pcl/patches/patch-visualization_CMakeLists.txt \
pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_common_actor__map.h \
pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_common_ren__win__interact__map.h \
pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_impl_pcl__visualizer.hpp \
pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_interactor__style.h \
pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_pcl__plotter.h \
pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_pcl__visualizer.h \
pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_qvtk__compatibility.h \
pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_vtk.h \
pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_vtk_pcl__vtk__compatibility.h \
pkgsrc/graphics/pcl/patches/patch-visualization_src_cloud__viewer.cpp \
pkgsrc/graphics/pcl/patches/patch-visualization_src_histogram__visualizer.cpp \
pkgsrc/graphics/pcl/patches/patch-visualization_src_interactor__style.cpp \
pkgsrc/graphics/pcl/patches/patch-visualization_src_pcl__visualizer.cpp \
pkgsrc/graphics/pcl/patches/patch-visualization_src_point__picking__event.cpp
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/graphics/pcl/Makefile
diff -u pkgsrc/graphics/pcl/Makefile:1.3 pkgsrc/graphics/pcl/Makefile:1.4
--- pkgsrc/graphics/pcl/Makefile:1.3 Mon May 3 17:29:58 2021
+++ pkgsrc/graphics/pcl/Makefile Fri May 7 11:36:29 2021
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.3 2021/05/03 17:29:58 thor Exp $
+# $NetBSD: Makefile,v 1.4 2021/05/07 11:36:29 thor Exp $
GITHUB_PROJECT= pcl
GITHUB_TAG= pcl-${PKGVERSION}
-PKGREVISION= 1
+PKGREVISION= 2
DISTNAME= pcl-1.11.1
CATEGORIES= graphics
MASTER_SITES= ${MASTER_SITE_GITHUB:=PointCloudLibrary/}
@@ -22,18 +22,25 @@ CMAKE_ARGS+= -DWITH_QHULL=TRUE
CMAKE_ARGS+= -DWITH_CUDA=FALSE
CMAKE_ARGS+= -DWITH_QT=FALSE
+.include "options.mk"
+
+# Non-VTK install would still find GLEW and install a misleading
+# CMake file for it. Avoid that by deletion after configure.
+.if empty(PKG_OPTIONS:Mvtk)
+pre-build:
+ rm -f ${WRKSRC:Q}/cmake/Modules/FindGLEW.cmake
+.endif
+
PLIST_SUBST+= PCL_BASE_VERSION=${PKGVERSION_NOREV:C/([0-9]+\.[0-9]+).*/\1/}
.include "../../devel/boost-libs/buildlink3.mk"
.include "../../devel/libusb1/buildlink3.mk"
.include "../../math/flann-lib/buildlink3.mk"
-# waiting for VTK update, not usable yet
-#.include "../../graphics/vtk/buildlink3.mk"
-#.include "../../graphics/glew/buildlink3.mk"
.include "../../math/eigen3/buildlink3.mk"
.include "../../math/qhull/buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
.include "../../net/libpcap/buildlink3.mk"
+.include "../../textproc/expat/buildlink3.mk"
# Not used correctly right now, see
# https://github.com/PointCloudLibrary/pcl/issues/4744
#.include "../../devel/metslib/buildlink3.mk"
Index: pkgsrc/graphics/pcl/buildlink3.mk
diff -u pkgsrc/graphics/pcl/buildlink3.mk:1.3 pkgsrc/graphics/pcl/buildlink3.mk:1.4
--- pkgsrc/graphics/pcl/buildlink3.mk:1.3 Mon May 3 17:29:58 2021
+++ pkgsrc/graphics/pcl/buildlink3.mk Fri May 7 11:36:29 2021
@@ -1,4 +1,7 @@
-# $NetBSD: buildlink3.mk,v 1.3 2021/05/03 17:29:58 thor Exp $
+# $NetBSD: buildlink3.mk,v 1.4 2021/05/07 11:36:29 thor Exp $
+
+# TODO: PKG_BUILD_OPTIONS dance like devel/php-threads or
+# just always enable vtk as hard dependency.
BUILDLINK_TREE+= pcl
Index: pkgsrc/graphics/pcl/PLIST
diff -u pkgsrc/graphics/pcl/PLIST:1.2 pkgsrc/graphics/pcl/PLIST:1.3
--- pkgsrc/graphics/pcl/PLIST:1.2 Mon May 3 17:29:58 2021
+++ pkgsrc/graphics/pcl/PLIST Fri May 7 11:36:29 2021
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.2 2021/05/03 17:29:58 thor Exp $
+@comment $NetBSD: PLIST,v 1.3 2021/05/07 11:36:29 thor Exp $
bin/pcl_add_gaussian_noise
bin/pcl_boundary_estimation
bin/pcl_cluster_extraction
@@ -983,3 +983,142 @@ share/pcl-${PCL_BASE_VERSION}/Modules/Fi
share/pcl-${PCL_BASE_VERSION}/Modules/UseCompilerCache.cmake
share/pcl-${PCL_BASE_VERSION}/PCLConfig.cmake
share/pcl-${PCL_BASE_VERSION}/PCLConfigVersion.cmake
+${PLIST.vtk}bin/pcl_converter
+${PLIST.vtk}bin/pcl_hdl_viewer_simple
+${PLIST.vtk}bin/pcl_mesh2pcd
+${PLIST.vtk}bin/pcl_mesh_sampling
+${PLIST.vtk}bin/pcl_obj2pcd
+${PLIST.vtk}bin/pcl_obj2ply
+${PLIST.vtk}bin/pcl_obj2vtk
+${PLIST.vtk}bin/pcl_obj_rec_ransac_accepted_hypotheses
+${PLIST.vtk}bin/pcl_obj_rec_ransac_hash_table
+${PLIST.vtk}bin/pcl_obj_rec_ransac_model_opps
+${PLIST.vtk}bin/pcl_obj_rec_ransac_orr_octree
+${PLIST.vtk}bin/pcl_obj_rec_ransac_orr_octree_zprojection
+${PLIST.vtk}bin/pcl_obj_rec_ransac_result
+${PLIST.vtk}bin/pcl_obj_rec_ransac_scene_opps
+${PLIST.vtk}bin/pcl_octree_viewer
+${PLIST.vtk}bin/pcl_outofcore_print
+${PLIST.vtk}bin/pcl_outofcore_process
+${PLIST.vtk}bin/pcl_outofcore_viewer
+${PLIST.vtk}bin/pcl_pcd2png
+${PLIST.vtk}bin/pcl_pcd_image_viewer
+${PLIST.vtk}bin/pcl_ply2vtk
+${PLIST.vtk}bin/pcl_png2pcd
+${PLIST.vtk}bin/pcl_registration_visualizer
+${PLIST.vtk}bin/pcl_tiff2pcd
+${PLIST.vtk}bin/pcl_timed_trigger_test
+${PLIST.vtk}bin/pcl_viewer
+${PLIST.vtk}bin/pcl_virtual_scanner
+${PLIST.vtk}bin/pcl_vlp_viewer
+${PLIST.vtk}bin/pcl_voxel_grid_occlusion_estimation
+${PLIST.vtk}bin/pcl_vtk2obj
+${PLIST.vtk}bin/pcl_vtk2pcd
+${PLIST.vtk}bin/pcl_vtk2ply
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/io/impl/vtk_lib_io.hpp
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/io/png_io.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/io/vtk_lib_io.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/boost.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/cJSON.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/impl/lru_cache.hpp
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/impl/monitor_queue.hpp
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/impl/octree_base.hpp
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/impl/octree_base_node.hpp
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/impl/octree_disk_container.hpp
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/impl/octree_ram_container.hpp
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/impl/outofcore_breadth_first_iterator.hpp
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/impl/outofcore_depth_first_iterator.hpp
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/metadata.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/octree_abstract_node_container.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/octree_base.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/octree_base_node.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/octree_disk_container.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/octree_ram_container.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/outofcore_base_data.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/outofcore_breadth_first_iterator.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/outofcore_depth_first_iterator.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/outofcore.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/outofcore_impl.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/outofcore_iterator_base.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/outofcore_node_data.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/visualization/axes.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/visualization/camera.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/visualization/common.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/visualization/geometry.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/visualization/grid.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/visualization/object.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/visualization/outofcore_cloud.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/visualization/scene.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/outofcore/visualization/viewport.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/people/ground_based_people_detection_app.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/people/head_based_subcluster.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/people/height_map_2d.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/people/hog.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/people/impl/ground_based_people_detection_app.hpp
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/people/impl/head_based_subcluster.hpp
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/people/impl/height_map_2d.hpp
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/people/impl/person_classifier.hpp
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/people/impl/person_cluster.hpp
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/people/person_classifier.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/people/person_cluster.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/surface/vtk_smoothing/vtk.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/surface/vtk_smoothing/vtk_mesh_quadric_decimation.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/surface/vtk_smoothing/vtk_mesh_smoothing_laplacian.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/surface/vtk_smoothing/vtk_mesh_smoothing_windowed_sinc.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/surface/vtk_smoothing/vtk_mesh_subdivision.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/surface/vtk_smoothing/vtk_utils.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/area_picking_event.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/boost.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/cloud_viewer.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/common/actor_map.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/common/common.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/common/float_image_utils.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/common/impl/common.hpp
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/common/impl/shapes.hpp
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/common/io.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/common/ren_win_interact_map.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/common/shapes.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/eigen.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/histogram_visualizer.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/image_viewer.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/impl/histogram_visualizer.hpp
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/impl/image_viewer.hpp
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/impl/pcl_plotter.hpp
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/impl/pcl_visualizer.hpp
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/impl/point_cloud_color_handlers.hpp
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/impl/point_cloud_geometry_handlers.hpp
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/impl/point_cloud_handlers.hpp
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/impl/registration_visualizer.hpp
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/interactor_style.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/keyboard_event.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/mouse_event.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/pcl_painter2D.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/pcl_plotter.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/pcl_visualizer.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/point_cloud_color_handlers.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/point_cloud_geometry_handlers.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/point_cloud_handlers.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/point_picking_event.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/qvtk_compatibility.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/range_image_visualizer.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/registration_visualizer.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/simple_buffer_visualizer.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/vtk.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/vtk/pcl_context_item.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/vtk/pcl_image_canvas_source_2d.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/vtk/pcl_vtk_compatibility.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/vtk/vtkRenderWindowInteractorFix.h
+${PLIST.vtk}include/pcl-${PCL_BASE_VERSION}/pcl/visualization/window.h
+${PLIST.vtk}lib/libpcl_outofcore.so
+${PLIST.vtk}lib/libpcl_outofcore.so.${PCL_BASE_VERSION}
+${PLIST.vtk}lib/libpcl_outofcore.so.${PKGVERSION}
+${PLIST.vtk}lib/libpcl_people.so
+${PLIST.vtk}lib/libpcl_people.so.${PCL_BASE_VERSION}
+${PLIST.vtk}lib/libpcl_people.so.${PKGVERSION}
+${PLIST.vtk}lib/libpcl_visualization.so
+${PLIST.vtk}lib/libpcl_visualization.so.${PCL_BASE_VERSION}
+${PLIST.vtk}lib/libpcl_visualization.so.${PKGVERSION}
+${PLIST.vtk}lib/pkgconfig/pcl_outofcore-${PCL_BASE_VERSION}.pc
+${PLIST.vtk}lib/pkgconfig/pcl_people-${PCL_BASE_VERSION}.pc
+${PLIST.vtk}lib/pkgconfig/pcl_visualization-${PCL_BASE_VERSION}.pc
+${PLIST.vtk}share/pcl-${PCL_BASE_VERSION}/Modules/FindGLEW.cmake
Index: pkgsrc/graphics/pcl/distinfo
diff -u pkgsrc/graphics/pcl/distinfo:1.1 pkgsrc/graphics/pcl/distinfo:1.2
--- pkgsrc/graphics/pcl/distinfo:1.1 Mon May 3 06:25:11 2021
+++ pkgsrc/graphics/pcl/distinfo Fri May 7 11:36:29 2021
@@ -1,11 +1,93 @@
-$NetBSD: distinfo,v 1.1 2021/05/03 06:25:11 thor Exp $
+$NetBSD: distinfo,v 1.2 2021/05/07 11:36:29 thor Exp $
SHA1 (pcl-1.11.1.tar.gz) = 982a528fa493834e415728357695296c011001b9
RMD160 (pcl-1.11.1.tar.gz) = 7f0679139ad86db5ae3451a7bfdaaf4ecdf5ceca
SHA512 (pcl-1.11.1.tar.gz) = 93dd3180443a1a26f019bfd1e34855014619b3b74326ae93806a2711dba392b1c76f2aa682cc3955c651a45ce829a0c89d1cae7cef09cdea60fcb671aefe4da2
Size (pcl-1.11.1.tar.gz) = 68515312 bytes
+SHA1 (patch-2d_CMakeLists.txt) = 2ff5d0943e4171a50d0d5cf0646adc4733e7a2ae
+SHA1 (patch-CMakeLists.txt) = 214b20e8a0d66f92e25acad2d9ef3731c81c60dc
+SHA1 (patch-apps_3d__rec__framework_CMakeLists.txt) = 5736b25611b9f549edbe128054f87190e3c9652e
+SHA1 (patch-apps_3d__rec__framework_include_pcl_apps_3d__rec__framework_utils_vtk__model__sampling.h) = 831e810adfc0e8de18751a6d068ccaafbc0145d0
+SHA1 (patch-apps_CMakeLists.txt) = bbe2d7325816a53fdcd9c991ed54c38c2585bf02
+SHA1 (patch-apps_cloud__composer_CMakeLists.txt) = 207660367303fdc85f7dc5a4a0a83ab5f63b6490
+SHA1 (patch-apps_cloud__composer_include_pcl_apps_cloud__composer_cloud__view.h) = 3c76d1c2f1527683bf15c5ce3cafc00ba513100b
+SHA1 (patch-apps_cloud__composer_include_pcl_apps_cloud__composer_items_cloud__item.h) = 6d0c51f7ce6b250327f31a6761b6787395e3c14e
+SHA1 (patch-apps_cloud__composer_include_pcl_apps_cloud__composer_items_fpfh__item.h) = 6394b27c95605d5698b8dabf9ea5ad43ebfc51dd
+SHA1 (patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_click__trackball__interactor__style.h) = 553adfd2e3a62425bd7ba7b939c72b83787bd69d
+SHA1 (patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_interactor__style__switch.h) = 0b691473b265f8c39ec76c6a38026362d5a44f97
+SHA1 (patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_manipulation__event.h) = 0021921c936b2332d6fd03e0543f02c437abfbb6
+SHA1 (patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_rectangular__frustum__selector.h) = 91768bd1293e3f3fa782a10d42f25055af9b296f
+SHA1 (patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_selected__trackball__interactor__style.h) = e22e1c04b006e61b659c0d24127bf365d84c07be
+SHA1 (patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_selection__event.h) = f15bbabac77d8ba4b34645540294bffbc7c00a99
+SHA1 (patch-apps_cloud__composer_src_cloud__view.cpp) = 05e70eaf36e158434ced6996760f4f8d46b63dc8
+SHA1 (patch-apps_cloud__composer_src_items_fpfh__item.cpp) = 780b20bbf135cee0ad2813f2da0dae1472e6e3d4
+SHA1 (patch-apps_cloud__composer_src_point__selectors_click__trackball__interactor__style.cpp) = 02df86a0e025fbbbf34b166595200848c1e70208
+SHA1 (patch-apps_cloud__composer_src_point__selectors_interactor__style__switch.cpp) = 1da7f2fa1a393215db26dd5243fae86837364305
+SHA1 (patch-apps_cloud__composer_src_point__selectors_rectangular__frustum__selector.cpp) = 8f1d441e8f776c9a4c78c9cbcf34e5ef267460cb
+SHA1 (patch-apps_cloud__composer_src_point__selectors_selected__trackball__interactor__style.cpp) = 17184ad9f55a79f11e18049a4bfc624e75e0f981
+SHA1 (patch-apps_cloud__composer_src_project__model.cpp) = 8f63cd30fe2dcbe909776dc639079eebee6af08c
+SHA1 (patch-apps_include_pcl_apps_manual__registration.h) = 4dd066eb99426bdc73e98799187c78182362da19
+SHA1 (patch-apps_include_pcl_apps_openni__passthrough.h) = 797b2446175d896ddf4c1a4cb8a61a9a20aab771
+SHA1 (patch-apps_include_pcl_apps_organized__segmentation__demo.h) = b018b71752dba847b48585e3f67de166e657d1c3
+SHA1 (patch-apps_include_pcl_apps_pcd__video__player.h) = 3e6299163fa6f16446b07589607c79ebaaf92177
+SHA1 (patch-apps_modeler_CMakeLists.txt) = 752ad0e077aeaac4cc359636501c0be2e314759b
+SHA1 (patch-apps_modeler_include_pcl_apps_modeler_render__window.h) = 9b830a198ad031afe6c0722248a0721ef7eec743
+SHA1 (patch-apps_modeler_src_cloud__mesh.cpp) = 3c3a72383c5bb2265b973f8f8bf8f75f38290f6f
+SHA1 (patch-apps_modeler_src_cloud__mesh__item.cpp) = c9657f69e2fbc9db6ce3206dcd7ae68980d72cf1
+SHA1 (patch-apps_modeler_src_render__window.cpp) = 2ff21a4b4f10d8ab8f68ed4fc4adb348c9718d38
+SHA1 (patch-apps_src_manual__registration_manual__registration.cpp) = 36e4771f52b96f79e1e66f7289bbb9a69c39294d
+SHA1 (patch-apps_src_manual__registration_manual__registration.ui) = c17626e11a456bb898ca930dd1ff970211898b96
+SHA1 (patch-apps_src_openni__octree__compression.cpp) = e9adeb0eeb6830023b899a75169db3c274130dd6
+SHA1 (patch-apps_src_openni__passthrough.cpp) = 4b2717259c8d0faa38fdc84a8fb2a8d4c87a5ffa
+SHA1 (patch-apps_src_openni__passthrough.ui) = 8d5477f12869a5251ead40f0e07d41aca2c8b197
+SHA1 (patch-apps_src_organized__segmentation__demo.cpp) = 0486ec8836c2df5fb100364a46ebad91deba6853
+SHA1 (patch-apps_src_organized__segmentation__demo.ui) = 72a5320c0b208e702576d472bc355a63b56e889f
+SHA1 (patch-apps_src_pcd__video__player_pcd__video__player.cpp) = d3e77197cd0869796c4f16b839f6140cb12933bc
+SHA1 (patch-apps_src_pcd__video__player_pcd__video__player.ui) = 9477648f1aadd81ecf485f82a3c7b9a5e5b7ffb5
+SHA1 (patch-apps_src_render__views__tesselated__sphere.cpp) = 1c8ed5fea15adbfcafae4c86abf7763ba8945dce
+SHA1 (patch-cmake_Modules_FindGLEW.cmake) = ac187a50be6ec74cbb7fbadfd42be0af5752c8d1
SHA1 (patch-cmake_Modules_FindQhull.cmake) = 466406798e1167e9dec56b62837c503c8b78a0e1
+SHA1 (patch-cmake_pcl__find__vtk.cmake) = fc7b535443c815b1ee752575974b7789335ed5d4
+SHA1 (patch-examples_keypoints_CMakeLists.txt) = a611f0dd6640e1d610f086fe457f2b12f856ad1b
+SHA1 (patch-examples_outofcore_CMakeLists.txt) = 89a2c8f97624a678c6c646fea17541ef5983085d
+SHA1 (patch-examples_segmentation_CMakeLists.txt) = 34a7f1f57998247b94098c9ce6a46e2ab6160422
+SHA1 (patch-examples_stereo_CMakeLists.txt) = 4024864f6a2b082bd4b6d6d8de5f02d0106c0cec
+SHA1 (patch-examples_surface_CMakeLists.txt) = 5883bf83df80c86a460e927dfdb6850a8cf67e68
+SHA1 (patch-gpu_kinfu__large__scale_tools_CMakeLists.txt) = 4f7d932eacc7548b2d623c8407b11f4b6fdc1cbc
+SHA1 (patch-gpu_kinfu_tools_CMakeLists.txt) = d03e945155bf8f4ae75f7a41da7d35eeaf32d479
+SHA1 (patch-gpu_people_tools_CMakeLists.txt) = 6309ea1c87aaa7b154de4a79d9cec421a0041363
+SHA1 (patch-io_CMakeLists.txt) = 80dc0d2214e1c0dccf65aa907a08d363fb74d799
+SHA1 (patch-io_src_vtk__lib__io.cpp) = fb85f01c0818449a65343df1a274b5c1927000df
+SHA1 (patch-outofcore_tools_CMakeLists.txt) = 1f3b84211e7fd0279cec30a302c363011d5d5901
+SHA1 (patch-pcl__config.h.in) = 3e939598522cf4a14d98aa3acb7fadee1985f976
+SHA1 (patch-people_CMakeLists.txt) = c7ff3006de7c0cf5aac54595e95ece5fcdcee440
+SHA1 (patch-registration_include_pcl_registration_impl_ppf__registration.hpp) = 4926e9633657192e881eea300b1cde4391868a39
+SHA1 (patch-registration_include_pcl_registration_ppf__registration.h) = 77566ee199d0a7414a9363c3fdeba265f03b331f
+SHA1 (patch-simulation_CMakeLists.txt) = 6dcae79d4e9a9e7f47192c4e1bd6c83f412f65d7
+SHA1 (patch-simulation_src_model.cpp) = 38c7d252c158719586ad4373ef7cdaaa8276bb82
+SHA1 (patch-surface_CMakeLists.txt) = 16435b2e8bfc7bcfa48305392888a0ea0b9a4df9
SHA1 (patch-surface_include_pcl_surface_convex__hull.h) = 89a05102558cc368f5e8d009a50cfd47ea3416d9
SHA1 (patch-surface_include_pcl_surface_impl_concave__hull.hpp) = 1cb2dc9b2cc7893092eb2619e65d6cc44b710fbc
SHA1 (patch-surface_include_pcl_surface_impl_convex__hull.hpp) = 73f3252aecc4133a5a01a427e2bf96d5f573bdfa
SHA1 (patch-surface_include_pcl_surface_qhull.h) = 36b5005120d001020e44035c5a6d8d8d8029a93e
+SHA1 (patch-surface_src_vtk__smoothing_vtk__utils.cpp) = 563eb42857f087f0608a3cb340fc6f21cbfc9d55
+SHA1 (patch-tools_CMakeLists.txt) = 9255322862ed45e04cc25dfcd76e5ec755347290
+SHA1 (patch-tools_mesh__sampling.cpp) = 95c8d149a636223d597b17c5de0bcc7e65f81a86
+SHA1 (patch-tools_openni__save__image.cpp) = 6aa08aa982f7738282e0efa31d5f4c0975b26e6f
+SHA1 (patch-tools_pcd__viewer.cpp) = 6273e9e81193d93f87aead898065834a06f185dd
+SHA1 (patch-tools_virtual__scanner.cpp) = 1ae0559b7fd16845d96c2963d3a28ca9149b1e56
+SHA1 (patch-visualization_CMakeLists.txt) = bb1b07cdcc7e68761df42b8a8460bae018bc7745
+SHA1 (patch-visualization_include_pcl_visualization_common_actor__map.h) = c7cf6b07eaf5501be5eb0b64c1555102f34f3274
+SHA1 (patch-visualization_include_pcl_visualization_common_ren__win__interact__map.h) = 18bc142f81062d575bffb5fc311a45b158e5162f
+SHA1 (patch-visualization_include_pcl_visualization_impl_pcl__visualizer.hpp) = 75448bb8e0fead3e0654c7ce33873c87e752cb8f
+SHA1 (patch-visualization_include_pcl_visualization_interactor__style.h) = 3cdc4f126b4d691e05b3f4c056c5d2ae0203cee4
+SHA1 (patch-visualization_include_pcl_visualization_pcl__plotter.h) = 0466ebab19ee11290c9229dda534d748ea778d17
+SHA1 (patch-visualization_include_pcl_visualization_pcl__visualizer.h) = 35574730a4867cc8e7ed145b40e4cb1e805e79f2
+SHA1 (patch-visualization_include_pcl_visualization_qvtk__compatibility.h) = 03391943cad5e7e08c651ac2114d1a4a1df81b5a
+SHA1 (patch-visualization_include_pcl_visualization_vtk.h) = 55754efed4ae82da94e293693e07036bc96033bc
+SHA1 (patch-visualization_include_pcl_visualization_vtk_pcl__vtk__compatibility.h) = f619818729c7aed7483a672d22c156e93e565112
+SHA1 (patch-visualization_src_cloud__viewer.cpp) = d4289d4d92395901ced6f9820245d1c691e77971
+SHA1 (patch-visualization_src_histogram__visualizer.cpp) = 9172ef1303e1471fed2083799624d5bfba3ceebd
+SHA1 (patch-visualization_src_interactor__style.cpp) = 56b6150345a19b5694268b5688b923379ff2f652
+SHA1 (patch-visualization_src_pcl__visualizer.cpp) = fc27c9395120bee8a6753e3467b28d7b345556ad
+SHA1 (patch-visualization_src_point__picking__event.cpp) = 391010792c722d26e3156d122ef9fd98630dc5df
Added files:
Index: pkgsrc/graphics/pcl/options.mk
diff -u /dev/null pkgsrc/graphics/pcl/options.mk:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/options.mk Fri May 7 11:36:29 2021
@@ -0,0 +1,20 @@
+# $NetBSD: options.mk,v 1.1 2021/05/07 11:36:29 thor Exp $
+PKG_OPTIONS_VAR= PKG_OPTIONS.pcl
+
+# Qt could be an option, but relies on vtk's qt support, too.
+# Maybe vtk will always include Qt and then we will bundle it
+# here, too.
+PKG_SUPPORTED_OPTIONS= vtk
+PKG_SUGGESTED_OPTIONS= vtk
+
+.include "../../mk/bsd.options.mk"
+
+PLIST_VARS+= vtk
+.if !empty(PKG_OPTIONS:Mvtk)
+CMAKE_ARGS+= -DWITH_VTK=TRUE
+PLIST.vtk= yes
+.include "../../graphics/vtk/buildlink3.mk"
+.include "../../graphics/glew/buildlink3.mk"
+.else
+CMAKE_ARGS+= -DWITH_VTK=FALSE
+.endif
Index: pkgsrc/graphics/pcl/patches/patch-2d_CMakeLists.txt
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-2d_CMakeLists.txt:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-2d_CMakeLists.txt Fri May 7 11:36:29 2021
@@ -0,0 +1,15 @@
+$NetBSD: patch-2d_CMakeLists.txt,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- 2d/CMakeLists.txt.orig 2020-08-14 12:23:03.000000000 +0000
++++ 2d/CMakeLists.txt
+@@ -31,8 +31,6 @@ set(impl_incs
+ )
+
+ if(${VTK_FOUND})
+- set(VTK_USE_FILE "${VTK_USE_FILE}" CACHE INTERNAL "VTK_USE_FILE")
+- include("${VTK_USE_FILE}")
+ set(VTK_IO_TARGET_LINK_LIBRARIES vtkCommon vtkWidgets vtkIO vtkImaging)
+ endif()
+
Index: pkgsrc/graphics/pcl/patches/patch-CMakeLists.txt
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-CMakeLists.txt:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-CMakeLists.txt Fri May 7 11:36:29 2021
@@ -0,0 +1,101 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- CMakeLists.txt.orig 2020-08-14 12:23:03.000000000 +0000
++++ CMakeLists.txt
+@@ -30,7 +30,7 @@ project(PCL VERSION 1.11.1)
+ string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
+
+ ### ---[ Find universal dependencies
+-set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/" ${CMAKE_MODULE_PATH})
++set (CMAKE_MODULE_PATH "/data/pkgwork/graphics/pcl/work/.buildlink/cmake-Modules" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/" ${CMAKE_MODULE_PATH})
+
+ # ---[ Include pkgconfig
+ include(FindPkgConfig)
+@@ -366,81 +366,15 @@ endif()
+ option(WITH_QT "Build QT Front-End" TRUE)
+ if(WITH_QT)
+ find_package(Qt5 COMPONENTS Concurrent OpenGL Widgets QUIET)
++ if(Qt5_FOUND)
++ message(STATUS "Found Qt5 version: ${Qt5_VERSION}")
++ endif()
+ endif()
+
+ # Find VTK
+ option(WITH_VTK "Build VTK-Visualizations" TRUE)
+ if(WITH_VTK AND NOT ANDROID)
+- set(PCL_VTK_COMPONENTS
+- vtkChartsCore
+- vtkCommonCore
+- vtkCommonDataModel
+- vtkCommonExecutionModel
+- vtkFiltersCore
+- vtkFiltersExtraction
+- vtkFiltersModeling
+- vtkImagingCore
+- vtkImagingSources
+- vtkInteractionStyle
+- vtkInteractionWidgets
+- vtkIOCore
+- vtkIOGeometry
+- vtkIOImage
+- vtkIOLegacy
+- vtkIOPLY
+- vtkRenderingAnnotation
+- vtkRenderingLOD
+- vtkViewsContext2D
+- )
+- find_package(VTK COMPONENTS ${PCL_VTK_COMPONENTS})
+- if(VTK_FOUND AND ("${VTK_VERSION}" VERSION_LESS 6.2))
+- message(WARNING "The minimum required version of VTK is 6.2, but found ${VTK_VERSION}")
+- set(VTK_FOUND FALSE)
+- endif()
+-
+- if(VTK_FOUND)
+- if(NOT DEFINED VTK_RENDERING_BACKEND)
+- # On old VTK versions this variable does not exist. In this case it is
+- # safe to assume OpenGL backend
+- set(VTK_RENDERING_BACKEND "OpenGL")
+- endif()
+- list(APPEND PCL_VTK_COMPONENTS vtkRenderingContext${VTK_RENDERING_BACKEND})
+-
+- if(WITH_QT)
+- if(";${VTK_MODULES_ENABLED};" MATCHES ";vtkGUISupportQt;" AND ";${VTK_MODULES_ENABLED};" MATCHES ";vtkRenderingQt;")
+- set(QVTK_FOUND ON)
+- list(APPEND PCL_VTK_COMPONENTS vtkRenderingQt vtkGUISupportQt)
+- else()
+- unset(QVTK_FOUND)
+- endif()
+- endif()
+-
+- find_package(VTK COMPONENTS ${PCL_VTK_COMPONENTS})
+-
+- message(STATUS "VTK_MAJOR_VERSION ${VTK_MAJOR_VERSION}, rendering backend: ${VTK_RENDERING_BACKEND}")
+- if(PCL_SHARED_LIBS OR (NOT (PCL_SHARED_LIBS) AND NOT (VTK_BUILD_SHARED_LIBS)))
+- if(VTK_USE_FILE)
+- include(${VTK_USE_FILE})
+- endif()
+- message(STATUS "VTK found (include: ${VTK_INCLUDE_DIRS}, libs: ${VTK_LIBRARIES}")
+- if(APPLE)
+- option(VTK_USE_COCOA "Use Cocoa for VTK render windows" ON)
+- mark_as_advanced(VTK_USE_COCOA)
+- endif()
+- if(${VTK_RENDERING_BACKEND} STREQUAL "OpenGL")
+- set(VTK_RENDERING_BACKEND_OPENGL_VERSION "1")
+- message(DEPRECATION "The rendering backend OpenGL is deprecated and not available anymore since VTK 8.2."
+- "Please switch to the OpenGL2 backend instead, which is available since VTK 6.2."
+- "Support of the deprecated backend will be dropped with PCL 1.13.")
+- elseif(${VTK_RENDERING_BACKEND} STREQUAL "OpenGL2")
+- set(VTK_RENDERING_BACKEND_OPENGL_VERSION "2")
+- endif()
+- else()
+- set(VTK_FOUND OFF)
+- message("Warning: You are to build PCL in STATIC but VTK is SHARED!")
+- message("Warning: VTK disabled!")
+- endif()
+- endif()
++ include("${PCL_SOURCE_DIR}/cmake/pcl_find_vtk.cmake")
+ else()
+ set(VTK_FOUND OFF)
+ endif()
Index: pkgsrc/graphics/pcl/patches/patch-apps_3d__rec__framework_CMakeLists.txt
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_3d__rec__framework_CMakeLists.txt:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_3d__rec__framework_CMakeLists.txt Fri May 7 11:36:29 2021
@@ -0,0 +1,14 @@
+$NetBSD: patch-apps_3d__rec__framework_CMakeLists.txt,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/3d_rec_framework/CMakeLists.txt.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/3d_rec_framework/CMakeLists.txt
+@@ -9,7 +9,6 @@ if(NOT VTK_FOUND)
+ else()
+ set(DEFAULT TRUE)
+ set(REASON)
+- include("${VTK_USE_FILE}")
+ endif()
+
+ # OpenNI found?
Index: pkgsrc/graphics/pcl/patches/patch-apps_3d__rec__framework_include_pcl_apps_3d__rec__framework_utils_vtk__model__sampling.h
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_3d__rec__framework_include_pcl_apps_3d__rec__framework_utils_vtk__model__sampling.h:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_3d__rec__framework_include_pcl_apps_3d__rec__framework_utils_vtk__model__sampling.h Fri May 7 11:36:29 2021
@@ -0,0 +1,35 @@
+$NetBSD: patch-apps_3d__rec__framework_include_pcl_apps_3d__rec__framework_utils_vtk__model__sampling.h,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/utils/vtk_model_sampling.h.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/utils/vtk_model_sampling.h
+@@ -9,6 +9,8 @@
+
+ #include <pcl/common/common.h>
+
++#include <pcl/visualization/vtk/pcl_vtk_compatibility.h>
++
+ #include <vtkCellArray.h>
+ #include <vtkPLYReader.h>
+ #include <vtkPolyData.h>
+@@ -74,7 +76,7 @@ randPSurface(vtkPolyData* polydata,
+
+ double A[3], B[3], C[3];
+ vtkIdType npts = 0;
+- vtkIdType* ptIds = nullptr;
++ vtkCellPtsPtr ptIds = nullptr;
+ polydata->GetCellPoints(el, npts, ptIds);
+
+ if (ptIds == nullptr)
+@@ -98,7 +100,9 @@ uniform_sampling(const vtkSmartPointer<v
+ double p1[3], p2[3], p3[3], totalArea = 0;
+ std::vector<double> cumulativeAreas(cells->GetNumberOfCells(), 0);
+ std::size_t i = 0;
+- vtkIdType npts = 0, *ptIds = nullptr;
++ vtkIdType npts = 0;
++ vtkCellPtsPtr ptIds = nullptr;
++
+ for (cells->InitTraversal(); cells->GetNextCell(npts, ptIds); i++) {
+ polydata->GetPoint(ptIds[0], p1);
+ polydata->GetPoint(ptIds[1], p2);
Index: pkgsrc/graphics/pcl/patches/patch-apps_CMakeLists.txt
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_CMakeLists.txt:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_CMakeLists.txt Fri May 7 11:36:29 2021
@@ -0,0 +1,92 @@
+$NetBSD: patch-apps_CMakeLists.txt,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/CMakeLists.txt.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/CMakeLists.txt
+@@ -34,8 +34,6 @@ if(LIBUSB_1_FOUND)
+ endif()
+
+ if(VTK_FOUND)
+- include("${VTK_USE_FILE}")
+-
+ set(incs "include/pcl/${SUBSYS_NAME}/render_views_tesselated_sphere.h")
+ set(srcs "src/render_views_tesselated_sphere.cpp")
+
+@@ -60,6 +58,10 @@ if(VTK_FOUND)
+ if(QHULL_FOUND)
+ PCL_ADD_EXECUTABLE(pcl_pcd_select_object_plane COMPONENT ${SUBSYS_NAME} SOURCES src/pcd_select_object_plane.cpp)
+ target_link_libraries(pcl_pcd_select_object_plane pcl_common pcl_io pcl_filters pcl_visualization pcl_segmentation pcl_features pcl_surface)
++ #TODO: Update when CMAKE 3.10 is available
++ if(NOT (${VTK_VERSION} VERSION_LESS 9.0))
++ target_link_libraries(pcl_pcd_select_object_plane VTK::FiltersGeometry)
++ endif()
+ endif()
+
+ PCL_ADD_EXECUTABLE(pcl_pcd_organized_edge_detection COMPONENT ${SUBSYS_NAME} SOURCES src/pcd_organized_edge_detection.cpp)
+@@ -74,17 +76,25 @@ if(VTK_FOUND)
+ PCL_ADD_EXECUTABLE(pcl_stereo_ground_segmentation COMPONENT ${SUBSYS_NAME} SOURCES src/stereo_ground_segmentation.cpp)
+ target_link_libraries(pcl_stereo_ground_segmentation pcl_common pcl_io pcl_filters pcl_visualization pcl_segmentation pcl_features pcl_stereo)
+
+- if(Qt5_FOUND AND QVTK_FOUND)
++ if(Qt5_FOUND AND HAVE_QVTK)
+ # Manual registration demo
+ QT5_WRAP_UI(manual_registration_ui src/manual_registration/manual_registration.ui)
+ QT5_WRAP_CPP(manual_registration_moc include/pcl/apps/manual_registration.h OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+ PCL_ADD_EXECUTABLE(pcl_manual_registration COMPONENT ${SUBSYS_NAME} SOURCES ${manual_registration_ui} ${manual_registration_moc} src/manual_registration/manual_registration.cpp BUNDLE)
+ target_link_libraries(pcl_manual_registration pcl_common pcl_io pcl_visualization pcl_segmentation pcl_features pcl_surface Qt5::Widgets)
++ #TODO: Update when CMAKE 3.10 is available
++ if(NOT (${VTK_VERSION} VERSION_LESS 9.0))
++ target_link_libraries(pcl_manual_registration VTK::GUISupportQt)
++ endif()
+
+ QT5_WRAP_UI(pcd_video_player_ui src/pcd_video_player/pcd_video_player.ui)
+ QT5_WRAP_CPP(pcd_video_player_moc include/pcl/apps/pcd_video_player.h OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+ PCL_ADD_EXECUTABLE(pcl_pcd_video_player COMPONENT ${SUBSYS_NAME} SOURCES ${pcd_video_player_ui} ${pcd_video_player_moc} src/pcd_video_player/pcd_video_player.cpp BUNDLE)
+ target_link_libraries(pcl_pcd_video_player pcl_common pcl_io pcl_visualization pcl_segmentation pcl_features pcl_surface Qt5::Widgets)
++ #TODO: Update when CMAKE 3.10 is available
++ if(NOT (${VTK_VERSION} VERSION_LESS 9.0))
++ target_link_libraries(pcl_pcd_video_player VTK::GUISupportQt)
++ endif()
+ endif()
+
+ if(WITH_OPENNI)
+@@ -138,18 +148,26 @@ if(VTK_FOUND)
+ PCL_ADD_EXECUTABLE(pcl_openni_face_detector COMPONENT ${SUBSYS_NAME} SOURCES src/face_detection//openni_face_detection.cpp src/face_detection//openni_frame_source.cpp BUNDLE)
+ target_link_libraries(pcl_openni_face_detector pcl_features pcl_recognition pcl_common pcl_io pcl_filters pcl_visualization pcl_segmentation pcl_sample_consensus pcl_surface pcl_keypoints
pcl_ml pcl_search pcl_kdtree ${VTK_LIBRARIES})
+
+- if(Qt5_FOUND AND QVTK_FOUND)
+- # OpenNI Passthrough application demo
+- QT5_WRAP_UI(openni_passthrough_ui src/openni_passthrough.ui)
+- QT5_WRAP_CPP(openni_passthrough_moc include/pcl/apps/openni_passthrough.h OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+- PCL_ADD_EXECUTABLE(pcl_openni_passthrough COMPONENT ${SUBSYS_NAME} SOURCES ${openni_passthrough_ui} ${openni_passthrough_moc} src/openni_passthrough.cpp)
+- target_link_libraries(pcl_openni_passthrough pcl_common pcl_io pcl_filters pcl_visualization Qt5::Widgets)
+-
+- # OpenNI Organized Connected Component application demo
+- QT5_WRAP_UI(organized_segmentation_demo_ui src/organized_segmentation_demo.ui)
+- QT5_WRAP_CPP(organized_segmentation_demo_moc include/pcl/apps/organized_segmentation_demo.h OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+- PCL_ADD_EXECUTABLE(pcl_organized_segmentation_demo COMPONENT ${SUBSYS_NAME} SOURCES ${organized_segmentation_demo_ui} ${organized_segmentation_demo_moc} src/organized_segmentation_demo.cpp
BUNDLE)
+- target_link_libraries(pcl_organized_segmentation_demo pcl_common pcl_io pcl_visualization pcl_segmentation pcl_features pcl_surface Qt5::Widgets)
++ if(Qt5_FOUND AND HAVE_QVTK)
++ # OpenNI Passthrough application demo
++ QT5_WRAP_UI(openni_passthrough_ui src/openni_passthrough.ui)
++ QT5_WRAP_CPP(openni_passthrough_moc include/pcl/apps/openni_passthrough.h OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
++ PCL_ADD_EXECUTABLE(pcl_openni_passthrough COMPONENT ${SUBSYS_NAME} SOURCES ${openni_passthrough_ui} ${openni_passthrough_moc} src/openni_passthrough.cpp)
++ target_link_libraries(pcl_openni_passthrough pcl_common pcl_io pcl_filters pcl_visualization Qt5::Widgets)
++ #TODO: Update when CMAKE 3.10 is available
++ if(NOT (${VTK_VERSION} VERSION_LESS 9.0))
++ target_link_libraries(pcl_openni_passthrough VTK::GUISupportQt)
++ endif()
++
++ # OpenNI Organized Connected Component application demo
++ QT5_WRAP_UI(organized_segmentation_demo_ui src/organized_segmentation_demo.ui)
++ QT5_WRAP_CPP(organized_segmentation_demo_moc include/pcl/apps/organized_segmentation_demo.h OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
++ PCL_ADD_EXECUTABLE(pcl_organized_segmentation_demo COMPONENT ${SUBSYS_NAME} SOURCES ${organized_segmentation_demo_ui} ${organized_segmentation_demo_moc} src/organized_segmentation_demo.cpp
BUNDLE)
++ target_link_libraries(pcl_organized_segmentation_demo pcl_common pcl_io pcl_visualization pcl_segmentation pcl_features pcl_surface Qt5::Widgets)
++ #TODO: Update when CMAKE 3.10 is available
++ if(NOT (${VTK_VERSION} VERSION_LESS 9.0))
++ target_link_libraries(pcl_organized_segmentation_demo VTK::GUISupportQt)
++ endif()
+ endif()
+
+ if(QHULL_FOUND)
Index: pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_CMakeLists.txt
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_CMakeLists.txt:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_CMakeLists.txt Fri May 7 11:36:29 2021
@@ -0,0 +1,48 @@
+$NetBSD: patch-apps_cloud__composer_CMakeLists.txt,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/cloud_composer/CMakeLists.txt.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/cloud_composer/CMakeLists.txt
+@@ -14,7 +14,6 @@ if(NOT VTK_FOUND)
+ else()
+ set(DEFAULT TRUE)
+ set(REASON)
+- include("${VTK_USE_FILE}")
+ endif()
+
+ # QT5 Found?
+@@ -27,7 +26,7 @@ elseif(NOT ${DEFAULT} STREQUAL "AUTO_OFF
+ endif()
+
+ # QVTK?
+-if(NOT QVTK_FOUND)
++if(NOT HAVE_QVTK)
+ set(DEFAULT AUTO_OFF)
+ set(REASON "Cloud composer requires QVTK")
+ elseif(NOT ${DEFAULT} STREQUAL "AUTO_OFF")
+@@ -41,7 +40,7 @@ if("${DEFAULT}" STREQUAL "TRUE")
+ endif()
+
+ PCL_SUBSUBSYS_OPTION(build "${SUBSYS_NAME}" "${SUBSUBSYS_NAME}" "${SUBSUBSYS_DESC}" ${DEFAULT} "${REASON}")
+-PCL_SUBSUBSYS_DEPEND(build "${SUBSYS_NAME}" "${SUBSUBSYS_NAME}" DEPS ${SUBSUBSYS_DEPS})
++PCL_SUBSUBSYS_DEPEND(build "${SUBSYS_NAME}" "${SUBSUBSYS_NAME}" DEPS ${SUBSUBSYS_DEPS} EXT_DEPS vtk)
+
+ PCL_ADD_DOC(${SUBSUBSYS_NAME})
+
+@@ -92,7 +91,14 @@ set(PCL_LIB_TYPE_ORIGIN ${PCL_LIB_TYPE})
+ set(PCL_LIB_TYPE STATIC)
+ QT5_WRAP_CPP(INTERFACE_HEADERS_MOC ${INTERFACE_HEADERS} OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+ PCL_ADD_LIBRARY(pcl_cc_tool_interface COMPONENT ${SUBSUBSYS_NAME} SOURCES ${INTERFACE_HEADERS} ${INTERFACE_SOURCES} ${INTERFACE_HEADERS_MOC})
+-target_link_libraries(pcl_cc_tool_interface pcl_common pcl_filters pcl_search pcl_visualization ${VTK_LIBRARIES} Qt5::Widgets)
++
++set(vtk_libs ${VTK_LIBRARIES})
++#TODO: Update when CMAKE 3.10 is available
++if (NOT (${VTK_VERSION} VERSION_LESS 9.0))
++ set(vtk_libs VTK::GUISupportQt)
++endif()
++target_link_libraries(pcl_cc_tool_interface pcl_common pcl_filters pcl_search pcl_visualization Qt5::Widgets ${vtk_libs})
++
+ set(PCL_LIB_TYPE ${PCL_LIB_TYPE_ORIGIN})
+
+ if(APPLE)
Index: pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_cloud__view.h
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_cloud__view.h:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_cloud__view.h Fri May 7 11:36:29 2021
@@ -0,0 +1,48 @@
+$NetBSD: patch-apps_cloud__composer_include_pcl_apps_cloud__composer_cloud__view.h,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/cloud_composer/include/pcl/apps/cloud_composer/cloud_view.h.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/cloud_composer/include/pcl/apps/cloud_composer/cloud_view.h
+@@ -42,8 +42,15 @@
+ #include <vtkEventQtSlotConnect.h>
+
+ #include <pcl/visualization/pcl_visualizer.h>
++#include <pcl/visualization/qvtk_compatibility.h>
+ #include <pcl/apps/cloud_composer/point_selectors/interactor_style_switch.h>
+
++
++#include <vtkSmartPointer.h>
++#include <vtkOrientationMarkerWidget.h>
++#include <vtkAxesActor.h>
++#include <vtkVersion.h>
++
+ class QItemSelection;
+ class QStandardItem;
+
+@@ -67,11 +74,12 @@ namespace pcl
+
+ void
+ setModel (ProjectModel* new_model);
++
+ ProjectModel*
+ getModel () const { return model_; }
+
+- QVTKWidget*
+- getQVTK() const {return qvtk_; }
++ PCLQVTKWidget*
++ getQVTK() const { return qvtk_; }
+
+ pcl::visualization::PCLVisualizer::Ptr
+ getPCLVisualizer () const { return vis_; }
+@@ -141,7 +149,9 @@ namespace pcl
+
+ pcl::visualization::PCLVisualizer::Ptr vis_;
+ ProjectModel* model_;
+- QVTKWidget* qvtk_;
++
++ PCLQVTKWidget* qvtk_;
++
+ vtkSmartPointer<InteractorStyleSwitch> style_switch_;
+
+ vtkSmartPointer<vtkOrientationMarkerWidget> axes_widget_;
Index: pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_items_cloud__item.h
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_items_cloud__item.h:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_items_cloud__item.h Fri May 7 11:36:29 2021
@@ -0,0 +1,25 @@
+$NetBSD: patch-apps_cloud__composer_include_pcl_apps_cloud__composer_items_cloud__item.h,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/cloud_composer/include/pcl/apps/cloud_composer/items/cloud_item.h.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/cloud_composer/include/pcl/apps/cloud_composer/items/cloud_item.h
+@@ -40,10 +40,17 @@
+ #include <QDebug>
+
+ #include <pcl/apps/cloud_composer/items/cloud_composer_item.h>
++
++#include <pcl/point_types.h>
++#include <pcl/point_cloud.h>
++#include <pcl/PCLPointCloud2.h>
+ #include <pcl/memory.h>
+ #include <pcl/pcl_macros.h>
+-#include <pcl/visualization/pcl_visualizer.h>
+ #include <pcl/search/kdtree.h>
++#include <pcl/visualization/point_cloud_geometry_handlers.h>
++#include <pcl/visualization/point_cloud_color_handlers.h>
++#include <pcl/visualization/pcl_visualizer.h>
++
+
+ //Typedefs to make things sane
+ using GeometryHandler = pcl::visualization::PointCloudGeometryHandler<pcl::PCLPointCloud2>;
Index: pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_items_fpfh__item.h
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_items_fpfh__item.h:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_items_fpfh__item.h Fri May 7 11:36:29 2021
@@ -0,0 +1,27 @@
+$NetBSD: patch-apps_cloud__composer_include_pcl_apps_cloud__composer_items_fpfh__item.h,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/cloud_composer/include/pcl/apps/cloud_composer/items/fpfh_item.h.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/cloud_composer/include/pcl/apps/cloud_composer/items/fpfh_item.h
+@@ -41,10 +41,9 @@
+ #include <pcl/features/fpfh.h>
+
+ #include <pcl/apps/cloud_composer/items/cloud_composer_item.h>
++#include <pcl/visualization/qvtk_compatibility.h>
+ #include <pcl/visualization/pcl_plotter.h>
+
+-class QVTKWidget;
+-
+ namespace pcl
+ {
+ namespace cloud_composer
+@@ -74,7 +73,7 @@ namespace pcl
+ pcl::PointCloud<pcl::FPFHSignature33>::Ptr fpfh_ptr_;
+ double radius_;
+ pcl::visualization::PCLPlotter::Ptr plot_;
+- QVTKWidget *qvtk_;
++ PCLQVTKWidget* qvtk_;
+ QWidget *hist_page_;
+ };
+
Index: pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_click__trackball__interactor__style.h
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_click__trackball__interactor__style.h:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_click__trackball__interactor__style.h Fri May 7 11:36:29 2021
@@ -0,0 +1,15 @@
+$NetBSD: patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_click__trackball__interactor__style.h,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/cloud_composer/include/pcl/apps/cloud_composer/point_selectors/click_trackball_interactor_style.h.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/cloud_composer/include/pcl/apps/cloud_composer/point_selectors/click_trackball_interactor_style.h
+@@ -39,6 +39,8 @@
+
+ #include <pcl/apps/cloud_composer/point_selectors/interactor_style_switch.h>
+
++#include <vtkInteractorStyleTrackballActor.h>
++
+ namespace pcl
+ {
+ namespace cloud_composer
Index: pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_interactor__style__switch.h
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_interactor__style__switch.h:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_interactor__style__switch.h Fri May 7 11:36:29 2021
@@ -0,0 +1,27 @@
+$NetBSD: patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_interactor__style__switch.h,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/cloud_composer/include/pcl/apps/cloud_composer/point_selectors/interactor_style_switch.h.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/cloud_composer/include/pcl/apps/cloud_composer/point_selectors/interactor_style_switch.h
+@@ -39,12 +39,19 @@
+
+ #include <QMap>
+
+-#include <pcl/visualization/vtk.h>
+ #include <pcl/visualization/interactor_style.h>
+ #include <pcl/visualization/common/actor_map.h>
+ #include <pcl/visualization/common/ren_win_interact_map.h>
+ #include <pcl/visualization/pcl_visualizer.h>
+
++#include <vtkSmartPointer.h>
++#include <vtkAreaPicker.h>
++#include <vtkPointPicker.h>
++#include <vtkRenderWindowInteractor.h>
++#include <vtkCommand.h>
++#include <vtkRendererCollection.h>
++#include <vtkInteractorStyle.h>
++
+ class QVTKWidget;
+
+ namespace pcl
Index: pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_manipulation__event.h
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_manipulation__event.h:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_manipulation__event.h Fri May 7 11:36:29 2021
@@ -0,0 +1,14 @@
+$NetBSD: patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_manipulation__event.h,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/cloud_composer/include/pcl/apps/cloud_composer/point_selectors/manipulation_event.h.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/cloud_composer/include/pcl/apps/cloud_composer/point_selectors/manipulation_event.h
+@@ -37,7 +37,6 @@
+
+ #pragma once
+
+-#include <pcl/visualization/vtk.h>
+ #include <pcl/apps/cloud_composer/items/cloud_item.h>
+
+ namespace pcl
Index: pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_rectangular__frustum__selector.h
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_rectangular__frustum__selector.h:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_rectangular__frustum__selector.h Fri May 7 11:36:29 2021
@@ -0,0 +1,17 @@
+$NetBSD: patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_rectangular__frustum__selector.h,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/cloud_composer/include/pcl/apps/cloud_composer/point_selectors/rectangular_frustum_selector.h.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/cloud_composer/include/pcl/apps/cloud_composer/point_selectors/rectangular_frustum_selector.h
+@@ -39,6 +39,10 @@
+
+ #include <pcl/apps/cloud_composer/point_selectors/interactor_style_switch.h>
+
++#include <vtkSmartPointer.h>
++#include <vtkRendererCollection.h>
++#include <vtkInteractorStyleRubberBandPick.h>
++
+ namespace pcl
+ {
+ namespace cloud_composer
Index: pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_selected__trackball__interactor__style.h
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_selected__trackball__interactor__style.h:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_selected__trackball__interactor__style.h Fri May 7 11:36:29 2021
@@ -0,0 +1,17 @@
+$NetBSD: patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_selected__trackball__interactor__style.h,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/cloud_composer/include/pcl/apps/cloud_composer/point_selectors/selected_trackball_interactor_style.h.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/cloud_composer/include/pcl/apps/cloud_composer/point_selectors/selected_trackball_interactor_style.h
+@@ -37,6 +37,10 @@
+
+ #include <pcl/apps/cloud_composer/point_selectors/interactor_style_switch.h>
+
++#include <vtkInteractorStyleTrackballActor.h>
++#include <vtkSmartPointer.h>
++#include <vtkMatrix4x4.h>
++
+ namespace pcl
+ {
+ namespace cloud_composer
Index: pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_selection__event.h
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_selection__event.h:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_selection__event.h Fri May 7 11:36:29 2021
@@ -0,0 +1,22 @@
+$NetBSD: patch-apps_cloud__composer_include_pcl_apps_cloud__composer_point__selectors_selection__event.h,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/cloud_composer/include/pcl/apps/cloud_composer/point_selectors/selection_event.h.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/cloud_composer/include/pcl/apps/cloud_composer/point_selectors/selection_event.h
+@@ -37,9 +37,14 @@
+
+ #pragma once
+
+-#include <pcl/visualization/vtk.h>
+ #include <pcl/apps/cloud_composer/items/cloud_item.h>
+
++#include <vtkSmartPointer.h>
++#include <vtkPolyData.h>
++#include <vtkActor.h>
++#include <vtkDataSetMapper.h>
++#include <vtkRenderer.h>
++
+ namespace pcl
+ {
+ namespace cloud_composer
Index: pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_src_cloud__view.cpp
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_src_cloud__view.cpp:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_src_cloud__view.cpp Fri May 7 11:36:29 2021
@@ -0,0 +1,190 @@
+$NetBSD: patch-apps_cloud__composer_src_cloud__view.cpp,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/cloud_composer/src/cloud_view.cpp.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/cloud_composer/src/cloud_view.cpp
+@@ -5,20 +5,29 @@
+ #include <pcl/apps/cloud_composer/point_selectors/selection_event.h>
+ #include <pcl/apps/cloud_composer/point_selectors/manipulation_event.h>
+
++#include <vtkGenericOpenGLRenderWindow.h>
++
+ #include <QDebug>
+
+-#include <QVTKWidget.h>
+
+ pcl::cloud_composer::CloudView::CloudView (QWidget* parent)
+ : QWidget (parent)
+ {
+- vis_.reset (new pcl::visualization::PCLVisualizer ("", false));
+- vis_->getInteractorStyle ()->setKeyboardModifier (pcl::visualization::INTERACTOR_KB_MOD_SHIFT);
++ qvtk_ = new PCLQVTKWidget(this);
+ //Create the QVTKWidget
+- qvtk_ = new QVTKWidget (this);
+- qvtk_->SetRenderWindow (vis_->getRenderWindow ());
++#if VTK_MAJOR_VERSION > 8
++ auto renderer = vtkSmartPointer<vtkRenderer>::New();
++ auto renderWindow = vtkSmartPointer<vtkGenericOpenGLRenderWindow>::New();
++ renderWindow->AddRenderer(renderer);
++ vis_.reset(new pcl::visualization::PCLVisualizer(renderer, renderWindow, "", false));
++#else
++ vis_.reset(new pcl::visualization::PCLVisualizer("", false));
++#endif // VTK_MAJOR_VERSION > 8
++ setRenderWindowCompat(*qvtk_, *(vis_->getRenderWindow()));
++ vis_->setupInteractor(getInteractorCompat(*qvtk_), getRenderWindowCompat(*qvtk_), style_switch_);
++ vis_->getInteractorStyle()->setKeyboardModifier(pcl::visualization::INTERACTOR_KB_MOD_SHIFT);
++
+ initializeInteractorSwitch ();
+- vis_->setupInteractor (qvtk_->GetInteractor (), qvtk_->GetRenderWindow (), style_switch_);
+
+ QGridLayout *mainLayout = new QGridLayout (this);
+ mainLayout-> addWidget (qvtk_,0,0);
+@@ -28,13 +37,22 @@ pcl::cloud_composer::CloudView::CloudVie
+ : QWidget (parent)
+ {
+ model_ = model;
+- vis_.reset (new pcl::visualization::PCLVisualizer ("", false));
+- // vis_->getInteractorStyle ()->setKeyboardModifier (pcl::visualization::INTERACTOR_KB_MOD_SHIFT);
++
++ qvtk_ = new PCLQVTKWidget(this);
+ //Create the QVTKWidget
+- qvtk_ = new QVTKWidget (this);
+- qvtk_->SetRenderWindow (vis_->getRenderWindow ());
++#if VTK_MAJOR_VERSION > 8
++ auto renderer = vtkSmartPointer<vtkRenderer>::New();
++ auto renderWindow = vtkSmartPointer<vtkGenericOpenGLRenderWindow>::New();
++ renderWindow->AddRenderer(renderer);
++ vis_.reset(new pcl::visualization::PCLVisualizer(renderer, renderWindow, "", false));
++#else
++ vis_.reset(new pcl::visualization::PCLVisualizer("", false));
++#endif // VTK_MAJOR_VERSION > 8
++ setRenderWindowCompat(*qvtk_, *(vis_->getRenderWindow()));
++ vis_->setupInteractor(getInteractorCompat(*qvtk_), getRenderWindowCompat(*qvtk_), style_switch_);
++ //vis_->getInteractorStyle()->setKeyboardModifier(pcl::visualization::INTERACTOR_KB_MOD_SHIFT);
++
+ initializeInteractorSwitch ();
+- vis_->setupInteractor (qvtk_->GetInteractor (), qvtk_->GetRenderWindow (), style_switch_);
+ setModel(model);
+
+ QGridLayout *mainLayout = new QGridLayout (this);
+@@ -57,9 +75,9 @@ pcl::cloud_composer::CloudView::setModel
+ connectSignalsAndSlots();
+ //Refresh the view
+ qvtk_->show();
+- qvtk_->update ();
++ refresh();
+
+- // vis_->addOrientationMarkerWidgetAxes (qvtk_->GetInteractor ());
++ // vis_->addOrientationMarkerWidgetAxes (getInteractorCompat(qvtk_));
+ }
+
+ void
+@@ -76,7 +94,11 @@ pcl::cloud_composer::CloudView::connectS
+ void
+ pcl::cloud_composer::CloudView::refresh ()
+ {
++#if VTK_MAJOR_VERSION > 8
++ qvtk_->renderWindow()->Render();
++#else
+ qvtk_->update ();
++#endif // VTK_MAJOR_VERSION > 8
+ }
+
+ void
+@@ -88,7 +110,7 @@ pcl::cloud_composer::CloudView::itemChan
+ {
+ item->paintView (vis_);
+ }
+- qvtk_->update ();
++ refresh();
+ }
+
+
+@@ -115,8 +137,7 @@ pcl::cloud_composer::CloudView::rowsInse
+ rowsInserted(new_item->index(),0,new_item->rowCount ()-1);
+ }
+
+- qvtk_->update ();
+-
++ refresh();
+ }
+
+ void
+@@ -143,20 +164,20 @@ pcl::cloud_composer::CloudView::rowsAbou
+ if (item_to_remove->rowCount () > 0)
+ rowsAboutToBeRemoved(item_to_remove->index(),0,item_to_remove->rowCount ()-1);
+ }
+- qvtk_->update ();
++ refresh();
+ }
+
+
+ void
+ pcl::cloud_composer::CloudView::paintEvent (QPaintEvent*)
+ {
+- qvtk_->update ();
++ refresh();
+ }
+
+ void
+ pcl::cloud_composer::CloudView::resizeEvent (QResizeEvent*)
+ {
+- qvtk_->update ();
++ refresh();
+ }
+
+ void
+@@ -186,7 +207,7 @@ pcl::cloud_composer::CloudView::selected
+ }
+ }
+ }
+- qvtk_->update ();
++ refresh();
+ }
+
+ void
+@@ -204,14 +225,14 @@ pcl::cloud_composer::CloudView::setAxisV
+ if (visible)
+ {
+ qDebug () << "Adding coordinate system!";
+- vis_->addOrientationMarkerWidgetAxes ( qvtk_->GetInteractor() );
++ vis_->addOrientationMarkerWidgetAxes(getInteractorCompat(*qvtk_));
+ }
+ else
+ {
+ vis_->removeOrientationMarkerWidgetAxes ();
+ }
+
+- qvtk_->update ();
++ refresh();
+ }
+
+ void
+@@ -224,7 +245,7 @@ pcl::cloud_composer::CloudView::addOrien
+ axes_widget_ = vtkSmartPointer<vtkOrientationMarkerWidget>::New ();
+ axes_widget_->SetOutlineColor ( 0.9300, 0.5700, 0.1300 );
+ axes_widget_->SetOrientationMarker( axes );
+- axes_widget_->SetInteractor( qvtk_->GetInteractor () );
++ axes_widget_->SetInteractor(getInteractorCompat(*qvtk_));
+ axes_widget_->SetViewport( 0.0, 0.0, 0.4, 0.4 );
+ axes_widget_->SetEnabled( 1 );
+ axes_widget_->InteractiveOn();
+@@ -244,8 +265,6 @@ pcl::cloud_composer::CloudView::removeOr
+ {
+ axes_widget_->SetEnabled (false);
+ }
+-
+-
+ }
+
+ //////// Interactor Functions
+@@ -255,7 +274,7 @@ pcl::cloud_composer::CloudView::initiali
+ {
+ style_switch_ = vtkSmartPointer<InteractorStyleSwitch>::New();
+ style_switch_->initializeInteractorStyles (vis_, model_);
+- style_switch_->SetInteractor (qvtk_->GetInteractor ());
++ style_switch_->SetInteractor(getInteractorCompat(*qvtk_));
+ style_switch_->setCurrentInteractorStyle (interactor_styles::PCL_VISUALIZER);
+
+ //Connect the events!
Index: pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_src_items_fpfh__item.cpp
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_src_items_fpfh__item.cpp:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_src_items_fpfh__item.cpp Fri May 7 11:36:29 2021
@@ -0,0 +1,43 @@
+$NetBSD: patch-apps_cloud__composer_src_items_fpfh__item.cpp,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/cloud_composer/src/items/fpfh_item.cpp.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/cloud_composer/src/items/fpfh_item.cpp
+@@ -3,8 +3,6 @@
+
+ #include <QGridLayout>
+
+-#include <QVTKWidget.h>
+-
+ pcl::cloud_composer::FPFHItem::FPFHItem (QString name, const pcl::PointCloud<pcl::FPFHSignature33>::Ptr& fpfh_ptr, double radius)
+ : CloudComposerItem (std::move(name))
+ , fpfh_ptr_ (fpfh_ptr)
+@@ -40,7 +38,7 @@ pcl::cloud_composer::FPFHItem::getInspec
+ if (!plot_)
+ {
+ plot_.reset (new pcl::visualization::PCLPlotter);
+- qvtk_ = new QVTKWidget ();
++ qvtk_ = new PCLQVTKWidget();
+ hist_page_ = new QWidget ();
+ QGridLayout *mainLayout = new QGridLayout (hist_page_);
+ mainLayout-> addWidget (qvtk_,0,0);
+@@ -49,10 +47,15 @@ pcl::cloud_composer::FPFHItem::getInspec
+ //Plot the histogram
+ plot_->addFeatureHistogram (*fpfh_ptr_, fpfh_ptr_->width, data(ItemDataRole::ITEM_ID).toString().toStdString ());
+ //Set the render window of the QVTK widget, update
+- plot_->setViewInteractor (vtkSmartPointer<vtkRenderWindowInteractor> (qvtk_->GetInteractor ()));
+- qvtk_->SetRenderWindow (plot_->getRenderWindow ());
++ plot_->setViewInteractor(getInteractorCompat(*qvtk_));
++ setRenderWindowCompat(*qvtk_, *(plot_->getRenderWindow()));
++#if VTK_MAJOR_VERSION > 8
++ qvtk_->renderWindow()->Render();
++#else
++ qvtk_->update();
++#endif // VTK_MAJOR_VERSION > 8
+ qvtk_->show ();
+- qvtk_->update ();
++
+
+ QMap <QString, QWidget*> tabs;
+ tabs.insert ("Histogram",hist_page_);
Index: pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_src_point__selectors_click__trackball__interactor__style.cpp
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_src_point__selectors_click__trackball__interactor__style.cpp:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_src_point__selectors_click__trackball__interactor__style.cpp Fri May 7 11:36:29 2021
@@ -0,0 +1,17 @@
+$NetBSD: patch-apps_cloud__composer_src_point__selectors_click__trackball__interactor__style.cpp,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/cloud_composer/src/point_selectors/click_trackball_interactor_style.cpp.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/cloud_composer/src/point_selectors/click_trackball_interactor_style.cpp
+@@ -4,6 +4,10 @@
+
+ #include <QDebug>
+
++
++#include <vtkObjectFactory.h> // For vtkStandardNewMacro
++#include <vtkTransform.h>
++
+ namespace pcl
+ {
+ namespace cloud_composer
Index: pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_src_point__selectors_interactor__style__switch.cpp
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_src_point__selectors_interactor__style__switch.cpp:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_src_point__selectors_interactor__style__switch.cpp Fri May 7 11:36:29 2021
@@ -0,0 +1,16 @@
+$NetBSD: patch-apps_cloud__composer_src_point__selectors_interactor__style__switch.cpp,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/cloud_composer/src/point_selectors/interactor_style_switch.cpp.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/cloud_composer/src/point_selectors/interactor_style_switch.cpp
+@@ -6,6 +6,9 @@
+
+ #include <QDebug>
+
++#include <vtkCallbackCommand.h>
++#include <vtkObjectFactory.h>
++
+ namespace pcl
+ {
+ namespace cloud_composer
Index: pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_src_point__selectors_rectangular__frustum__selector.cpp
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_src_point__selectors_rectangular__frustum__selector.cpp:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_src_point__selectors_rectangular__frustum__selector.cpp Fri May 7 11:36:29 2021
@@ -0,0 +1,21 @@
+$NetBSD: patch-apps_cloud__composer_src_point__selectors_rectangular__frustum__selector.cpp,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/cloud_composer/src/point_selectors/rectangular_frustum_selector.cpp.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/cloud_composer/src/point_selectors/rectangular_frustum_selector.cpp
+@@ -3,6 +3,14 @@
+
+ #include <QDebug>
+
++#include <vtkSmartPointer.h>
++#include <vtkIdFilter.h>
++#include <vtkExtractGeometry.h>
++#include <vtkVertexGlyphFilter.h>
++#include <vtkPlanes.h>
++#include <vtkAreaPicker.h>
++#include <vtkObjectFactory.h>
++
+ namespace pcl
+ {
+ namespace cloud_composer
Index: pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_src_point__selectors_selected__trackball__interactor__style.cpp
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_src_point__selectors_selected__trackball__interactor__style.cpp:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_src_point__selectors_selected__trackball__interactor__style.cpp Fri May 7 11:36:29 2021
@@ -0,0 +1,22 @@
+$NetBSD: patch-apps_cloud__composer_src_point__selectors_selected__trackball__interactor__style.cpp,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/cloud_composer/src/point_selectors/selected_trackball_interactor_style.cpp.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/cloud_composer/src/point_selectors/selected_trackball_interactor_style.cpp
+@@ -4,6 +4,15 @@
+ #include <QDebug>
+ #include <QItemSelectionModel>
+
++#include <vtkSmartPointer.h>
++#include <vtkMatrix4x4.h>
++#include <vtkLODActor.h>
++#include <vtkInteractorStyleTrackballActor.h>
++#include <vtkRenderWindowInteractor.h>
++#include <vtkTransform.h>
++#include <vtkObjectFactory.h>
++
++
+ namespace pcl
+ {
+ namespace cloud_composer
Index: pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_src_project__model.cpp
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_src_project__model.cpp:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_cloud__composer_src_project__model.cpp Fri May 7 11:36:29 2021
@@ -0,0 +1,18 @@
+$NetBSD: patch-apps_cloud__composer_src_project__model.cpp,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/cloud_composer/src/project_model.cpp.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/cloud_composer/src/project_model.cpp
+@@ -14,6 +14,11 @@
+ #include <QMessageBox>
+ #include <QThread>
+
++#include <vtkSmartPointer.h>
++#include <vtkImageData.h>
++#include <vtkImageReader2Factory.h>
++#include <vtkImageReader2.h>
++
+ pcl::cloud_composer::ProjectModel::ProjectModel (QObject* parent)
+ : QStandardItemModel (parent)
+ {
Index: pkgsrc/graphics/pcl/patches/patch-apps_include_pcl_apps_manual__registration.h
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_include_pcl_apps_manual__registration.h:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_include_pcl_apps_manual__registration.h Fri May 7 11:36:29 2021
@@ -0,0 +1,16 @@
+$NetBSD: patch-apps_include_pcl_apps_manual__registration.h,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/include/pcl/apps/manual_registration.h.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/include/pcl/apps/manual_registration.h
+@@ -106,6 +106,9 @@ public:
+ DstPointPickCallback(const pcl::visualization::PointPickingEvent& event, void*);
+
+ protected:
++ void
++ refreshView();
++
+ pcl::visualization::PCLVisualizer::Ptr vis_src_;
+ pcl::visualization::PCLVisualizer::Ptr vis_dst_;
+
Index: pkgsrc/graphics/pcl/patches/patch-apps_include_pcl_apps_openni__passthrough.h
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_include_pcl_apps_openni__passthrough.h:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_include_pcl_apps_openni__passthrough.h Fri May 7 11:36:29 2021
@@ -0,0 +1,16 @@
+$NetBSD: patch-apps_include_pcl_apps_openni__passthrough.h,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/include/pcl/apps/openni_passthrough.h.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/include/pcl/apps/openni_passthrough.h
+@@ -86,6 +86,9 @@ public:
+ cloud_cb(const CloudConstPtr& cloud);
+
+ protected:
++ void
++ refreshView();
++
+ pcl::visualization::PCLVisualizer::Ptr vis_;
+ pcl::OpenNIGrabber& grabber_;
+ std::string device_id_;
Index: pkgsrc/graphics/pcl/patches/patch-apps_include_pcl_apps_organized__segmentation__demo.h
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_include_pcl_apps_organized__segmentation__demo.h:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_include_pcl_apps_organized__segmentation__demo.h Fri May 7 11:36:29 2021
@@ -0,0 +1,15 @@
+$NetBSD: patch-apps_include_pcl_apps_organized__segmentation__demo.h,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/include/pcl/apps/organized_segmentation_demo.h.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/include/pcl/apps/organized_segmentation_demo.h
+@@ -189,4 +189,8 @@ public Q_SLOTS:
+ private Q_SLOTS:
+ void
+ timeoutSlot();
++
++private:
++ void
++ refreshView();
+ };
Index: pkgsrc/graphics/pcl/patches/patch-apps_include_pcl_apps_pcd__video__player.h
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_include_pcl_apps_pcd__video__player.h:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_include_pcl_apps_pcd__video__player.h Fri May 7 11:36:29 2021
@@ -0,0 +1,24 @@
+$NetBSD: patch-apps_include_pcl_apps_pcd__video__player.h,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/include/pcl/apps/pcd_video_player.h.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/include/pcl/apps/pcd_video_player.h
+@@ -53,7 +53,6 @@
+ #include <QMainWindow>
+ #include <QMutex>
+ #include <QTimer>
+-#include <ui_pcd_video_player.h>
+
+ #include <ctime>
+ #include <iostream>
+@@ -93,6 +92,9 @@ public:
+ ~PCDVideoPlayer() {}
+
+ protected:
++ void
++ refreshView();
++
+ pcl::visualization::PCLVisualizer::Ptr vis_;
+ pcl::PointCloud<pcl::PointXYZRGBA>::Ptr cloud_;
+
Index: pkgsrc/graphics/pcl/patches/patch-apps_modeler_CMakeLists.txt
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_modeler_CMakeLists.txt:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_modeler_CMakeLists.txt Fri May 7 11:36:29 2021
@@ -0,0 +1,46 @@
+$NetBSD: patch-apps_modeler_CMakeLists.txt,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/modeler/CMakeLists.txt.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/modeler/CMakeLists.txt
+@@ -10,8 +10,6 @@ if(NOT VTK_FOUND)
+ else()
+ set(DEFAULT TRUE)
+ set(REASON)
+- set(VTK_USE_FILE "${VTK_USE_FILE}" CACHE INTERNAL "VTK_USE_FILE")
+- include("${VTK_USE_FILE}")
+ endif()
+
+ # QT5 Found?
+@@ -24,7 +22,7 @@ elseif(NOT ${DEFAULT} STREQUAL "AUTO_OFF
+ endif()
+
+ # QVTK?
+-if(NOT QVTK_FOUND)
++if(NOT HAVE_QVTK)
+ set(DEFAULT AUTO_OFF)
+ set(REASON "VTK was not built with Qt support.")
+ elseif(NOT ${DEFAULT} STREQUAL "AUTO_OFF")
+@@ -37,8 +35,8 @@ if(${DEFAULT} STREQUAL "TRUE")
+ set(DEFAULT FALSE)
+ endif()
+
+-PCL_SUBSUBSYS_OPTION(build "${SUBSYS_NAME}" "${SUBSUBSYS_NAME}" "${SUBSYS_DESC}" ${DEFAULT} "${REASON}")
+-PCL_SUBSUBSYS_DEPEND(build "${SUBSYS_NAME}" "${SUBSUBSYS_NAME}" DEPS ${SUBSYS_DEPS} EXT_DEPS vtk)
++PCL_SUBSUBSYS_OPTION(build "${SUBSYS_NAME}" "${SUBSUBSYS_NAME}" "${SUBSUBSYS_DESC}" ${DEFAULT} "${REASON}")
++PCL_SUBSUBSYS_DEPEND(build "${SUBSYS_NAME}" "${SUBSUBSYS_NAME}" DEPS ${SUBSUBSYS_DEPS} EXT_DEPS vtk)
+
+ PCL_ADD_DOC("${SUBSUBSYS_NAME}")
+
+@@ -140,6 +138,10 @@ set_source_files_properties(${srcs} PROP
+ set(EXE_NAME "pcl_${SUBSUBSYS_NAME}")
+ PCL_ADD_EXECUTABLE(${EXE_NAME} COMPONENT ${SUBSUBSYS_NAME} SOURCES ${ui_srcs} ${moc_srcs} ${resource_srcs} ${srcs} ${incs} ${impl_incs})
+ target_link_libraries("${EXE_NAME}" pcl_common pcl_io pcl_kdtree pcl_filters pcl_visualization pcl_segmentation pcl_surface pcl_features pcl_sample_consensus pcl_search Qt5::Widgets)
++#TODO: Update when CMAKE 3.10 is available
++if(NOT (${VTK_VERSION} VERSION_LESS 9.0))
++ target_link_libraries("${EXE_NAME}" VTK::GUISupportQt)
++endif()
+
+ # Put the ui in the windows project file
+ if(("${CMAKE_BUILD_TOOL}" MATCHES "msdev") OR("${CMAKE_BUILD_TOOL}" MATCHES "devenv"))
Index: pkgsrc/graphics/pcl/patches/patch-apps_modeler_include_pcl_apps_modeler_render__window.h
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_modeler_include_pcl_apps_modeler_render__window.h:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_modeler_include_pcl_apps_modeler_render__window.h Fri May 7 11:36:29 2021
@@ -0,0 +1,25 @@
+$NetBSD: patch-apps_modeler_include_pcl_apps_modeler_render__window.h,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/modeler/include/pcl/apps/modeler/render_window.h.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/modeler/include/pcl/apps/modeler/render_window.h
+@@ -35,8 +35,7 @@
+ */
+
+ #pragma once
+-
+-#include <QVTKWidget.h>
++#include <pcl/visualization/qvtk_compatibility.h>
+
+ #include <vtkSmartPointer.h>
+
+@@ -47,7 +46,7 @@ namespace modeler {
+
+ class RenderWindowItem;
+
+-class RenderWindow : public QVTKWidget {
++class RenderWindow : public PCLQVTKWidget {
+ public:
+ RenderWindow(RenderWindowItem* render_window_item,
+ QWidget* parent = nullptr,
Index: pkgsrc/graphics/pcl/patches/patch-apps_modeler_src_cloud__mesh.cpp
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_modeler_src_cloud__mesh.cpp:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_modeler_src_cloud__mesh.cpp Fri May 7 11:36:29 2021
@@ -0,0 +1,24 @@
+$NetBSD: patch-apps_modeler_src_cloud__mesh.cpp,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/modeler/src/cloud_mesh.cpp.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/modeler/src/cloud_mesh.cpp
+@@ -198,7 +198,7 @@ pcl::modeler::CloudMesh::updateVtkPolygo
+ if (cloud_->is_dense) {
+ for (const auto& polygon : polygons_) {
+ vtk_polygons_->InsertNextCell(polygon.vertices.size());
+- for (const unsigned int& vertex : polygon.vertices)
++ for (const auto& vertex : polygon.vertices)
+ vtk_polygons_->InsertCellPoint(vertex);
+ }
+ }
+@@ -208,7 +208,7 @@ pcl::modeler::CloudMesh::updateVtkPolygo
+
+ for (const auto& polygon : polygons_) {
+ vtk_polygons_->InsertNextCell(polygon.vertices.size());
+- for (const unsigned int& vertex : polygon.vertices)
++ for (const auto& vertex : polygon.vertices)
+ vtk_polygons_->InsertCellPoint((*indices)[vertex]);
+ }
+ }
Index: pkgsrc/graphics/pcl/patches/patch-apps_modeler_src_cloud__mesh__item.cpp
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_modeler_src_cloud__mesh__item.cpp:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_modeler_src_cloud__mesh__item.cpp Fri May 7 11:36:29 2021
@@ -0,0 +1,35 @@
+$NetBSD: patch-apps_modeler_src_cloud__mesh__item.cpp,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/modeler/src/cloud_mesh_item.cpp.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/modeler/src/cloud_mesh_item.cpp
+@@ -156,12 +156,13 @@ void
+ pcl::modeler::CloudMeshItem::createChannels()
+ {
+ RenderWindowItem* render_window_item = dynamic_cast<RenderWindowItem*>(parent());
+- addChild(new PointsActorItem(
+- this, cloud_mesh_, render_window_item->getRenderWindow()->GetRenderWindow()));
+- addChild(new NormalsActorItem(
+- this, cloud_mesh_, render_window_item->getRenderWindow()->GetRenderWindow()));
+- addChild(new SurfaceActorItem(
+- this, cloud_mesh_, render_window_item->getRenderWindow()->GetRenderWindow()));
++ vtkRenderWindow* win =
++ getRenderWindowCompat(*(render_window_item->getRenderWindow()));
++
++ addChild(new PointsActorItem(this, cloud_mesh_, win));
++ addChild(new NormalsActorItem(this, cloud_mesh_, win));
++ addChild(new SurfaceActorItem(this, cloud_mesh_, win));
++
+ for (int i = 0, i_end = childCount(); i < i_end; ++i) {
+ ChannelActorItem* child_item = dynamic_cast<ChannelActorItem*>(child(i));
+ child_item->init();
+@@ -242,7 +243,7 @@ pcl::modeler::CloudMeshItem::updateRende
+ for (int i = 0, i_end = childCount(); i < i_end; ++i) {
+ ChannelActorItem* child_item = dynamic_cast<ChannelActorItem*>(child(i));
+ child_item->switchRenderWindow(
+- render_window_item->getRenderWindow()->GetRenderWindow());
++ getRenderWindowCompat(*render_window_item->getRenderWindow()));
+ }
+
+ render_window_item->getRenderWindow()->updateAxes();
Index: pkgsrc/graphics/pcl/patches/patch-apps_modeler_src_render__window.cpp
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_modeler_src_render__window.cpp:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_modeler_src_render__window.cpp Fri May 7 11:36:29 2021
@@ -0,0 +1,109 @@
+$NetBSD: patch-apps_modeler_src_render__window.cpp,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/modeler/src/render_window.cpp.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/modeler/src/render_window.cpp
+@@ -52,7 +52,7 @@
+ pcl::modeler::RenderWindow::RenderWindow(RenderWindowItem* render_window_item,
+ QWidget* parent,
+ Qt::WindowFlags flags)
+-: QVTKWidget(parent, flags)
++: PCLQVTKWidget(parent, flags)
+ , axes_(vtkSmartPointer<vtkCubeAxesActor>::New())
+ , render_window_item_(render_window_item)
+ {
+@@ -76,7 +76,7 @@ pcl::modeler::RenderWindow::~RenderWindo
+ void
+ pcl::modeler::RenderWindow::initRenderer()
+ {
+- vtkSmartPointer<vtkRenderWindow> win = GetRenderWindow();
++ vtkSmartPointer<vtkRenderWindow> win = getRenderWindowCompat(*this);
+ vtkSmartPointer<vtkRenderer> renderer = vtkSmartPointer<vtkRenderer>::New();
+ win->AddRenderer(renderer);
+
+@@ -105,7 +105,7 @@ pcl::modeler::RenderWindow::focusInEvent
+ dynamic_cast<SceneTree*>(render_window_item_->treeWidget())
+ ->selectRenderWindowItem(render_window_item_);
+
+- QVTKWidget::focusInEvent(event);
++ PCLQVTKWidget::focusInEvent(event);
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+@@ -130,7 +130,7 @@ pcl::modeler::RenderWindow::setTitle(con
+ void
+ pcl::modeler::RenderWindow::render()
+ {
+- GetRenderWindow()->Render();
++ getRenderWindowCompat(*this)->Render();
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+@@ -138,9 +138,11 @@ void
+ pcl::modeler::RenderWindow::resetCamera()
+ {
+ double bounds[6];
+- GetRenderWindow()->GetRenderers()->GetFirstRenderer()->ComputeVisiblePropBounds(
+- bounds);
+- GetRenderWindow()->GetRenderers()->GetFirstRenderer()->ResetCamera(bounds);
++ getRenderWindowCompat(*this)
++ ->GetRenderers()
++ ->GetFirstRenderer()
++ ->ComputeVisiblePropBounds(bounds);
++ getRenderWindowCompat(*this)->GetRenderers()->GetFirstRenderer()->ResetCamera(bounds);
+ render();
+ }
+
+@@ -148,14 +150,16 @@ pcl::modeler::RenderWindow::resetCamera(
+ void
+ pcl::modeler::RenderWindow::getBackground(double& r, double& g, double& b)
+ {
+- GetRenderWindow()->GetRenderers()->GetFirstRenderer()->GetBackground(r, g, b);
++ getRenderWindowCompat(*this)->GetRenderers()->GetFirstRenderer()->GetBackground(
++ r, g, b);
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+ void
+ pcl::modeler::RenderWindow::setBackground(double r, double g, double b)
+ {
+- GetRenderWindow()->GetRenderers()->GetFirstRenderer()->SetBackground(r, g, b);
++ getRenderWindowCompat(*this)->GetRenderers()->GetFirstRenderer()->SetBackground(
++ r, g, b);
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+@@ -165,7 +169,7 @@ pcl::modeler::RenderWindow::updateAxes()
+ vtkBoundingBox bb;
+
+ vtkActorCollection* actors =
+- GetRenderWindow()->GetRenderers()->GetFirstRenderer()->GetActors();
++ getRenderWindowCompat(*this)->GetRenderers()->GetFirstRenderer()->GetActors();
+
+ actors->InitTraversal();
+ for (int i = 0, i_end = actors->GetNumberOfItems(); i < i_end; ++i) {
+@@ -181,8 +185,10 @@ pcl::modeler::RenderWindow::updateAxes()
+ double bounds[6];
+ bb.GetBounds(bounds);
+ axes_->SetBounds(bounds);
+- axes_->SetCamera(
+- GetRenderWindow()->GetRenderers()->GetFirstRenderer()->GetActiveCamera());
++ axes_->SetCamera(getRenderWindowCompat(*this)
++ ->GetRenderers()
++ ->GetFirstRenderer()
++ ->GetActiveCamera());
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+@@ -190,7 +196,8 @@ void
+ pcl::modeler::RenderWindow::setShowAxes(bool flag)
+ {
+ if (flag)
+- GetRenderWindow()->GetRenderers()->GetFirstRenderer()->AddActor(axes_);
++ getRenderWindowCompat(*this)->GetRenderers()->GetFirstRenderer()->AddActor(axes_);
+ else
+- GetRenderWindow()->GetRenderers()->GetFirstRenderer()->RemoveActor(axes_);
++ getRenderWindowCompat(*this)->GetRenderers()->GetFirstRenderer()->RemoveActor(
++ axes_);
+ }
Index: pkgsrc/graphics/pcl/patches/patch-apps_src_manual__registration_manual__registration.cpp
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_src_manual__registration_manual__registration.cpp:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_src_manual__registration_manual__registration.cpp Fri May 7 11:36:29 2021
@@ -0,0 +1,101 @@
+$NetBSD: patch-apps_src_manual__registration_manual__registration.cpp,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/src/manual_registration/manual_registration.cpp.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/src/manual_registration/manual_registration.cpp
+@@ -48,6 +48,7 @@
+ #include <vtkCamera.h>
+ #include <vtkRenderWindow.h>
+ #include <vtkRendererCollection.h>
++#include <vtkGenericOpenGLRenderWindow.h>
+
+ using namespace pcl;
+
+@@ -66,29 +67,46 @@ ManualRegistration::ManualRegistration()
+ this->setWindowTitle("PCL Manual Registration");
+
+ // Set up the source window
++#if VTK_MAJOR_VERSION > 8
++ auto renderer_src = vtkSmartPointer<vtkRenderer>::New();
++ auto renderWindow_src = vtkSmartPointer<vtkGenericOpenGLRenderWindow>::New();
++ renderWindow_src->AddRenderer(renderer_src);
++ vis_src_.reset(new pcl::visualization::PCLVisualizer(renderer_src, renderWindow_src, "", false));
++#else
+ vis_src_.reset(new pcl::visualization::PCLVisualizer("", false));
+- ui_->qvtk_widget_src->SetRenderWindow(vis_src_->getRenderWindow());
+- vis_src_->setupInteractor(ui_->qvtk_widget_src->GetInteractor(),
+- ui_->qvtk_widget_src->GetRenderWindow());
++#endif // VTK_MAJOR_VERSION > 8
++ setRenderWindowCompat(*(ui_->qvtk_widget_src),*(vis_src_->getRenderWindow()));
++ vis_src_->setupInteractor(getInteractorCompat(*(ui_->qvtk_widget_src)),
++ getRenderWindowCompat(*(ui_->qvtk_widget_src)));
++
+ vis_src_->getInteractorStyle()->setKeyboardModifier(
+ pcl::visualization::INTERACTOR_KB_MOD_SHIFT);
+- ui_->qvtk_widget_src->update();
+
+ vis_src_->registerPointPickingCallback(&ManualRegistration::SourcePointPickCallback,
+ *this);
+
+ // Set up the destination window
++#if VTK_MAJOR_VERSION > 8
++ auto renderer_dst = vtkSmartPointer<vtkRenderer>::New();
++ auto renderWindow_dst = vtkSmartPointer<vtkGenericOpenGLRenderWindow>::New();
++ renderWindow_dst->AddRenderer(renderer_dst);
++ vis_dst_.reset(new pcl::visualization::PCLVisualizer(renderer_dst, renderWindow_dst, "", false));
++#else
+ vis_dst_.reset(new pcl::visualization::PCLVisualizer("", false));
+- ui_->qvtk_widget_dst->SetRenderWindow(vis_dst_->getRenderWindow());
+- vis_dst_->setupInteractor(ui_->qvtk_widget_dst->GetInteractor(),
+- ui_->qvtk_widget_dst->GetRenderWindow());
++#endif // VTK_MAJOR_VERSION > 8
++ setRenderWindowCompat(*(ui_->qvtk_widget_dst), *(vis_dst_->getRenderWindow()));
++ vis_dst_->setupInteractor(getInteractorCompat(*(ui_->qvtk_widget_dst)),
++ getRenderWindowCompat(*(ui_->qvtk_widget_dst)));
++
++
+ vis_dst_->getInteractorStyle()->setKeyboardModifier(
+- pcl::visualization::INTERACTOR_KB_MOD_SHIFT);
+- ui_->qvtk_widget_dst->update();
++ pcl::visualization::INTERACTOR_KB_MOD_SHIFT);
+
+ vis_dst_->registerPointPickingCallback(&ManualRegistration::DstPointPickCallback,
+ *this);
+-
++ // Render view
++ refreshView();
++
+ // Connect all buttons
+ connect(ui_->confirmSrcPointButton,
+ SIGNAL(clicked()),
+@@ -236,8 +254,8 @@ ManualRegistration::orthoChanged(int sta
+ ->GetActiveCamera()
+ ->SetParallelProjection(1);
+ }
+- ui_->qvtk_widget_src->update();
+- ui_->qvtk_widget_dst->update();
++
++ refreshView();
+ }
+
+ // TODO
+@@ -274,8 +292,17 @@ ManualRegistration::timeoutSlot()
+ }
+ cloud_dst_modified_ = false;
+ }
+- ui_->qvtk_widget_src->update();
++ refreshView();
++}
++
++void
++ManualRegistration::refreshView()
++{
++#if VTK_MAJOR_VERSION > 8
++ ui_->qvtk_widget_dst->renderWindow()->Render();
++#else
+ ui_->qvtk_widget_dst->update();
++#endif // VTK_MAJOR_VERSION > 8
+ }
+
+ void
Index: pkgsrc/graphics/pcl/patches/patch-apps_src_manual__registration_manual__registration.ui
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_src_manual__registration_manual__registration.ui:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_src_manual__registration_manual__registration.ui Fri May 7 11:36:29 2021
@@ -0,0 +1,37 @@
+$NetBSD: patch-apps_src_manual__registration_manual__registration.ui,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/src/manual_registration/manual_registration.ui.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/src/manual_registration/manual_registration.ui
+@@ -37,7 +37,7 @@
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="3">
+- <widget class="QVTKWidget" name="qvtk_widget_src">
++ <widget class="PCLQVTKWidget" name="qvtk_widget_src">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>255</horstretch>
+@@ -133,7 +133,7 @@
+ </layout>
+ </item>
+ <item row="0" column="7">
+- <widget class="QVTKWidget" name="qvtk_widget_dst">
++ <widget class="PCLQVTKWidget" name="qvtk_widget_dst">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>255</horstretch>
+@@ -161,9 +161,9 @@
+ </widget>
+ <customwidgets>
+ <customwidget>
+- <class>QVTKWidget</class>
+- <extends>QWidget</extends>
+- <header>QVTKWidget.h</header>
++ <class>PCLQVTKWidget</class>
++ <extends>QOpenGLWidget</extends>
++ <header location="global">pcl/visualization/qvtk_compatibility.h</header>
+ </customwidget>
+ </customwidgets>
+ <resources/>
Index: pkgsrc/graphics/pcl/patches/patch-apps_src_openni__octree__compression.cpp
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_src_openni__octree__compression.cpp:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_src_openni__octree__compression.cpp Fri May 7 11:36:29 2021
@@ -0,0 +1,15 @@
+$NetBSD: patch-apps_src_openni__octree__compression.cpp,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/src/openni_octree_compression.cpp.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/src/openni_octree_compression.cpp
+@@ -382,7 +382,7 @@ main(int argc, char** argv)
+ if (!bServerFileMode) {
+ if (bEnDecode) {
+ // ENCODING
+- ofstream compressedPCFile;
++ std::ofstream compressedPCFile;
+ compressedPCFile.open(fileName.c_str(), std::ios::out | std::ios::trunc | std::ios::binary);
+
+ if (!bShowInputCloud) {
Index: pkgsrc/graphics/pcl/patches/patch-apps_src_openni__passthrough.cpp
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_src_openni__passthrough.cpp:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_src_openni__passthrough.cpp Fri May 7 11:36:29 2021
@@ -0,0 +1,69 @@
+$NetBSD: patch-apps_src_openni__passthrough.cpp,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/src/openni_passthrough.cpp.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/src/openni_passthrough.cpp
+@@ -35,6 +35,8 @@
+ *
+ */
+
++#include <ui_openni_passthrough.h>
++
+ #include <pcl/apps/openni_passthrough.h>
+ #include <pcl/console/parse.h>
+
+@@ -44,6 +46,8 @@
+ #include <QObject>
+
+ #include <vtkRenderWindow.h>
++#include <vtkRendererCollection.h>
++#include <vtkGenericOpenGLRenderWindow.h>
+
+ #include <thread>
+
+@@ -61,13 +65,21 @@ OpenNIPassthrough::OpenNIPassthrough(pcl
+ ui_->setupUi(this);
+
+ this->setWindowTitle("PCL OpenNI PassThrough Viewer");
++ //Create the QVTKWidget
++#if VTK_MAJOR_VERSION > 8
++ auto renderer = vtkSmartPointer<vtkRenderer>::New();
++ auto renderWindow = vtkSmartPointer<vtkGenericOpenGLRenderWindow>::New();
++ renderWindow->AddRenderer(renderer);
++ vis_.reset(new pcl::visualization::PCLVisualizer(renderer, renderWindow, "", false));
++#else
+ vis_.reset(new pcl::visualization::PCLVisualizer("", false));
+- ui_->qvtk_widget->SetRenderWindow(vis_->getRenderWindow());
+- vis_->setupInteractor(ui_->qvtk_widget->GetInteractor(),
+- ui_->qvtk_widget->GetRenderWindow());
+- vis_->getInteractorStyle()->setKeyboardModifier(
+- pcl::visualization::INTERACTOR_KB_MOD_SHIFT);
+- ui_->qvtk_widget->update();
++#endif // VTK_MAJOR_VERSION > 8
++ setRenderWindowCompat(*(ui_->qvtk_widget),*(vis_->getRenderWindow()));
++ vis_->setupInteractor(getInteractorCompat(*(ui_->qvtk_widget)), getRenderWindowCompat(*(ui_->qvtk_widget)));
++
++ vis_->getInteractorStyle()->setKeyboardModifier(pcl::visualization::INTERACTOR_KB_MOD_SHIFT);
++
++ refreshView();
+
+ // Start the OpenNI data acquision
+ std::function<void(const CloudConstPtr&)> f = [this](const CloudConstPtr& cloud) {
+@@ -125,6 +137,16 @@ OpenNIPassthrough::timeoutSlot()
+ ui_->qvtk_widget->update();
+ }
+
++void
++OpenNIPassthrough::refreshView()
++{
++#if VTK_MAJOR_VERSION > 8
++ ui_->qvtk_widget->renderWindow()->Render();
++#else
++ ui_->qvtk_widget->update();
++#endif // VTK_MAJOR_VERSION > 8
++}
++
+ int
+ main(int argc, char** argv)
+ {
Index: pkgsrc/graphics/pcl/patches/patch-apps_src_openni__passthrough.ui
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_src_openni__passthrough.ui:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_src_openni__passthrough.ui Fri May 7 11:36:29 2021
@@ -0,0 +1,28 @@
+$NetBSD: patch-apps_src_openni__passthrough.ui,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/src/openni_passthrough.ui.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/src/openni_passthrough.ui
+@@ -37,7 +37,7 @@
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+- <widget class="QVTKWidget" name="qvtk_widget">
++ <widget class="PCLQVTKWidget" name="qvtk_widget">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>255</horstretch>
+@@ -94,9 +94,9 @@
+ </widget>
+ <customwidgets>
+ <customwidget>
+- <class>QVTKWidget</class>
+- <extends>QWidget</extends>
+- <header>QVTKWidget.h</header>
++ <class>PCLQVTKWidget</class>
++ <extends>QOpenGLWidget</extends>
++ <header location="global">pcl/visualization/qvtk_compatibility.h</header>
+ </customwidget>
+ </customwidgets>
+ <resources>
Index: pkgsrc/graphics/pcl/patches/patch-apps_src_organized__segmentation__demo.cpp
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_src_organized__segmentation__demo.cpp:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_src_organized__segmentation__demo.cpp Fri May 7 11:36:29 2021
@@ -0,0 +1,70 @@
+$NetBSD: patch-apps_src_organized__segmentation__demo.cpp,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/src/organized_segmentation_demo.cpp.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/src/organized_segmentation_demo.cpp
+@@ -12,6 +12,8 @@
+ #include <QObject>
+
+ #include <vtkRenderWindow.h>
++#include <vtkRendererCollection.h>
++#include <vtkGenericOpenGLRenderWindow.h>
+
+ // #include <boost/filesystem.hpp> // for boost::filesystem::directory_iterator
+ #include <boost/signals2/connection.hpp> // for boost::signals2::connection
+@@ -204,13 +206,23 @@ OrganizedSegmentationDemo::OrganizedSegm
+ ui_->setupUi(this);
+
+ this->setWindowTitle("PCL Organized Connected Component Segmentation Demo");
++
++#if VTK_MAJOR_VERSION > 8
++ auto renderer = vtkSmartPointer<vtkRenderer>::New();
++ auto renderWindow = vtkSmartPointer<vtkGenericOpenGLRenderWindow>::New();
++ renderWindow->AddRenderer(renderer);
++ vis_.reset(new pcl::visualization::PCLVisualizer(renderer, renderWindow, "", false));
++#else
+ vis_.reset(new pcl::visualization::PCLVisualizer("", false));
+- ui_->qvtk_widget->SetRenderWindow(vis_->getRenderWindow());
+- vis_->setupInteractor(ui_->qvtk_widget->GetInteractor(),
+- ui_->qvtk_widget->GetRenderWindow());
++#endif // VTK_MAJOR_VERSION > 8
++ setRenderWindowCompat(*(ui_->qvtk_widget),*(vis_->getRenderWindow()));
++ vis_->setupInteractor(getInteractorCompat(*(ui_->qvtk_widget)), getRenderWindowCompat(*(ui_->qvtk_widget)));
++
++ refreshView();
++
+ vis_->getInteractorStyle()->setKeyboardModifier(
+ pcl::visualization::INTERACTOR_KB_MOD_SHIFT);
+- ui_->qvtk_widget->update();
++
+
+ std::function<void(const CloudConstPtr&)> f = [this](const CloudConstPtr& cloud) {
+ cloud_cb(cloud);
+@@ -309,6 +321,16 @@ OrganizedSegmentationDemo::OrganizedSegm
+ }
+
+ void
++OrganizedSegmentationDemo::refreshView()
++{
++#if VTK_MAJOR_VERSION > 8
++ ui_->qvtk_widget->renderWindow()->Render();
++#else
++ ui_->qvtk_widget->update();
++#endif // VTK_MAJOR_VERSION > 8
++}
++
++void
+ OrganizedSegmentationDemo::cloud_cb(const CloudConstPtr& cloud)
+ {
+ if (!capture_)
+@@ -440,8 +462,7 @@ OrganizedSegmentationDemo::timeoutSlot()
+ data_modified_ = false;
+ }
+ }
+-
+- ui_->qvtk_widget->update();
++ refreshView();
+ }
+
+ void
Index: pkgsrc/graphics/pcl/patches/patch-apps_src_organized__segmentation__demo.ui
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_src_organized__segmentation__demo.ui:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_src_organized__segmentation__demo.ui Fri May 7 11:36:29 2021
@@ -0,0 +1,28 @@
+$NetBSD: patch-apps_src_organized__segmentation__demo.ui,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/src/organized_segmentation_demo.ui.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/src/organized_segmentation_demo.ui
+@@ -37,7 +37,7 @@
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="3">
+- <widget class="QVTKWidget" name="qvtk_widget">
++ <widget class="PCLQVTKWidget" name="qvtk_widget">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>255</horstretch>
+@@ -214,9 +214,9 @@
+ </widget>
+ <customwidgets>
+ <customwidget>
+- <class>QVTKWidget</class>
+- <extends>QWidget</extends>
+- <header>QVTKWidget.h</header>
++ <class>PCLQVTKWidget</class>
++ <extends>QOpenGLWidget</extends>
++ <header location="global">pcl/visualization/qvtk_compatibility.h</header>
+ </customwidget>
+ </customwidgets>
+ <resources>
Index: pkgsrc/graphics/pcl/patches/patch-apps_src_pcd__video__player_pcd__video__player.cpp
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_src_pcd__video__player_pcd__video__player.cpp:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_src_pcd__video__player_pcd__video__player.cpp Fri May 7 11:36:29 2021
@@ -0,0 +1,79 @@
+$NetBSD: patch-apps_src_pcd__video__player_pcd__video__player.cpp,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/src/pcd_video_player/pcd_video_player.cpp.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/src/pcd_video_player/pcd_video_player.cpp
+@@ -35,6 +35,8 @@
+ *
+ */
+
++#include <ui_pcd_video_player.h>
++
+ #include <pcl/apps/pcd_video_player.h>
+ #include <pcl/io/pcd_io.h>
+ #include <pcl/point_types.h>
+@@ -51,6 +53,7 @@
+ #include <vtkCamera.h>
+ #include <vtkRenderWindow.h>
+ #include <vtkRendererCollection.h>
++#include <vtkGenericOpenGLRenderWindow.h>
+
+ #include <fstream>
+ #include <iostream>
+@@ -80,14 +83,21 @@ PCDVideoPlayer::PCDVideoPlayer()
+ // Setup the cloud pointer
+ cloud_.reset(new pcl::PointCloud<pcl::PointXYZRGBA>);
+
+- // Set up the qvtk window
++ //Create the QVTKWidget
++#if VTK_MAJOR_VERSION > 8
++ auto renderer = vtkSmartPointer<vtkRenderer>::New();
++ auto renderWindow = vtkSmartPointer<vtkGenericOpenGLRenderWindow>::New();
++ renderWindow->AddRenderer(renderer);
++ vis_.reset(new pcl::visualization::PCLVisualizer(renderer, renderWindow, "", false));
++#else
+ vis_.reset(new pcl::visualization::PCLVisualizer("", false));
+- ui_->qvtkWidget->SetRenderWindow(vis_->getRenderWindow());
+- vis_->setupInteractor(ui_->qvtkWidget->GetInteractor(),
+- ui_->qvtkWidget->GetRenderWindow());
+- vis_->getInteractorStyle()->setKeyboardModifier(
+- pcl::visualization::INTERACTOR_KB_MOD_SHIFT);
+- ui_->qvtkWidget->update();
++#endif // VTK_MAJOR_VERSION > 8
++ setRenderWindowCompat(*(ui_->qvtk_widget),*(vis_->getRenderWindow()));
++ vis_->setupInteractor(getInteractorCompat(*(ui_->qvtk_widget)), getRenderWindowCompat(*(ui_->qvtk_widget)));
++
++ vis_->getInteractorStyle()->setKeyboardModifier(pcl::visualization::INTERACTOR_KB_MOD_SHIFT);
++
++ refreshView();
+
+ // Connect all buttons
+ connect(ui_->playButton, SIGNAL(clicked()), this, SLOT(playButtonPressed()));
+@@ -258,7 +268,8 @@ PCDVideoPlayer::timeoutSlot()
+ }
+ cloud_modified_ = false;
+ }
+- ui_->qvtkWidget->update();
++
++ refreshView();
+ }
+
+ void
+@@ -270,6 +281,16 @@ PCDVideoPlayer::indexSliderValueChanged(
+ }
+
+ void
++PCDVideoPlayer::refreshView()
++{
++#if VTK_MAJOR_VERSION > 8
++ ui_->qvtk_widget->renderWindow()->Render();
++#else
++ ui_->qvtk_widget->update();
++#endif // VTK_MAJOR_VERSION > 8
++}
++
++void
+ print_usage()
+ {
+ // clang-format off
Index: pkgsrc/graphics/pcl/patches/patch-apps_src_pcd__video__player_pcd__video__player.ui
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_src_pcd__video__player_pcd__video__player.ui:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_src_pcd__video__player_pcd__video__player.ui Fri May 7 11:36:29 2021
@@ -0,0 +1,253 @@
+$NetBSD: patch-apps_src_pcd__video__player_pcd__video__player.ui,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/src/pcd_video_player/pcd_video_player.ui.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/src/pcd_video_player/pcd_video_player.ui
+@@ -14,122 +14,108 @@
+ <string>MainWindow</string>
+ </property>
+ <widget class="QWidget" name="centralwidget">
+- <widget class="QWidget" name="verticalLayoutWidget">
+- <property name="geometry">
+- <rect>
+- <x>339</x>
+- <y>10</y>
+- <width>451</width>
+- <height>531</height>
+- </rect>
+- </property>
+- <layout class="QVBoxLayout" name="verticalLayout">
+- <item>
+- <widget class="QVTKWidget" name="qvtkWidget"/>
+- </item>
+- <item>
+- <widget class="QSlider" name="indexSlider">
+- <property name="orientation">
+- <enum>Qt::Horizontal</enum>
+- </property>
+- </widget>
+- </item>
+- </layout>
+- </widget>
+- <widget class="QWidget" name="verticalLayoutWidget_2">
+- <property name="geometry">
+- <rect>
+- <x>9</x>
+- <y>9</y>
+- <width>321</width>
+- <height>531</height>
+- </rect>
+- </property>
+- <layout class="QVBoxLayout" name="verticalLayout_2">
+- <item>
+- <widget class="QPushButton" name="selectFilesButton">
+- <property name="text">
+- <string>Select PCD Files</string>
+- </property>
+- </widget>
+- </item>
+- <item>
+- <widget class="QPushButton" name="selectFolderButton">
+- <property name="text">
+- <string>Select Folder</string>
+- </property>
+- </widget>
+- </item>
+- <item>
+- <widget class="Line" name="line_2">
+- <property name="orientation">
+- <enum>Qt::Horizontal</enum>
+- </property>
+- </widget>
+- </item>
+- <item>
+- <spacer name="verticalSpacer">
+- <property name="orientation">
+- <enum>Qt::Vertical</enum>
+- </property>
+- <property name="sizeHint" stdset="0">
+- <size>
+- <width>20</width>
+- <height>40</height>
+- </size>
+- </property>
+- </spacer>
+- </item>
+- <item>
+- <widget class="Line" name="line_3">
+- <property name="orientation">
+- <enum>Qt::Horizontal</enum>
+- </property>
+- </widget>
+- </item>
+- <item>
+- <layout class="QHBoxLayout" name="horizontalLayout">
+- <item>
+- <widget class="QToolButton" name="backButton">
+- <property name="text">
+- <string>...</string>
+- </property>
+- <property name="arrowType">
+- <enum>Qt::LeftArrow</enum>
+- </property>
+- </widget>
+- </item>
+- <item>
+- <widget class="QToolButton" name="stopButton">
+- <property name="text">
+- <string>Stop</string>
+- </property>
+- </widget>
+- </item>
+- <item>
+- <widget class="QToolButton" name="playButton">
+- <property name="text">
+- <string>Play</string>
+- </property>
+- <property name="arrowType">
+- <enum>Qt::NoArrow</enum>
+- </property>
+- </widget>
+- </item>
+- <item>
+- <widget class="QToolButton" name="nextButton">
+- <property name="text">
+- <string>...</string>
+- </property>
+- <property name="arrowType">
+- <enum>Qt::RightArrow</enum>
+- </property>
+- </widget>
+- </item>
+- </layout>
+- </item>
+- </layout>
+- </widget>
++ <layout class="QHBoxLayout" name="horizontalLayout_2">
++ <item>
++ <layout class="QVBoxLayout" name="verticalLayout_2">
++ <item>
++ <widget class="QPushButton" name="selectFilesButton">
++ <property name="text">
++ <string>Select PCD Files</string>
++ </property>
++ </widget>
++ </item>
++ <item>
++ <widget class="QPushButton" name="selectFolderButton">
++ <property name="text">
++ <string>Select Folder</string>
++ </property>
++ </widget>
++ </item>
++ <item>
++ <widget class="Line" name="line_2">
++ <property name="orientation">
++ <enum>Qt::Horizontal</enum>
++ </property>
++ </widget>
++ </item>
++ <item>
++ <spacer name="verticalSpacer">
++ <property name="orientation">
++ <enum>Qt::Vertical</enum>
++ </property>
++ <property name="sizeHint" stdset="0">
++ <size>
++ <width>20</width>
++ <height>40</height>
++ </size>
++ </property>
++ </spacer>
++ </item>
++ <item>
++ <widget class="Line" name="line_3">
++ <property name="orientation">
++ <enum>Qt::Horizontal</enum>
++ </property>
++ </widget>
++ </item>
++ <item>
++ <layout class="QHBoxLayout" name="horizontalLayout">
++ <item>
++ <widget class="QToolButton" name="backButton">
++ <property name="text">
++ <string>...</string>
++ </property>
++ <property name="arrowType">
++ <enum>Qt::LeftArrow</enum>
++ </property>
++ </widget>
++ </item>
++ <item>
++ <widget class="QToolButton" name="stopButton">
++ <property name="text">
++ <string>Stop</string>
++ </property>
++ </widget>
++ </item>
++ <item>
++ <widget class="QToolButton" name="playButton">
++ <property name="text">
++ <string>Play</string>
++ </property>
++ <property name="arrowType">
++ <enum>Qt::NoArrow</enum>
++ </property>
++ </widget>
++ </item>
++ <item>
++ <widget class="QToolButton" name="nextButton">
++ <property name="text">
++ <string>...</string>
++ </property>
++ <property name="arrowType">
++ <enum>Qt::RightArrow</enum>
++ </property>
++ </widget>
++ </item>
++ </layout>
++ </item>
++ </layout>
++ </item>
++ <item>
++ <layout class="QVBoxLayout" name="verticalLayout">
++ <item>
++ <widget class="PCLQVTKWidget" name="qvtk_widget"/>
++ </item>
++ <item>
++ <widget class="QSlider" name="indexSlider">
++ <property name="orientation">
++ <enum>Qt::Horizontal</enum>
++ </property>
++ </widget>
++ </item>
++ </layout>
++ </item>
++ </layout>
+ </widget>
+ <widget class="QMenuBar" name="menubar">
+ <property name="geometry">
+@@ -137,7 +123,7 @@
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+- <height>25</height>
++ <height>21</height>
+ </rect>
+ </property>
+ </widget>
+@@ -145,9 +131,9 @@
+ </widget>
+ <customwidgets>
+ <customwidget>
+- <class>QVTKWidget</class>
+- <extends>QWidget</extends>
+- <header>QVTKWidget.h</header>
++ <class>PCLQVTKWidget</class>
++ <extends>QOpenGLWidget</extends>
++ <header location="global">pcl/visualization/qvtk_compatibility.h</header>
+ </customwidget>
+ </customwidgets>
+ <resources/>
Index: pkgsrc/graphics/pcl/patches/patch-apps_src_render__views__tesselated__sphere.cpp
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-apps_src_render__views__tesselated__sphere.cpp:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-apps_src_render__views__tesselated__sphere.cpp Fri May 7 11:36:29 2021
@@ -0,0 +1,52 @@
+$NetBSD: patch-apps_src_render__views__tesselated__sphere.cpp,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- apps/src/render_views_tesselated_sphere.cpp.orig 2020-08-14 12:23:03.000000000 +0000
++++ apps/src/render_views_tesselated_sphere.cpp
+@@ -7,6 +7,7 @@
+
+ #include <pcl/apps/render_views_tesselated_sphere.h>
+ #include <pcl/point_types.h>
++#include <pcl/visualization/vtk/pcl_vtk_compatibility.h>
+
+ #include <vtkActor.h>
+ #include <vtkCamera.h>
+@@ -26,6 +27,7 @@
+ #include <vtkTransformFilter.h>
+ #include <vtkTriangle.h>
+ #include <vtkWorldPointPicker.h>
++#include <vtkIdTypeArray.h>
+
+ #include <array>
+
+@@ -34,7 +36,8 @@ pcl::apps::RenderViewsTesselatedSphere::
+ {
+ // center object
+ double CoM[3];
+- vtkIdType npts_com = 0, *ptIds_com = nullptr;
++ vtkIdType npts_com = 0;
++ vtkCellPtsPtr ptIds_com = nullptr;
+ vtkSmartPointer<vtkCellArray> cells_com = polydata_->GetPolys();
+
+ double center[3], p1_com[3], p2_com[3], p3_com[3], totalArea_com = 0;
+@@ -95,7 +98,8 @@ pcl::apps::RenderViewsTesselatedSphere::
+ // * Compute area of the mesh
+ //////////////////////////////
+ vtkSmartPointer<vtkCellArray> cells = mapper->GetInput()->GetPolys();
+- vtkIdType npts = 0, *ptIds = nullptr;
++ vtkIdType npts = 0;
++ vtkCellPtsPtr ptIds = nullptr;
+
+ double p1[3], p2[3], p3[3], totalArea = 0;
+ for (cells->InitTraversal(); cells->GetNextCell(npts, ptIds);) {
+@@ -363,7 +367,8 @@ pcl::apps::RenderViewsTesselatedSphere::
+ polydata->BuildCells();
+
+ vtkSmartPointer<vtkCellArray> cells = polydata->GetPolys();
+- vtkIdType npts = 0, *ptIds = nullptr;
++ vtkIdType npts = 0;
++ vtkCellPtsPtr ptIds = nullptr;
+
+ double p1[3], p2[3], p3[3], area, totalArea = 0;
+ for (cells->InitTraversal(); cells->GetNextCell(npts, ptIds);) {
Index: pkgsrc/graphics/pcl/patches/patch-cmake_Modules_FindGLEW.cmake
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-cmake_Modules_FindGLEW.cmake:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-cmake_Modules_FindGLEW.cmake Fri May 7 11:36:29 2021
@@ -0,0 +1,77 @@
+$NetBSD: patch-cmake_Modules_FindGLEW.cmake,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- cmake/Modules/FindGLEW.cmake.orig 2021-05-06 06:26:06.662197602 +0000
++++ cmake/Modules/FindGLEW.cmake
+@@ -0,0 +1,69 @@
++# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
++# file Copyright.txt or https://cmake.org/licensing for details.
++
++#.rst:
++# FindGLEW
++# --------
++#
++# Find the OpenGL Extension Wrangler Library (GLEW)
++#
++# IMPORTED Targets
++# ^^^^^^^^^^^^^^^^
++#
++# This module defines the :prop_tgt:`IMPORTED` target ``GLEW::GLEW``,
++# if GLEW has been found.
++#
++# Result Variables
++# ^^^^^^^^^^^^^^^^
++#
++# This module defines the following variables:
++#
++# ::
++#
++# GLEW_INCLUDE_DIRS - include directories for GLEW
++# GLEW_LIBRARIES - libraries to link against GLEW
++# GLEW_FOUND - true if GLEW has been found and can be used
++
++find_path(GLEW_INCLUDE_DIR GL/glew.h)
++
++if(NOT GLEW_LIBRARY)
++ find_library(GLEW_LIBRARY_RELEASE NAMES GLEW glew32 glew glew32s PATH_SUFFIXES lib64 libx32)
++ find_library(GLEW_LIBRARY_DEBUG NAMES GLEWd glew32d glewd PATH_SUFFIXES lib64)
++
++ include(SelectLibraryConfigurations)
++ select_library_configurations(GLEW)
++endif ()
++
++include(FindPackageHandleStandardArgs)
++find_package_handle_standard_args(GLEW
++ REQUIRED_VARS GLEW_INCLUDE_DIR GLEW_LIBRARY)
++
++if(GLEW_FOUND)
++ set(GLEW_INCLUDE_DIRS ${GLEW_INCLUDE_DIR})
++
++ if(NOT GLEW_LIBRARIES)
++ set(GLEW_LIBRARIES ${GLEW_LIBRARY})
++ endif()
++
++ if (NOT TARGET GLEW::GLEW)
++ add_library(GLEW::GLEW UNKNOWN IMPORTED)
++ set_target_properties(GLEW::GLEW PROPERTIES
++ INTERFACE_INCLUDE_DIRECTORIES "${GLEW_INCLUDE_DIRS}")
++
++ if(GLEW_LIBRARY_RELEASE)
++ set_property(TARGET GLEW::GLEW APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
++ set_target_properties(GLEW::GLEW PROPERTIES IMPORTED_LOCATION_RELEASE "${GLEW_LIBRARY_RELEASE}")
++ endif()
++
++ if(GLEW_LIBRARY_DEBUG)
++ set_property(TARGET GLEW::GLEW APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
++ set_target_properties(GLEW::GLEW PROPERTIES IMPORTED_LOCATION_DEBUG "${GLEW_LIBRARY_DEBUG}")
++ endif()
++
++ if(NOT GLEW_LIBRARY_RELEASE AND NOT GLEW_LIBRARY_DEBUG)
++ set_property(TARGET GLEW::GLEW APPEND PROPERTY IMPORTED_LOCATION "${GLEW_LIBRARY}")
++ endif()
++ endif()
++endif()
++
++mark_as_advanced(GLEW_INCLUDE_DIR)
+\ No hay ningún carácter de nueva línea al final del archivo
Index: pkgsrc/graphics/pcl/patches/patch-cmake_pcl__find__vtk.cmake
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-cmake_pcl__find__vtk.cmake:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-cmake_pcl__find__vtk.cmake Fri May 7 11:36:29 2021
@@ -0,0 +1,171 @@
+$NetBSD: patch-cmake_pcl__find__vtk.cmake,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- cmake/pcl_find_vtk.cmake.orig 2021-05-06 06:26:06.662197602 +0000
++++ cmake/pcl_find_vtk.cmake
+@@ -0,0 +1,164 @@
++function(checkVTKComponents)
++ cmake_parse_arguments(PARAM "" "MISSING_COMPONENTS" "COMPONENTS" ${ARGN})
++
++ set(vtkMissingComponents)
++
++ foreach(vtkComponent ${PARAM_COMPONENTS})
++ if (VTK_VERSION VERSION_LESS 9.0)
++ if (NOT TARGET ${vtkComponent})
++ list(APPEND vtkMissingComponents ${vtkComponent})
++ endif()
++ else()
++ if (NOT TARGET VTK::${vtkComponent})
++ list(APPEND vtkMissingComponents ${vtkComponent})
++ endif()
++ endif()
++ endforeach()
++
++ set(${PARAM_MISSING_COMPONENTS} ${vtkMissingComponents} PARENT_SCOPE)
++endfunction()
++
++# Start with a generic call to find any VTK version we are supporting, so we retrieve
++# the version of VTK. As the module names were changed from VTK 8.2 to 9.0, we don't
++# search explicitly for modules. Furthermore we don't pass required minimum version 6.2
++# to find_package because then it only accept versions with same major version.
++find_package(VTK)
++
++if(NOT VTK_FOUND)
++ return()
++endif()
++
++if(VTK_FOUND AND (VTK_VERSION VERSION_LESS 6.2))
++ message(WARNING "The minimum required version of VTK is 6.2, but found ${VTK_VERSION}")
++ set(VTK_FOUND FALSE)
++ return()
++endif()
++
++set(NON_PREFIX_PCL_VTK_COMPONENTS
++ ChartsCore
++ CommonColor
++ CommonCore
++ CommonDataModel
++ CommonExecutionModel
++ CommonMath
++ CommonMisc
++ CommonTransforms
++ FiltersCore
++ FiltersExtraction
++ FiltersGeneral
++ FiltersGeometry
++ FiltersModeling
++ FiltersSources
++ ImagingCore
++ ImagingSources
++ InteractionStyle
++ InteractionWidgets
++ IOCore
++ IOGeometry
++ IOImage
++ IOLegacy
++ IOPLY
++ RenderingAnnotation
++ RenderingCore
++ RenderingContext2D
++ RenderingLOD
++ RenderingFreeType
++ ViewsCore
++ ViewsContext2D
++)
++
++#If VTK version 6 use OpenGL
++if(VTK_VERSION VERSION_LESS 7.0)
++ set(VTK_RENDERING_BACKEND "OpenGL")
++ set(VTK_RENDERING_BACKEND_OPENGL_VERSION "1")
++ message(DEPRECATION "The rendering backend OpenGL is deprecated and not available anymore since VTK 8.2."
++ "Please switch to the OpenGL2 backend instead, which is available since VTK 6.2."
++ "Support of the deprecated backend will be dropped with PCL 1.13.")
++
++#If VTK version 7,8 or 9 use OpenGL2
++else()
++ set(VTK_RENDERING_BACKEND "OpenGL2")
++ set(VTK_RENDERING_BACKEND_OPENGL_VERSION "2")
++endif()
++
++list(APPEND NON_PREFIX_PCL_VTK_COMPONENTS Rendering${VTK_RENDERING_BACKEND})
++
++#Append vtk to components if version is <9.0
++if(VTK_VERSION VERSION_LESS 9.0)
++ foreach(vtkComponent ${NON_PREFIX_PCL_VTK_COMPONENTS})
++ set(vtkComponent "vtk${vtkComponent}")
++ list(APPEND PCL_VTK_COMPONENTS ${vtkComponent})
++ endforeach()
++else()
++ set(PCL_VTK_COMPONENTS ${NON_PREFIX_PCL_VTK_COMPONENTS})
++endif()
++
++# Check if requested modules are available
++checkVTKComponents(COMPONENTS ${PCL_VTK_COMPONENTS} MISSING_COMPONENTS vtkMissingComponents)
++
++if (vtkMissingComponents)
++ set(VTK_FOUND FALSE)
++ message(WARNING "Missing vtk modules: ${vtkMissingComponents}")
++endif()
++
++if(WITH_QT)
++ if(VTK_VERSION VERSION_LESS 9.0)
++ if(";${VTK_MODULES_ENABLED};" MATCHES ";vtkGUISupportQt;" AND ";${VTK_MODULES_ENABLED};" MATCHES ";vtkRenderingQt;")
++ set(HAVE_QVTK TRUE)
++ #PCL_VTK_COMPONENTS is used in the PCLConfig.cmake to refind the required modules.
++ #Pre vtk 9.0, all vtk libraries are linked into pcl_visualizer.
++ #Subprojects can link against pcl_visualizer and directly use VTK-QT libraries.
++ list(APPEND PCL_VTK_COMPONENTS vtkRenderingQt vtkGUISupportQt)
++ else()
++ unset(HAVE_QVTK)
++ endif()
++ else()
++ if(";${VTK_AVAILABLE_COMPONENTS};" MATCHES ";GUISupportQt;" AND ";${VTK_AVAILABLE_COMPONENTS};" MATCHES ";RenderingQt;")
++ set(HAVE_QVTK TRUE)
++ #PCL_VTK_COMPONENTS is used in the PCLConfig.cmake to refind the required modules.
++ #Post vtk 9.0, only required libraries are linked against pcl_visualizer.
++ #Subprojects need to manually link to VTK-QT libraries.
++ list(APPEND PCL_VTK_COMPONENTS RenderingQt GUISupportQt)
++ else()
++ unset(HAVE_QVTK)
++ endif()
++ endif()
++endif()
++
++if(PCL_SHARED_LIBS OR (NOT (PCL_SHARED_LIBS) AND NOT (VTK_BUILD_SHARED_LIBS)))
++ if(VTK_VERSION VERSION_LESS 9.0)
++ if(VTK_USE_FILE)
++ include(${VTK_USE_FILE})
++ endif()
++ endif()
++
++ if(APPLE)
++ option(VTK_USE_COCOA "Use Cocoa for VTK render windows" ON)
++ mark_as_advanced(VTK_USE_COCOA)
++ endif()
++else()
++ set(VTK_FOUND OFF)
++ message("Warning: You are to build PCL in STATIC but VTK is SHARED!")
++ message("Warning: VTK disabled!")
++endif()
++
++message(STATUS "VTK version: ${VTK_VERSION}")
++message(STATUS "VTK rendering backend: ${VTK_RENDERING_BACKEND}")
++
++if(WITH_QT)
++ if(HAVE_QVTK)
++ message(STATUS "VTK Qt support: YES")
++ else()
++ message(STATUS "VTK Qt support: NOTFOUND")
++ endif()
++else()
++ message(STATUS "VTK Qt support: NO")
++endif()
++
++if(VTK_INCLUDE_DIRS)
++ message(STATUS "VTK include: ${VTK_INCLUDE_DIRS}")
++ENDIF()
++
++if(VTK_LIBRARIES)
++ message(STATUS "VTK libs: ${VTK_LIBRARIES}")
++endif()
Index: pkgsrc/graphics/pcl/patches/patch-examples_keypoints_CMakeLists.txt
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-examples_keypoints_CMakeLists.txt:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-examples_keypoints_CMakeLists.txt Fri May 7 11:36:29 2021
@@ -0,0 +1,23 @@
+$NetBSD: patch-examples_keypoints_CMakeLists.txt,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- examples/keypoints/CMakeLists.txt.orig 2020-08-14 12:23:03.000000000 +0000
++++ examples/keypoints/CMakeLists.txt
+@@ -6,12 +6,11 @@ PCL_SUBSYS_DEPEND(build ${SUBSYS_NAME} D
+
+ ## Find VTK
+ if(NOT VTK_FOUND)
+- set(DEFAULT FALSE)
+- set(REASON "VTK was not found.")
++ set(DEFAULT FALSE)
++ set(REASON "VTK was not found.")
+ else()
+- set(DEFAULT TRUE)
+- set(REASON)
+- include(${VTK_USE_FILE})
++ set(DEFAULT TRUE)
++ set(REASON)
+ endif()
+
+ PCL_ADD_EXAMPLE(pcl_example_sift_keypoint_estimation FILES example_sift_keypoint_estimation.cpp
Index: pkgsrc/graphics/pcl/patches/patch-examples_outofcore_CMakeLists.txt
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-examples_outofcore_CMakeLists.txt:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-examples_outofcore_CMakeLists.txt Fri May 7 11:36:29 2021
@@ -0,0 +1,14 @@
+$NetBSD: patch-examples_outofcore_CMakeLists.txt,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- examples/outofcore/CMakeLists.txt.orig 2020-08-14 12:23:03.000000000 +0000
++++ examples/outofcore/CMakeLists.txt
+@@ -9,7 +9,6 @@ if(NOT VTK_FOUND)
+ else()
+ set(DEFAULT TRUE)
+ set(REASON)
+- include(${VTK_USE_FILE})
+ endif()
+
+ PCL_SUBSYS_DEPEND (build ${SUBSYS_NAME} DEPS outofcore io common octree filters visualization EXT_DEPS vtk)
Index: pkgsrc/graphics/pcl/patches/patch-examples_segmentation_CMakeLists.txt
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-examples_segmentation_CMakeLists.txt:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-examples_segmentation_CMakeLists.txt Fri May 7 11:36:29 2021
@@ -0,0 +1,14 @@
+$NetBSD: patch-examples_segmentation_CMakeLists.txt,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- examples/segmentation/CMakeLists.txt.orig 2020-08-14 12:23:03.000000000 +0000
++++ examples/segmentation/CMakeLists.txt
+@@ -11,7 +11,6 @@ PCL_ADD_EXAMPLE(pcl_example_region_growi
+
+ ## Find VTK
+ if(VTK_FOUND)
+- include(${VTK_USE_FILE})
+ PCL_ADD_EXAMPLE(pcl_example_supervoxels FILES example_supervoxels.cpp
+ LINK_WITH pcl_common pcl_features pcl_segmentation pcl_octree pcl_kdtree pcl_visualization)
+ PCL_ADD_EXAMPLE(pcl_example_lccp_segmentation FILES example_lccp_segmentation.cpp
Index: pkgsrc/graphics/pcl/patches/patch-examples_stereo_CMakeLists.txt
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-examples_stereo_CMakeLists.txt:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-examples_stereo_CMakeLists.txt Fri May 7 11:36:29 2021
@@ -0,0 +1,14 @@
+$NetBSD: patch-examples_stereo_CMakeLists.txt,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- examples/stereo/CMakeLists.txt.orig 2020-08-14 12:23:03.000000000 +0000
++++ examples/stereo/CMakeLists.txt
+@@ -11,7 +11,6 @@ if(NOT VTK_FOUND)
+ else()
+ set(DEFAULT TRUE)
+ set(REASON)
+- include(${VTK_USE_FILE})
+ endif()
+
+ PCL_ADD_EXAMPLE(pcl_example_stereo_baseline FILES example_stereo_baseline.cpp
Index: pkgsrc/graphics/pcl/patches/patch-examples_surface_CMakeLists.txt
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-examples_surface_CMakeLists.txt:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-examples_surface_CMakeLists.txt Fri May 7 11:36:29 2021
@@ -0,0 +1,14 @@
+$NetBSD: patch-examples_surface_CMakeLists.txt,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- examples/surface/CMakeLists.txt.orig 2020-08-14 12:23:03.000000000 +0000
++++ examples/surface/CMakeLists.txt
+@@ -11,7 +11,6 @@ if(NOT VTK_FOUND)
+ else()
+ set(DEFAULT TRUE)
+ set(REASON)
+- include(${VTK_USE_FILE})
+ endif()
+
+ PCL_ADD_EXAMPLE(pcl_test_nurbs_fitting_surface
Index: pkgsrc/graphics/pcl/patches/patch-gpu_kinfu__large__scale_tools_CMakeLists.txt
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-gpu_kinfu__large__scale_tools_CMakeLists.txt:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-gpu_kinfu__large__scale_tools_CMakeLists.txt Fri May 7 11:36:29 2021
@@ -0,0 +1,15 @@
+$NetBSD: patch-gpu_kinfu__large__scale_tools_CMakeLists.txt,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- gpu/kinfu_large_scale/tools/CMakeLists.txt.orig 2020-08-14 12:23:03.000000000 +0000
++++ gpu/kinfu_large_scale/tools/CMakeLists.txt
+@@ -8,8 +8,6 @@ if(NOT VTK_FOUND)
+ else()
+ set(DEFAULT TRUE)
+ set(REASON)
+- set(VTK_USE_FILE "${VTK_USE_FILE}" CACHE INTERNAL "VTK_USE_FILE")
+- include("${VTK_USE_FILE}")
+ include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")
+ endif()
+
Index: pkgsrc/graphics/pcl/patches/patch-gpu_kinfu_tools_CMakeLists.txt
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-gpu_kinfu_tools_CMakeLists.txt:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-gpu_kinfu_tools_CMakeLists.txt Fri May 7 11:36:29 2021
@@ -0,0 +1,15 @@
+$NetBSD: patch-gpu_kinfu_tools_CMakeLists.txt,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- gpu/kinfu/tools/CMakeLists.txt.orig 2020-08-14 12:23:03.000000000 +0000
++++ gpu/kinfu/tools/CMakeLists.txt
+@@ -8,8 +8,6 @@ if(NOT VTK_FOUND)
+ else()
+ set(DEFAULT TRUE)
+ set(REASON)
+- set(VTK_USE_FILE "${VTK_USE_FILE}" CACHE INTERNAL "VTK_USE_FILE")
+- include("${VTK_USE_FILE}")
+ include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")
+ endif()
+
Index: pkgsrc/graphics/pcl/patches/patch-gpu_people_tools_CMakeLists.txt
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-gpu_people_tools_CMakeLists.txt:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-gpu_people_tools_CMakeLists.txt Fri May 7 11:36:29 2021
@@ -0,0 +1,15 @@
+$NetBSD: patch-gpu_people_tools_CMakeLists.txt,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- gpu/people/tools/CMakeLists.txt.orig 2020-08-14 12:23:03.000000000 +0000
++++ gpu/people/tools/CMakeLists.txt
+@@ -6,8 +6,6 @@ if(NOT VTK_FOUND)
+ else()
+ set(DEFAULT TRUE)
+ set(REASON)
+- set(VTK_USE_FILE "${VTK_USE_FILE}" CACHE INTERNAL "VTK_USE_FILE")
+- include("${VTK_USE_FILE}")
+ include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")
+ endif()
+
Index: pkgsrc/graphics/pcl/patches/patch-io_CMakeLists.txt
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-io_CMakeLists.txt:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-io_CMakeLists.txt Fri May 7 11:36:29 2021
@@ -0,0 +1,43 @@
+$NetBSD: patch-io_CMakeLists.txt,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- io/CMakeLists.txt.orig 2020-08-14 12:23:03.000000000 +0000
++++ io/CMakeLists.txt
+@@ -331,10 +331,24 @@ endif()
+ set(LIB_NAME "pcl_${SUBSYS_NAME}")
+
+ add_definitions(${VTK_DEFINES})
++
+ PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs} ${compression_incs} ${impl_incs} ${OPENNI_INCLUDES} ${OPENNI2_INCLUDES})
++
+ target_include_directories(${LIB_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
+-link_directories(${VTK_LINK_DIRECTORIES})
+-target_link_libraries("${LIB_NAME}" pcl_common pcl_io_ply ${VTK_LIBRARIES})
++
++target_link_libraries("${LIB_NAME}" pcl_common pcl_io_ply)
++if(VTK_FOUND)
++ if(${VTK_VERSION} VERSION_LESS 9.0)
++ link_directories(${VTK_LINK_DIRECTORIES})
++ target_link_libraries("${LIB_NAME}" ${VTK_LIBRARIES})
++ else()
++ target_link_libraries("${LIB_NAME}"
++ VTK::IOImage
++ VTK::IOGeometry
++ VTK::IOPLY)
++ endif()
++endif()
++
+ if(PNG_FOUND)
+ target_link_libraries("${LIB_NAME}" ${PNG_LIBRARIES})
+ endif()
+@@ -349,6 +363,9 @@ endif()
+
+ if(WITH_OPENNI)
+ target_link_libraries("${LIB_NAME}" ${OPENNI_LIBRARIES})
++ if(VTK_FOUND AND (NOT ${VTK_VERSION} VERSION_LESS 9.0))
++ target_link_libraries("${LIB_NAME}" VTK::FiltersCore VTK::FiltersGeneral)
++ endif()
+ endif()
+
+ if(WITH_FZAPI)
Index: pkgsrc/graphics/pcl/patches/patch-io_src_vtk__lib__io.cpp
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-io_src_vtk__lib__io.cpp:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-io_src_vtk__lib__io.cpp Fri May 7 11:36:29 2021
@@ -0,0 +1,18 @@
+$NetBSD: patch-io_src_vtk__lib__io.cpp,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- io/src/vtk_lib_io.cpp.orig 2020-08-14 12:23:03.000000000 +0000
++++ io/src/vtk_lib_io.cpp
+@@ -343,7 +343,11 @@ pcl::io::vtk2mesh (const vtkSmartPointer
+
+ // Now handle the polygons
+ mesh.polygons.resize (nr_polygons);
++#ifdef VTK_CELL_ARRAY_V2
++ vtkIdType const *cell_points;
++#else
+ vtkIdType* cell_points;
++#endif
+ vtkIdType nr_cell_points;
+ vtkCellArray * mesh_polygons = poly_data->GetPolys ();
+ mesh_polygons->InitTraversal ();
Index: pkgsrc/graphics/pcl/patches/patch-outofcore_tools_CMakeLists.txt
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-outofcore_tools_CMakeLists.txt:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-outofcore_tools_CMakeLists.txt Fri May 7 11:36:29 2021
@@ -0,0 +1,15 @@
+$NetBSD: patch-outofcore_tools_CMakeLists.txt,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- outofcore/tools/CMakeLists.txt.orig 2020-08-14 12:23:03.000000000 +0000
++++ outofcore/tools/CMakeLists.txt
+@@ -13,8 +13,6 @@ if(NOT VTK_FOUND)
+ else()
+ set(DEFAULT TRUE)
+ set(REASON)
+- set(VTK_USE_FILE "${VTK_USE_FILE}" CACHE INTERNAL "VTK_USE_FILE")
+- include("${VTK_USE_FILE}")
+ include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")
+
+ set(srcs outofcore_viewer.cpp
Index: pkgsrc/graphics/pcl/patches/patch-pcl__config.h.in
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-pcl__config.h.in:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-pcl__config.h.in Fri May 7 11:36:29 2021
@@ -0,0 +1,12 @@
+$NetBSD: patch-pcl__config.h.in,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- pcl_config.h.in.orig 2020-08-14 12:23:03.000000000 +0000
++++ pcl_config.h.in
+@@ -95,3 +95,5 @@
+ /* Version of OpenGL used by VTK as rendering backend */
+ #define VTK_RENDERING_BACKEND_OPENGL_VERSION ${VTK_RENDERING_BACKEND_OPENGL_VERSION}
+
++#cmakedefine HAVE_QVTK 1
++
Index: pkgsrc/graphics/pcl/patches/patch-people_CMakeLists.txt
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-people_CMakeLists.txt:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-people_CMakeLists.txt Fri May 7 11:36:29 2021
@@ -0,0 +1,15 @@
+$NetBSD: patch-people_CMakeLists.txt,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- people/CMakeLists.txt.orig 2020-08-14 12:23:03.000000000 +0000
++++ people/CMakeLists.txt
+@@ -8,8 +8,6 @@ if(NOT VTK_FOUND)
+ else()
+ set(DEFAULT TRUE)
+ set(REASON)
+- set(VTK_USE_FILE "${VTK_USE_FILE}" CACHE INTERNAL "VTK_USE_FILE")
+- include("${VTK_USE_FILE}")
+ include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")
+ endif()
+
Index: pkgsrc/graphics/pcl/patches/patch-registration_include_pcl_registration_impl_ppf__registration.hpp
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-registration_include_pcl_registration_impl_ppf__registration.hpp:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-registration_include_pcl_registration_impl_ppf__registration.hpp Fri May 7 11:36:29 2021
@@ -0,0 +1,17 @@
+$NetBSD: patch-registration_include_pcl_registration_impl_ppf__registration.hpp,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- registration/include/pcl/registration/impl/ppf_registration.hpp.orig 2020-08-14 12:23:03.000000000 +0000
++++ registration/include/pcl/registration/impl/ppf_registration.hpp
+@@ -84,7 +84,9 @@ pcl::PPFRegistration<PointSource, PointT
+ PoseWithVotesList voted_poses;
+ // Consider every <scene_reference_point_sampling_rate>-th point as the reference point => fix s_r
+ float f1, f2, f3, f4;
+- for (std::size_t scene_reference_index = 0; scene_reference_index < target_->size (); scene_reference_index += scene_reference_point_sampling_rate_)
++ for (index_t scene_reference_index = 0;
++ scene_reference_index < static_cast<index_t>(target_->size());
++ scene_reference_index += scene_reference_point_sampling_rate_)
+ {
+ Eigen::Vector3f scene_reference_point = (*target_)[scene_reference_index].getVector3fMap (),
+ scene_reference_normal = (*target_)[scene_reference_index].getNormalVector3fMap ();
Index: pkgsrc/graphics/pcl/patches/patch-registration_include_pcl_registration_ppf__registration.h
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-registration_include_pcl_registration_ppf__registration.h:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-registration_include_pcl_registration_ppf__registration.h Fri May 7 11:36:29 2021
@@ -0,0 +1,15 @@
+$NetBSD: patch-registration_include_pcl_registration_ppf__registration.h,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- registration/include/pcl/registration/ppf_registration.h.orig 2020-08-14 12:23:03.000000000 +0000
++++ registration/include/pcl/registration/ppf_registration.h
+@@ -260,7 +260,7 @@ namespace pcl
+ PPFHashMapSearch::Ptr search_method_;
+
+ /** \brief parameter for the sampling rate of the scene reference points */
+- unsigned int scene_reference_point_sampling_rate_;
++ uindex_t scene_reference_point_sampling_rate_;
+
+ /** \brief position and rotation difference thresholds below which two
+ * poses are considered to be in the same cluster (for the clustering phase of the algorithm) */
Index: pkgsrc/graphics/pcl/patches/patch-simulation_CMakeLists.txt
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-simulation_CMakeLists.txt:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-simulation_CMakeLists.txt Fri May 7 11:36:29 2021
@@ -0,0 +1,21 @@
+$NetBSD: patch-simulation_CMakeLists.txt,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- simulation/CMakeLists.txt.orig 2020-08-14 12:23:03.000000000 +0000
++++ simulation/CMakeLists.txt
+@@ -4,12 +4,8 @@ set(SUBSYS_DEPS common io surface kdtree
+
+ set(build FALSE)
+ find_package(OpenGL)
+-if(APPLE)
+- # homebrew's FindGLEW module is not in good shape
+- find_package(glew CONFIG)
+-ELSE()
+- find_package(GLEW)
+-ENDIF()
++
++find_package(GLEW)
+
+ PCL_SUBSYS_OPTION(build "${SUBSYS_NAME}" "${SUBSYS_DESC}" OFF)
+ PCL_SUBSYS_DEPEND(build "${SUBSYS_NAME}" DEPS ${SUBSYS_DEPS} EXT_DEPS opengl glew)
Index: pkgsrc/graphics/pcl/patches/patch-simulation_src_model.cpp
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-simulation_src_model.cpp:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-simulation_src_model.cpp Fri May 7 11:36:29 2021
@@ -0,0 +1,24 @@
+$NetBSD: patch-simulation_src_model.cpp,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- simulation/src/model.cpp.orig 2020-08-14 12:23:03.000000000 +0000
++++ simulation/src/model.cpp
+@@ -21,7 +21,7 @@ pcl::simulation::TriangleMeshModel::Tria
+
+ Eigen::Vector4f tmp;
+ for (const auto& polygon : plg->polygons) {
+- for (const unsigned int& point : polygon.vertices) {
++ for (const auto& point : polygon.vertices) {
+ tmp = newcloud[point].getVector4fMap();
+ vertices.push_back(Vertex(Eigen::Vector3f(tmp(0), tmp(1), tmp(2)),
+ Eigen::Vector3f(newcloud[point].r / 255.0f,
+@@ -36,7 +36,7 @@ pcl::simulation::TriangleMeshModel::Tria
+ pcl::fromPCLPointCloud2(plg->cloud, newcloud);
+ Eigen::Vector4f tmp;
+ for (const auto& polygon : plg->polygons) {
+- for (const unsigned int& point : polygon.vertices) {
++ for (const auto& point : polygon.vertices) {
+ tmp = newcloud[point].getVector4fMap();
+ vertices.push_back(Vertex(Eigen::Vector3f(tmp(0), tmp(1), tmp(2)),
+ Eigen::Vector3f(1.0, 1.0, 1.0)));
Index: pkgsrc/graphics/pcl/patches/patch-surface_CMakeLists.txt
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-surface_CMakeLists.txt:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-surface_CMakeLists.txt Fri May 7 11:36:29 2021
@@ -0,0 +1,61 @@
+$NetBSD: patch-surface_CMakeLists.txt,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- surface/CMakeLists.txt.orig 2020-08-14 12:23:03.000000000 +0000
++++ surface/CMakeLists.txt
+@@ -4,7 +4,7 @@ set(SUBSYS_DEPS common search kdtree oct
+
+ set(build TRUE)
+ PCL_SUBSYS_OPTION(build "${SUBSYS_NAME}" "${SUBSYS_DESC}" ON)
+-PCL_SUBSYS_DEPEND(build "${SUBSYS_NAME}" DEPS ${SUBSYS_DEPS} OPT_DEPS qhull)
++PCL_SUBSYS_DEPEND(build "${SUBSYS_NAME}" DEPS ${SUBSYS_DEPS} EXT_DEPS vtk OPT_DEPS qhull)
+
+ PCL_ADD_DOC("${SUBSYS_NAME}")
+
+@@ -149,19 +149,32 @@ set(impl_incs
+ )
+
+ set(LIB_NAME "pcl_${SUBSYS_NAME}")
++
+ include_directories(
+ "${CMAKE_CURRENT_SOURCE_DIR}/include"
+ "${CMAKE_CURRENT_SOURCE_DIR}"
+ )
+-include_directories(SYSTEM
+- ${VTK_INCLUDE_DIRS}
+-)
+-link_directories(${VTK_LIBRARY_DIRS})
+ PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs} ${impl_incs} ${VTK_SMOOTHING_INCLUDES} ${POISSON_INCLUDES} ${OPENNURBS_INCLUDES} ${ON_NURBS_INCLUDES})
+-target_link_libraries("${LIB_NAME}" pcl_common pcl_search pcl_kdtree pcl_octree ${VTK_LIBRARIES} ${ON_NURBS_LIBRARIES})
++
++target_link_libraries("${LIB_NAME}" pcl_common pcl_search pcl_kdtree pcl_octree ${ON_NURBS_LIBRARIES})
++
++if(VTK_FOUND)
++ if(${VTK_VERSION} VERSION_LESS 9.0)
++ include_directories(SYSTEM ${VTK_INCLUDE_DIRS})
++ link_directories(${VTK_LIBRARY_DIRS})
++ target_link_libraries("${LIB_NAME}" ${VTK_LIBRARIES})
++ else()
++ target_link_libraries("${LIB_NAME}" VTK::CommonDataModel
++ VTK::CommonExecutionModel
++ VTK::FiltersModeling
++ VTK::FiltersCore)
++ endif()
++endif()
++
+ if(QHULL_FOUND)
+ target_link_libraries("${LIB_NAME}" ${QHULL_LIBRARIES})
+ endif()
++
+ PCL_MAKE_PKGCONFIG(${LIB_NAME} COMPONENT ${SUBSYS_NAME} DESC ${SUBSYS_DESC} PCL_DEPS ${SUBSYS_DEPS})
+
+ # Install include files
+@@ -178,6 +191,7 @@ endif()
+ if(VTK_FOUND AND NOT ANDROID)
+ PCL_ADD_INCLUDES("${SUBSYS_NAME}" "${SUBSYS_NAME}/vtk_smoothing" ${VTK_SMOOTHING_INCLUDES})
+ endif()
++
+ if(WIN32)
+ target_link_libraries("${LIB_NAME}" Rpcrt4.lib)
+ endif()
Index: pkgsrc/graphics/pcl/patches/patch-surface_src_vtk__smoothing_vtk__utils.cpp
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-surface_src_vtk__smoothing_vtk__utils.cpp:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-surface_src_vtk__smoothing_vtk__utils.cpp Fri May 7 11:36:29 2021
@@ -0,0 +1,26 @@
+$NetBSD: patch-surface_src_vtk__smoothing_vtk__utils.cpp,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- surface/src/vtk_smoothing/vtk_utils.cpp.orig 2020-08-14 12:23:03.000000000 +0000
++++ surface/src/vtk_smoothing/vtk_utils.cpp
+@@ -49,6 +49,7 @@
+ #include <vtkPolyData.h>
+ #include <vtkPointData.h>
+ #include <vtkFloatArray.h>
++#include <vtkUnsignedCharArray.h>
+
+ // Support for VTK 7.1 upwards
+ #ifdef vtkGenericDataArray_h
+@@ -155,7 +156,11 @@ pcl::VTKUtils::vtk2mesh (const vtkSmartP
+ }
+
+ mesh.polygons.resize (nr_polygons);
++#ifdef VTK_CELL_ARRAY_V2
++ vtkIdType const *cell_points;
++#else
+ vtkIdType* cell_points;
++#endif
+ vtkIdType nr_cell_points;
+ vtkCellArray * mesh_polygons = poly_data->GetPolys ();
+ mesh_polygons->InitTraversal ();
Index: pkgsrc/graphics/pcl/patches/patch-tools_CMakeLists.txt
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-tools_CMakeLists.txt:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-tools_CMakeLists.txt Fri May 7 11:36:29 2021
@@ -0,0 +1,27 @@
+$NetBSD: patch-tools_CMakeLists.txt,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- tools/CMakeLists.txt.orig 2020-08-14 12:23:03.000000000 +0000
++++ tools/CMakeLists.txt
+@@ -200,12 +200,20 @@ else()
+
+ PCL_ADD_EXECUTABLE(pcl_obj2pcd COMPONENT ${SUBSYS_NAME} SOURCES obj2pcd.cpp)
+ target_link_libraries(pcl_obj2pcd pcl_common pcl_io)
++ #TODO: Update when CMAKE 3.10 is available
++ if(NOT (${VTK_VERSION} VERSION_LESS 9.0))
++ target_link_libraries(pcl_obj2pcd VTK::FiltersCore)
++ endif()
+
+ PCL_ADD_EXECUTABLE(pcl_obj2ply COMPONENT ${SUBSYS_NAME} SOURCES obj2ply.cpp)
+ target_link_libraries(pcl_obj2ply pcl_common pcl_io)
+
+ PCL_ADD_EXECUTABLE(pcl_vtk2pcd COMPONENT ${SUBSYS_NAME} SOURCES vtk2pcd.cpp)
+ target_link_libraries(pcl_vtk2pcd pcl_common pcl_io)
++ #TODO: Update when CMAKE 3.10 is available
++ if(NOT (${VTK_VERSION} VERSION_LESS 9.0))
++ target_link_libraries(pcl_vtk2pcd VTK::FiltersCore)
++ endif()
+
+ if(BUILD_visualization)
+ PCL_ADD_EXECUTABLE(pcl_obj_rec_ransac_model_opps COMPONENT ${SUBSYS_NAME} SOURCES obj_rec_ransac_model_opps.cpp)
Index: pkgsrc/graphics/pcl/patches/patch-tools_mesh__sampling.cpp
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-tools_mesh__sampling.cpp:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-tools_mesh__sampling.cpp Fri May 7 11:36:29 2021
@@ -0,0 +1,34 @@
+$NetBSD: patch-tools_mesh__sampling.cpp,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- tools/mesh_sampling.cpp.orig 2020-08-14 12:23:03.000000000 +0000
++++ tools/mesh_sampling.cpp
+@@ -36,6 +36,7 @@
+ */
+
+ #include <pcl/visualization/pcl_visualizer.h>
++#include <pcl/visualization/vtk/pcl_vtk_compatibility.h>
+ #include <pcl/io/pcd_io.h>
+ #include <pcl/io/vtk_lib_io.h>
+ #include <pcl/common/transforms.h>
+@@ -87,7 +88,8 @@ randPSurface (vtkPolyData * polydata, st
+
+ double A[3], B[3], C[3];
+ vtkIdType npts = 0;
+- vtkIdType *ptIds = nullptr;
++ vtkCellPtsPtr ptIds = nullptr;
++
+ polydata->GetCellPoints (el, npts, ptIds);
+ polydata->GetPoint (ptIds[0], A);
+ polydata->GetPoint (ptIds[1], B);
+@@ -138,7 +140,8 @@ uniform_sampling (vtkSmartPointer<vtkPol
+
+ double p1[3], p2[3], p3[3], totalArea = 0;
+ std::vector<double> cumulativeAreas (cells->GetNumberOfCells (), 0);
+- vtkIdType npts = 0, *ptIds = nullptr;
++ vtkIdType npts = 0;
++ vtkCellPtsPtr ptIds = nullptr;
+ std::size_t cellId = 0;
+ for (cells->InitTraversal (); cells->GetNextCell (npts, ptIds); cellId++)
+ {
Index: pkgsrc/graphics/pcl/patches/patch-tools_openni__save__image.cpp
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-tools_openni__save__image.cpp:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-tools_openni__save__image.cpp Fri May 7 11:36:29 2021
@@ -0,0 +1,21 @@
+$NetBSD: patch-tools_openni__save__image.cpp,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- tools/openni_save_image.cpp.orig 2020-08-14 12:23:03.000000000 +0000
++++ tools/openni_save_image.cpp
+@@ -39,9 +39,13 @@
+ #include <pcl/io/openni_grabber.h>
+ #include <pcl/io/openni_camera/openni_driver.h>
+ #include <pcl/console/parse.h>
+-#include <pcl/visualization/vtk.h>
+ #include <pcl/visualization/pcl_visualizer.h>
+
++#include <vtkSmartPointer.h>
++#include <vtkImageImport.h>
++#include <vtkTIFFWriter.h>
++#include <vtkImageFlip.h>
++
+ #include "boost.h"
+
+ #include <mutex>
Index: pkgsrc/graphics/pcl/patches/patch-tools_pcd__viewer.cpp
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-tools_pcd__viewer.cpp:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-tools_pcd__viewer.cpp Fri May 7 11:36:29 2021
@@ -0,0 +1,14 @@
+$NetBSD: patch-tools_pcd__viewer.cpp,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- tools/pcd_viewer.cpp.orig 2020-08-14 12:23:03.000000000 +0000
++++ tools/pcd_viewer.cpp
+@@ -45,7 +45,6 @@
+ #include <pcl/io/pcd_io.h>
+ #include <cfloat>
+ #include <pcl/visualization/eigen.h>
+-//#include <pcl/visualization/vtk.h>
+ #include <pcl/visualization/point_cloud_handlers.h>
+ #include <pcl/visualization/pcl_visualizer.h>
+ #include <pcl/visualization/image_viewer.h>
Index: pkgsrc/graphics/pcl/patches/patch-tools_virtual__scanner.cpp
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-tools_virtual__scanner.cpp:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-tools_virtual__scanner.cpp Fri May 7 11:36:29 2021
@@ -0,0 +1,20 @@
+$NetBSD: patch-tools_virtual__scanner.cpp,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- tools/virtual_scanner.cpp.orig 2020-08-14 12:23:03.000000000 +0000
++++ tools/virtual_scanner.cpp
+@@ -54,7 +54,12 @@
+ #include <pcl/memory.h> // for pcl::make_shared
+ #include <pcl/point_types.h>
+ #include <pcl/console/parse.h>
+-#include <pcl/visualization/vtk.h>
++
++#include <vtkGeneralTransform.h>
++#include <vtkPlatonicSolidSource.h>
++#include <vtkLoopSubdivisionFilter.h>
++#include <vtkCellLocator.h>
++#include <vtkMath.h>
+
+ #include <boost/algorithm/string.hpp> // for boost::is_any_of, boost::split, boost::token_compress_on, boost::trim
+ #include <boost/filesystem.hpp> // for boost::filesystem::create_directories, boost::filesystem::exists, boost::filesystem::extension, boost::filesystem::path
Index: pkgsrc/graphics/pcl/patches/patch-visualization_CMakeLists.txt
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-visualization_CMakeLists.txt:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-visualization_CMakeLists.txt Fri May 7 11:36:29 2021
@@ -0,0 +1,122 @@
+$NetBSD: patch-visualization_CMakeLists.txt,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- visualization/CMakeLists.txt.orig 2020-08-14 12:23:03.000000000 +0000
++++ visualization/CMakeLists.txt
+@@ -63,6 +63,14 @@ if(VTK_RENDERING_BACKEND_OPENGL_VERSION
+ )
+ endif()
+
++if(NOT (${VTK_VERSION} VERSION_LESS 9.0))
++ if(NOT (";${VTK_AVAILABLE_COMPONENTS};" MATCHES ";RenderingContextOpenGL2;"))
++ list(REMOVE_ITEM srcs
++ src/pcl_painter2D.cpp
++ )
++ endif()
++endif()
++
+ set(incs
+ "include/pcl/${SUBSYS_NAME}/eigen.h"
+ "include/pcl/${SUBSYS_NAME}/boost.h"
+@@ -85,6 +93,7 @@ set(incs
+ "include/pcl/${SUBSYS_NAME}/vtk.h"
+ "include/pcl/${SUBSYS_NAME}/simple_buffer_visualizer.h"
+ "include/pcl/${SUBSYS_NAME}/pcl_plotter.h"
++ "include/pcl/${SUBSYS_NAME}/qvtk_compatibility.h"
+ )
+
+ set(common_incs
+@@ -116,6 +125,7 @@ set(vtk_incs
+ "include/pcl/${SUBSYS_NAME}/vtk/pcl_image_canvas_source_2d.h"
+ "include/pcl/${SUBSYS_NAME}/vtk/pcl_context_item.h"
+ "include/pcl/${SUBSYS_NAME}/vtk/vtkRenderWindowInteractorFix.h"
++ "include/pcl/${SUBSYS_NAME}/vtk/pcl_vtk_compatibility.h"
+ )
+
+ if(VTK_RENDERING_BACKEND_OPENGL_VERSION VERSION_LESS 2)
+@@ -125,6 +135,15 @@ if(VTK_RENDERING_BACKEND_OPENGL_VERSION
+ )
+ endif()
+
++if(NOT (${VTK_VERSION} VERSION_LESS 9.0))
++ if(NOT (";${VTK_AVAILABLE_COMPONENTS};" MATCHES ";RenderingContextOpenGL2;"))
++
++ list(REMOVE_ITEM incs
++ "include/pcl/${SUBSYS_NAME}/pcl_painter2D.h"
++ )
++ endif()
++endif()
++
+ # on apple, a workaround is used for the cocoa render window interactor
+ if(APPLE)
+ list(APPEND srcs
+@@ -134,14 +153,43 @@ endif()
+ set(LIB_NAME "pcl_${SUBSYS_NAME}")
+ PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs} ${common_incs} ${impl_incs} ${common_impl_incs} ${vtk_incs})
+
+-target_include_directories("${LIB_NAME}" SYSTEM PUBLIC ${VTK_INCLUDE_DIRS})
+-
+ # apple workaround (continued)
+ if(APPLE)
+ target_link_libraries("${LIB_NAME}" "-framework Cocoa")
+ endif()
+
+-target_link_libraries("${LIB_NAME}" pcl_common pcl_io pcl_kdtree ${VTK_LIBRARIES} ${OPENGL_LIBRARIES})
++target_link_libraries("${LIB_NAME}" pcl_common pcl_io pcl_kdtree ${OPENGL_LIBRARIES})
++
++if(${VTK_VERSION} VERSION_LESS 9.0)
++ target_include_directories("${LIB_NAME}" SYSTEM PUBLIC ${VTK_INCLUDE_DIRS})
++ target_link_libraries("${LIB_NAME}" ${VTK_LIBRARIES})
++else()
++ #Some libs are referenced through depending on IO
++ target_link_libraries("${LIB_NAME}"
++ VTK::ChartsCore
++ VTK::CommonColor
++ VTK::CommonDataModel
++ VTK::FiltersExtraction
++ VTK::FiltersGeometry
++ VTK::FiltersGeneral
++ VTK::FiltersModeling
++ VTK::FiltersSources
++ VTK::IOImage
++ VTK::IOPLY
++ VTK::ImagingSources
++ VTK::InteractionImage
++ VTK::InteractionStyle
++ VTK::RenderingAnnotation
++ VTK::RenderingContext2D
++ VTK::RenderingFreeType
++ VTK::RenderingLOD
++ VTK::RenderingOpenGL2
++ VTK::ViewsContext2D)
++
++ if(";${VTK_AVAILABLE_COMPONENTS};" MATCHES ";RenderingContextOpenGL2;")
++ target_link_libraries("${LIB_NAME}" VTK::RenderingContextOpenGL2)
++ endif()
++endif()
+
+ set(EXT_DEPS "")
+ if(WITH_OPENNI)
+@@ -162,6 +210,7 @@ endif()
+ if(WITH_RSSDK)
+ list(APPEND EXT_DEPS rssdk)
+ endif()
++
+ PCL_MAKE_PKGCONFIG(${LIB_NAME} COMPONENT ${SUBSYS_NAME} DESC ${SUBSYS_DESC} PCL_DEPS ${SUBSYS_DEPS} EXT_DEPS ${EXT_DEPS})
+
+ # Install include files
+@@ -171,6 +220,13 @@ PCL_ADD_INCLUDES("${SUBSYS_NAME}" "${SUB
+ PCL_ADD_INCLUDES("${SUBSYS_NAME}" "${SUBSYS_NAME}/common/impl" ${common_impl_incs})
+ PCL_ADD_INCLUDES("${SUBSYS_NAME}" "${SUBSYS_NAME}/vtk" ${vtk_incs})
+
++#TODO: Update when CMAKE 3.10 is available
++if(NOT (${VTK_VERSION} VERSION_LESS 9.0))
++ vtk_module_autoinit(TARGETS "${LIB_NAME}"
++ MODULES VTK::RenderingOpenGL2
++ VTK::RenderingFreeType)
++endif()
++
+ if(BUILD_TESTS)
+ add_subdirectory(test)
+ endif()
Index: pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_common_actor__map.h
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_common_actor__map.h:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_common_actor__map.h Fri May 7 11:36:29 2021
@@ -0,0 +1,14 @@
+$NetBSD: patch-visualization_include_pcl_visualization_common_actor__map.h,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- visualization/include/pcl/visualization/common/actor_map.h.orig 2020-08-14 12:23:03.000000000 +0000
++++ visualization/include/pcl/visualization/common/actor_map.h
+@@ -43,6 +43,7 @@
+
+ #include <vtkLODActor.h>
+ #include <vtkSmartPointer.h>
++#include <vtkIdTypeArray.h>
+
+ #include <map>
+ #include <unordered_map>
Index: pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_common_ren__win__interact__map.h
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_common_ren__win__interact__map.h:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_common_ren__win__interact__map.h Fri May 7 11:36:29 2021
@@ -0,0 +1,17 @@
+$NetBSD: patch-visualization_include_pcl_visualization_common_ren__win__interact__map.h,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- visualization/include/pcl/visualization/common/ren_win_interact_map.h.orig 2020-08-14 12:23:03.000000000 +0000
++++ visualization/include/pcl/visualization/common/ren_win_interact_map.h
+@@ -41,8 +41,9 @@
+ #include <map>
+ #include <string>
+
++#include <vtkXYPlotActor.h>
++
+ template <typename T> class vtkSmartPointer;
+-class vtkXYPlotActor;
+ class vtkRenderer;
+ class vtkRenderWindow;
+ class vtkRenderWindowInteractor;
Index: pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_impl_pcl__visualizer.hpp
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_impl_pcl__visualizer.hpp:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_impl_pcl__visualizer.hpp Fri May 7 11:36:29 2021
@@ -0,0 +1,168 @@
+$NetBSD: patch-visualization_include_pcl_visualization_impl_pcl__visualizer.hpp,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- visualization/include/pcl/visualization/impl/pcl_visualizer.hpp.orig 2020-08-14 12:23:03.000000000 +0000
++++ visualization/include/pcl/visualization/impl/pcl_visualizer.hpp
+@@ -62,6 +62,7 @@
+ #include <vtkLODActor.h>
+ #include <vtkLineSource.h>
+
++#include <pcl/common/utils.h> // pcl::utils::ignore
+ #include <pcl/visualization/common/shapes.h>
+
+ // Support for VTK 7.1 upwards
+@@ -270,11 +271,40 @@ pcl::visualization::PCLVisualizer::conve
+ points->SetNumberOfPoints (nr_points);
+ }
+
++#ifdef VTK_CELL_ARRAY_V2
++ // TODO: Remove when VTK 6,7,8 is unsupported
++ pcl::utils::ignore(initcells);
++
++ auto numOfCells = vertices->GetNumberOfCells();
++
++ // If we have less cells than points, add new cells.
++ if (numOfCells < nr_points)
++ {
++ for (int i = numOfCells; i < nr_points; i++)
++ {
++ vertices->InsertNextCell(1);
++ vertices->InsertCellPoint(i);
++ }
++ }
++ // if we too many cells than points, set size (doesn't free excessive memory)
++ else if (numOfCells > nr_points)
++ {
++ vertices->ResizeExact(nr_points, nr_points);
++ }
++
++ polydata->SetPoints(points);
++ polydata->SetVerts(vertices);
++
++#else
+ vtkSmartPointer<vtkIdTypeArray> cells = vertices->GetData ();
+ updateCells (cells, initcells, nr_points);
+
+ // Set the cells and the vertices
+ vertices->SetCells (nr_points, cells);
++
++ // Set the cell count explicitly as the array doesn't get modified enough so the above method updates accordingly. See #4001 and #3452
++ vertices->SetNumberOfCells(nr_points);
++#endif
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+@@ -304,10 +334,36 @@ pcl::visualization::PCLVisualizer::conve
+ if (!vertices)
+ vertices = vtkSmartPointer<vtkCellArray>::New ();
+
++#ifdef VTK_CELL_ARRAY_V2
++ // TODO: Remove when VTK 6,7,8 is unsupported
++ pcl::utils::ignore(initcells);
++
++ auto numOfCells = vertices->GetNumberOfCells();
++
++ // If we have less cells than points, add new cells.
++ if (numOfCells < nr_points)
++ {
++ for (int i = numOfCells; i < nr_points; i++)
++ {
++ vertices->InsertNextCell(1);
++ vertices->InsertCellPoint(i);
++ }
++ }
++ // if we too many cells than points, set size (doesn't free excessive memory)
++ else if (numOfCells > nr_points)
++ {
++ vertices->ResizeExact(nr_points, nr_points);
++ }
++
++ polydata->SetPoints(points);
++ polydata->SetVerts(vertices);
++
++#else
+ vtkSmartPointer<vtkIdTypeArray> cells = vertices->GetData ();
+ updateCells (cells, initcells, nr_points);
+ // Set the cells and the vertices
+ vertices->SetCells (nr_points, cells);
++#endif
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////////////////
+@@ -1304,7 +1360,6 @@ pcl::visualization::PCLVisualizer::fromH
+ vtkSmartPointer<vtkIdTypeArray> initcells;
+ // Convert the PointCloud to VTK PolyData
+ convertPointCloudToVTKPolyData<PointT> (geometry_handler, polydata, initcells);
+- // use the given geometry handler
+
+ // Get the colors from the handler
+ bool has_colors = false;
+@@ -1701,32 +1756,9 @@ pcl::visualization::PCLVisualizer::addPo
+ {
+ // Create polys from polyMesh.polygons
+ vtkSmartPointer<vtkCellArray> cell_array = vtkSmartPointer<vtkCellArray>::New ();
+- vtkIdType *cell = cell_array->WritePointer (vertices.size (), vertices.size () * (max_size_of_polygon + 1));
+- int idx = 0;
+- if (!lookup.empty ())
+- {
+- for (std::size_t i = 0; i < vertices.size (); ++i, ++idx)
+- {
+- std::size_t n_points = vertices[i].vertices.size ();
+- *cell++ = n_points;
+- //cell_array->InsertNextCell (n_points);
+- for (std::size_t j = 0; j < n_points; j++, ++idx)
+- *cell++ = lookup[vertices[i].vertices[j]];
+- //cell_array->InsertCellPoint (lookup[vertices[i].vertices[j]]);
+- }
+- }
+- else
+- {
+- for (std::size_t i = 0; i < vertices.size (); ++i, ++idx)
+- {
+- std::size_t n_points = vertices[i].vertices.size ();
+- *cell++ = n_points;
+- //cell_array->InsertNextCell (n_points);
+- for (std::size_t j = 0; j < n_points; j++, ++idx)
+- *cell++ = vertices[i].vertices[j];
+- //cell_array->InsertCellPoint (vertices[i].vertices[j]);
+- }
+- }
++
++ const auto idx = details::fillCells(lookup,vertices,cell_array, max_size_of_polygon);
++
+ vtkSmartPointer<vtkPolyData> polydata;
+ allocVtkPolyData (polydata);
+ cell_array->GetData ()->SetNumberOfValues (idx);
+@@ -1878,28 +1910,9 @@ pcl::visualization::PCLVisualizer::updat
+
+ // Update the cells
+ cells = vtkSmartPointer<vtkCellArray>::New ();
+- vtkIdType *cell = cells->WritePointer (verts.size (), verts.size () * (max_size_of_polygon + 1));
+- int idx = 0;
+- if (!lookup.empty ())
+- {
+- for (std::size_t i = 0; i < verts.size (); ++i, ++idx)
+- {
+- std::size_t n_points = verts[i].vertices.size ();
+- *cell++ = n_points;
+- for (std::size_t j = 0; j < n_points; j++, cell++, ++idx)
+- *cell = lookup[verts[i].vertices[j]];
+- }
+- }
+- else
+- {
+- for (std::size_t i = 0; i < verts.size (); ++i, ++idx)
+- {
+- std::size_t n_points = verts[i].vertices.size ();
+- *cell++ = n_points;
+- for (std::size_t j = 0; j < n_points; j++, cell++, ++idx)
+- *cell = verts[i].vertices[j];
+- }
+- }
++
++ const auto idx = details::fillCells(lookup, verts, cells, max_size_of_polygon);
++
+ cells->GetData ()->SetNumberOfValues (idx);
+ cells->Squeeze ();
+ // Set the the vertices
Index: pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_interactor__style.h
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_interactor__style.h:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_interactor__style.h Fri May 7 11:36:29 2021
@@ -0,0 +1,15 @@
+$NetBSD: patch-visualization_include_pcl_visualization_interactor__style.h,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- visualization/include/pcl/visualization/interactor_style.h.orig 2020-08-14 12:23:03.000000000 +0000
++++ visualization/include/pcl/visualization/interactor_style.h
+@@ -51,6 +51,8 @@
+ #include <boost/signals2/signal.hpp>
+ #endif
+ #include <vtkInteractorStyleRubberBandPick.h>
++#include <vtkRendererCollection.h>
++#include <vtkRenderWindow.h>
+
+ class vtkRendererCollection;
+ class vtkLegendScaleActor;
Index: pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_pcl__plotter.h
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_pcl__plotter.h:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_pcl__plotter.h Fri May 7 11:36:29 2021
@@ -0,0 +1,29 @@
+$NetBSD: patch-visualization_include_pcl_visualization_pcl__plotter.h,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- visualization/include/pcl/visualization/pcl_plotter.h.orig 2020-08-14 12:23:03.000000000 +0000
++++ visualization/include/pcl/visualization/pcl_plotter.h
+@@ -49,16 +49,16 @@
+ #include <pcl/point_cloud.h>
+ #include <pcl/common/io.h>
+
+-class vtkRenderWindow;
+-class vtkRenderWindowInteractor;
+-class vtkContextView;
+-class vtkChartXY;
+-class vtkColorSeries;
+-
++#include <vtkContextView.h>
++#include <vtkChartXY.h>
++#include <vtkColorSeries.h>
+ #include <vtkSmartPointer.h>
+ #include <vtkCommand.h>
+ #include <vtkChart.h>
+
++class vtkRenderWindow;
++class vtkRenderWindowInteractor;
++
+ namespace pcl
+ {
+ namespace visualization
Index: pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_pcl__visualizer.h
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_pcl__visualizer.h:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_pcl__visualizer.h Fri May 7 11:36:29 2021
@@ -0,0 +1,53 @@
+$NetBSD: patch-visualization_include_pcl_visualization_pcl__visualizer.h,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- visualization/include/pcl/visualization/pcl_visualizer.h.orig 2020-08-14 12:23:03.000000000 +0000
++++ visualization/include/pcl/visualization/pcl_visualizer.h
+@@ -53,14 +53,15 @@
+ #include <pcl/visualization/area_picking_event.h>
+ #include <pcl/visualization/interactor_style.h>
+
++#include <vtkOrientationMarkerWidget.h>
++#include <vtkRenderWindowInteractor.h>
++
+ // VTK includes
+ class vtkPolyData;
+ class vtkTextActor;
+ class vtkRenderWindow;
+-class vtkOrientationMarkerWidget;
+ class vtkAppendPolyData;
+ class vtkRenderWindow;
+-class vtkRenderWindowInteractor;
+ class vtkTransform;
+ class vtkInteractorStyle;
+ class vtkLODActor;
+@@ -68,6 +69,7 @@ class vtkProp;
+ class vtkActor;
+ class vtkDataSet;
+ class vtkUnstructuredGrid;
++class vtkCellArray;
+
+ namespace pcl
+ {
+@@ -76,6 +78,11 @@ namespace pcl
+
+ namespace visualization
+ {
++ namespace details
++ {
++ vtkIdType fillCells(std::vector<int>& lookup, const std::vector<pcl::Vertices>& vertices, vtkSmartPointer<vtkCellArray> cell_array, int max_size_of_polygon);
++ }
++
+ /** \brief PCL Visualizer main class.
+ * \author Radu B. Rusu
+ * \ingroup visualization
+@@ -2170,7 +2177,7 @@ namespace pcl
+ vtkSmartPointer<vtkPolyData> &polydata,
+ vtkSmartPointer<vtkIdTypeArray> &initcells);
+
+- /** \brief Converts a PCL templated PointCloud object to a vtk polydata object.
++ /** \brief Converts a PCL object to a vtk polydata object.
+ * \param[in] geometry_handler the geometry handler object used to extract the XYZ data
+ * \param[out] polydata the resultant polydata containing the cloud
+ * \param[out] initcells a list of cell indices used for the conversion. This can be set once and then passed
Index: pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_qvtk__compatibility.h
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_qvtk__compatibility.h:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_qvtk__compatibility.h Fri May 7 11:36:29 2021
@@ -0,0 +1,58 @@
+$NetBSD: patch-visualization_include_pcl_visualization_qvtk__compatibility.h,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- visualization/include/pcl/visualization/qvtk_compatibility.h.orig 2021-05-06 06:26:06.674196977 +0000
++++ visualization/include/pcl/visualization/qvtk_compatibility.h
+@@ -0,0 +1,51 @@
++/*
++ * SPDX-License-Identifier: BSD-3-Clause
++ *
++ * Point Cloud Library (PCL) - www.pointclouds.org
++ * Copyright (c) 2020-, Open Perception
++ *
++ * All rights reserved
++ */
++#include <pcl/pcl_macros.h>
++#include <pcl/pcl_config.h>
++
++#if HAVE_QVTK
++#include <vtkVersion.h>
++#include <vtkRenderWindow.h>
++
++#if VTK_MAJOR_VERSION > 8
++ #include <QVTKOpenGLNativeWidget.h>
++ using PCLQVTKWidget = QVTKOpenGLNativeWidget;
++#else
++ #include <QVTKWidget.h>
++ using PCLQVTKWidget = QVTKWidget;
++#endif // VTK_MAJOR_VERSION > 8
++
++
++inline auto PCL_EXPORTS getInteractorCompat(PCLQVTKWidget& qvtk) {
++#if VTK_MAJOR_VERSION > 8
++ return qvtk.interactor();
++#else
++ return qvtk.GetInteractor();
++#endif // VTK_MAJOR_VERSION > 8
++}
++
++inline auto PCL_EXPORTS getRenderWindowCompat(PCLQVTKWidget& qvtk) {
++#if VTK_MAJOR_VERSION > 8
++ return qvtk.renderWindow();
++#else
++ return qvtk.GetRenderWindow();
++#endif // VTK_MAJOR_VERSION > 8
++}
++
++inline auto PCL_EXPORTS setRenderWindowCompat(PCLQVTKWidget& qvtk, vtkRenderWindow& window) {
++#if VTK_MAJOR_VERSION > 8
++ return qvtk.setRenderWindow(&window);
++#else
++ return qvtk.SetRenderWindow(&window);
++#endif // VTK_MAJOR_VERSION > 8
++}
++
++#else
++#error PCL is not compiled with QVTK.
++#endif
Index: pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_vtk.h
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_vtk.h:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_vtk.h Fri May 7 11:36:29 2021
@@ -0,0 +1,153 @@
+$NetBSD: patch-visualization_include_pcl_visualization_vtk.h,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- visualization/include/pcl/visualization/vtk.h.orig 2020-08-14 12:23:03.000000000 +0000
++++ visualization/include/pcl/visualization/vtk.h
+@@ -38,135 +38,17 @@
+ *
+ */
+
+-#pragma once
+
+-#if defined __GNUC__
+-#pragma GCC system_header
+-#ifdef __DEPRECATED
+-#undef __DEPRECATED
+-#define __DEPRECATED_DISABLED__
+-#endif
+-#endif
++/* The above header kept intact just for pkgsrc patching that does
++ * not like the Id bit. */
+
+-#include <vtkVersion.h>
+-#include <vtkAppendPolyData.h>
+-#include <vtkAssemblyPath.h>
+-#include <vtkAxesActor.h>
+-#include <vtkActor.h>
+-#include <vtkBoxRepresentation.h>
+-#include <vtkBoxWidget.h>
+-#include <vtkBoxWidget2.h>
+-#include <vtkCellData.h>
+-#include <vtkMath.h>
+-#include <vtkLoopSubdivisionFilter.h>
+-#include <vtkLineSource.h>
+-#include <vtkLegendScaleActor.h>
+-#include <vtkLightKit.h>
+-#include <vtkPlatonicSolidSource.h>
+-#include <vtkPropPicker.h>
+-#include <vtkGeneralTransform.h>
+-#include <vtkSmartPointer.h>
+-#include <vtkDataSet.h>
+-#include <vtkDataSetSurfaceFilter.h>
+-#include <vtkExecutive.h>
+-#include <vtkPolygon.h>
+-#include <vtkPointPicker.h>
+-#include <vtkUnstructuredGrid.h>
+-#include <vtkConeSource.h>
+-#include <vtkDiskSource.h>
+-#include <vtkPlaneSource.h>
+-#include <vtkSphereSource.h>
+-#include <vtkIdentityTransform.h>
+-#include <vtkTransform.h>
+-#include <vtkTransformPolyDataFilter.h>
+-#include <vtkTubeFilter.h>
+-#include <vtkCubeSource.h>
+-#include <vtkAxes.h>
+-#include <vtkFloatArray.h>
+-#include <vtkPointData.h>
+-#include <vtkPolyData.h>
+-#include <vtkPolyDataReader.h>
+-#include <vtkPolyDataMapper.h>
+-#include <vtkDataSetMapper.h>
+-#include <vtkCellArray.h>
+-#include <vtkCommand.h>
+-#include <vtkCellLocator.h>
+-#include <vtkPLYReader.h>
+-#include <vtkTransformFilter.h>
+-#include <vtkPolyLine.h>
+-#include <vtkVectorText.h>
+-#include <vtkFollower.h>
+-#include <vtkCallbackCommand.h>
+-#include <vtkInteractorStyle.h>
+-#include <vtkInformationVector.h>
+-#include <vtkDataArray.h>
+-#include <vtkUnsignedCharArray.h>
+-#include <vtkPoints.h>
+-#include <vtkRendererCollection.h>
+-#include <vtkPNGWriter.h>
+-#include <vtkWindowToImageFilter.h>
+-#include <vtkInteractorStyleTrackballCamera.h>
+-#include <vtkProperty.h>
+-#include <vtkCamera.h>
+-#include <vtkObjectFactory.h>
+-#include <vtkScalarBarActor.h>
+-#include <vtkScalarsToColors.h>
+-#include <vtkClipPolyData.h>
+-#include <vtkPlanes.h>
+-#include <vtkImageImport.h>
+-#include <vtkImageViewer.h>
+-#include <vtkInteractorStyleImage.h>
+-#include <vtkImageFlip.h>
+-#include <vtkTIFFWriter.h>
+-#include <vtkBMPWriter.h>
+-#include <vtkJPEGWriter.h>
+-#include <vtkImageViewer2.h>
+-#include <vtkRenderWindow.h>
+-#include <vtkXYPlotActor.h>
+-#include <vtkTextProperty.h>
+-#include <vtkProperty2D.h>
+-#include <vtkFieldData.h>
+-#include <vtkDoubleArray.h>
+-#include <vtkLODActor.h>
+-#include <vtkPolyDataWriter.h>
+-#include <vtkTextActor.h>
+-#include <vtkCleanPolyData.h>
+-#include <vtkRenderer.h>
+-#include <vtkObject.h>
+-#include <vtkOrientationMarkerWidget.h>
+-#include <vtkImageReslice.h>
+-#include <vtkImageChangeInformation.h>
+-#include <vtkImageCanvasSource2D.h>
+-#include <vtkImageBlend.h>
+-#include <vtkImageStencilData.h>
+-#include <vtkRenderWindowInteractor.h>
+-#include <vtkChartXY.h>
+-#include <vtkPlot.h>
+-#include <vtkTable.h>
+-#include <vtkContextView.h>
+-#include <vtkContextScene.h>
+-#include <vtkColorSeries.h>
+-#include <vtkAxis.h>
+-#include <vtkSelection.h>
+-
+-#include <vtkHardwareSelector.h>
+-
+-#include <vtkTriangle.h>
+-#include <vtkWorldPointPicker.h>
+-
+-#include <vtkInteractorStyleRubberBandPick.h>
+-#include <vtkInteractorStyleTrackballActor.h>
+-#include <vtkAreaPicker.h>
+-#include <vtkExtractGeometry.h>
+-#include <vtkExtractPolyDataGeometry.h>
+-#include <vtkVertexGlyphFilter.h>
+-#include <vtkIdFilter.h>
+-#include <vtkIdTypeArray.h>
+-#include <vtkImageReader2Factory.h>
+-#include <vtkImageReader2.h>
+-#include <vtkImageData.h>
++/*
++ * SPDX-License-Identifier: BSD-3-Clause
++ *
++ * Point Cloud Library (PCL) - www.pointclouds.org
++ * Copyright (c) 2020-, Open Perception
++ *
++ * All rights reserved
++ */
+
+-#if defined __GNUC__ && defined __DEPRECATED_DISABLED__
+-#define __DEPRECATED
+-#undef __DEPRECATED_DISABLED__
+-#endif
++PCL_DEPRECATED_HEADER(1, 14, "Use required vtk includes instead.")
Index: pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_vtk_pcl__vtk__compatibility.h
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_vtk_pcl__vtk__compatibility.h:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-visualization_include_pcl_visualization_vtk_pcl__vtk__compatibility.h Fri May 7 11:36:29 2021
@@ -0,0 +1,24 @@
+$NetBSD: patch-visualization_include_pcl_visualization_vtk_pcl__vtk__compatibility.h,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- visualization/include/pcl/visualization/vtk/pcl_vtk_compatibility.h.orig 2021-05-06 06:26:06.674196977 +0000
++++ visualization/include/pcl/visualization/vtk/pcl_vtk_compatibility.h
+@@ -0,0 +1,17 @@
++/*
++ * SPDX-License-Identifier: BSD-3-Clause
++ *
++ * Point Cloud Library (PCL) - www.pointclouds.org
++ * Copyright (c) 2020-, Open Perception
++ *
++ * All rights reserved
++ */
++
++#include <vtkCellArray.h>
++
++#ifdef VTK_CELL_ARRAY_V2
++ using vtkCellPtsPtr = vtkIdType const*;
++#else
++ using vtkCellPtsPtr = vtkIdType*;
++#endif
++
Index: pkgsrc/graphics/pcl/patches/patch-visualization_src_cloud__viewer.cpp
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-visualization_src_cloud__viewer.cpp:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-visualization_src_cloud__viewer.cpp Fri May 7 11:36:29 2021
@@ -0,0 +1,16 @@
+$NetBSD: patch-visualization_src_cloud__viewer.cpp,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- visualization/src/cloud_viewer.cpp.orig 2020-08-14 12:23:03.000000000 +0000
++++ visualization/src/cloud_viewer.cpp
+@@ -40,6 +40,9 @@
+ #include <pcl/visualization/boost.h>
+ #include <pcl/memory.h>
+
++#include <vtkOrientationMarkerWidget.h>
++#include <vtkRenderWindowInteractor.h>
++
+ #include <mutex>
+ #include <thread>
+
Index: pkgsrc/graphics/pcl/patches/patch-visualization_src_histogram__visualizer.cpp
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-visualization_src_histogram__visualizer.cpp:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-visualization_src_histogram__visualizer.cpp Fri May 7 11:36:29 2021
@@ -0,0 +1,14 @@
+$NetBSD: patch-visualization_src_histogram__visualizer.cpp,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- visualization/src/histogram_visualizer.cpp.orig 2020-08-14 12:23:03.000000000 +0000
++++ visualization/src/histogram_visualizer.cpp
+@@ -45,7 +45,6 @@
+ #include <pcl/visualization/boost.h>
+
+ #include <vtkVersion.h>
+-#include <vtkXYPlotActor.h>
+ #include <vtkDoubleArray.h>
+ #include <vtkTextProperty.h>
+ #include <vtkRenderWindow.h>
Index: pkgsrc/graphics/pcl/patches/patch-visualization_src_interactor__style.cpp
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-visualization_src_interactor__style.cpp:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-visualization_src_interactor__style.cpp Fri May 7 11:36:29 2021
@@ -0,0 +1,23 @@
+$NetBSD: patch-visualization_src_interactor__style.cpp,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- visualization/src/interactor_style.cpp.orig 2020-08-14 12:23:03.000000000 +0000
++++ visualization/src/interactor_style.cpp
+@@ -36,6 +36,7 @@
+ *
+ */
+
++#include <fstream>
+ #include <list>
+ #include <pcl/common/angles.h>
+ #include <pcl/visualization/common/io.h>
+@@ -137,7 +138,7 @@ pcl::visualization::PCLVisualizerInterac
+ {
+ FindPokedRenderer (Interactor->GetEventPosition ()[0], Interactor->GetEventPosition ()[1]);
+
+- ofstream ofs_cam (file.c_str ());
++ std::ofstream ofs_cam (file.c_str ());
+ if (!ofs_cam.is_open ())
+ {
+ return (false);
Index: pkgsrc/graphics/pcl/patches/patch-visualization_src_pcl__visualizer.cpp
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-visualization_src_pcl__visualizer.cpp:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-visualization_src_pcl__visualizer.cpp Fri May 7 11:36:29 2021
@@ -0,0 +1,239 @@
+$NetBSD: patch-visualization_src_pcl__visualizer.cpp,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- visualization/src/pcl_visualizer.cpp.orig 2020-08-14 12:23:03.000000000 +0000
++++ visualization/src/pcl_visualizer.cpp
+@@ -51,7 +51,7 @@
+ #include <vtkPolyDataNormals.h>
+ #include <vtkMapper.h>
+ #include <vtkDataSetMapper.h>
+-
++#include <vtkCellArray.h>
+ #include <vtkHardwareSelector.h>
+ #include <vtkSelectionNode.h>
+
+@@ -60,6 +60,7 @@
+
+ #include <pcl/visualization/boost.h>
+ #include <pcl/visualization/vtk/vtkRenderWindowInteractorFix.h>
++#include <pcl/visualization/vtk/pcl_vtk_compatibility.h>
+
+ #if VTK_RENDERING_BACKEND_OPENGL_VERSION < 2
+ #include <pcl/visualization/vtk/vtkVertexBufferObjectMapper.h>
+@@ -82,7 +83,6 @@
+ #include <vtkAxesActor.h>
+ #include <vtkRenderWindowInteractor.h>
+ #include <vtkAreaPicker.h>
+-#include <vtkXYPlotActor.h>
+ #include <vtkOpenGLRenderWindow.h>
+ #include <vtkJPEGReader.h>
+ #include <vtkBMPReader.h>
+@@ -122,6 +122,63 @@
+ #undef far
+ #endif
+
++vtkIdType
++pcl::visualization::details::fillCells(std::vector<int>& lookup, const std::vector<pcl::Vertices>& vertices, vtkSmartPointer<vtkCellArray> cell_array, int max_size_of_polygon)
++{
++#ifdef VTK_CELL_ARRAY_V2
++ pcl::utils::ignore(max_size_of_polygon);
++
++ if (!lookup.empty())
++ {
++ for (const auto& verti : vertices)
++ {
++ std::size_t n_points = verti.vertices.size();
++ cell_array->InsertNextCell(n_points);
++ for (const auto& vertj : verti.vertices)
++ cell_array->InsertCellPoint(lookup[vertj]);
++ }
++ }
++ else
++ {
++ for (const auto& verti : vertices)
++ {
++ std::size_t n_points = verti.vertices.size();
++ cell_array->InsertNextCell(n_points);
++ for (const auto& vertj : verti.vertices)
++ cell_array->InsertCellPoint(vertj);
++ }
++ }
++#else
++ vtkIdType* cell = cell_array->WritePointer(vertices.size(), vertices.size() * (max_size_of_polygon + 1));
++
++ if (!lookup.empty())
++ {
++ for (const auto& verti : vertices)
++ {
++ std::size_t n_points = verti.vertices.size();
++ *cell++ = n_points;
++ for (const auto& vertj : verti.vertices)
++ *cell++ = lookup[vertj];
++ }
++ }
++ else
++ {
++ for (const auto& verti : vertices)
++ {
++ std::size_t n_points = verti.vertices.size();
++ *cell++ = n_points;
++ for (const auto& vertj : verti.vertices)
++ *cell++ = vertj;
++ }
++ }
++#endif
++
++ const auto idx = vertices.size() + std::accumulate(vertices.begin(), vertices.end(), static_cast<vtkIdType>(0),
++ [](const auto& sum, const auto& vertex) { return sum + vertex.vertices.size(); });
++
++ return idx;
++}
++
+ /////////////////////////////////////////////////////////////////////////////////////////////
+ pcl::visualization::PCLVisualizer::PCLVisualizer (const std::string &name, const bool create_interactor)
+ : update_fps_ (vtkSmartPointer<FPSCallback>::New ())
+@@ -521,13 +578,14 @@ void
+ pcl::visualization::PCLVisualizer::spinOnce (int time, bool force_redraw)
+ {
+ resetStoppedFlag ();
+- #if (defined (__APPLE__))
+- if (!win_->IsDrawable ())
+- {
+- close ();
+- return;
+- }
+- #endif
++
++#if VTK_MAJOR_VERSION < 9 && defined (__APPLE__)
++ if (!win_->IsDrawable ())
++ {
++ close ();
++ return;
++ }
++#endif
+
+ if (!interactor_)
+ return;
+@@ -1262,7 +1320,6 @@ pcl::visualization::PCLVisualizer::creat
+ //actor->SetNumberOfCloudPoints (std::max<vtkIdType> (1, data->GetNumberOfPoints () / 10));
+ actor->GetProperty ()->SetInterpolationToFlat ();
+ }
+-
+ /////////////////////////////////////////////////////////////////////////////////////////////
+ void
+ pcl::visualization::PCLVisualizer::convertPointCloudToVTKPolyData (
+@@ -1291,10 +1348,36 @@ pcl::visualization::PCLVisualizer::conve
+ if (!vertices)
+ vertices = vtkSmartPointer<vtkCellArray>::New ();
+
++#ifdef VTK_CELL_ARRAY_V2
++ // TODO: Remove when VTK 6,7,8 is unsupported
++ pcl::utils::ignore(initcells);
++
++ auto numOfCells = vertices->GetNumberOfCells();
++
++ // If we have less cells than points, add new cells.
++ if (numOfCells < nr_points)
++ {
++ for (int i = numOfCells; i < nr_points; i++)
++ {
++ vertices->InsertNextCell(1);
++ vertices->InsertCellPoint(i);
++ }
++ }
++ // if we too many cells than points, set size (doesn't free excessive memory)
++ else if (numOfCells > nr_points)
++ {
++ vertices->ResizeExact(nr_points, nr_points);
++ }
++
++ polydata->SetPoints(points);
++ polydata->SetVerts(vertices);
++
++#else
+ vtkSmartPointer<vtkIdTypeArray> cells = vertices->GetData ();
+ updateCells (cells, initcells, nr_points);
+ // Set the cells and the vertices
+ vertices->SetCells (nr_points, cells);
++#endif
+ }
+
+ //////////////////////////////////////////////////////////////////////////////////////////////
+@@ -3160,28 +3243,9 @@ pcl::visualization::PCLVisualizer::updat
+
+ // Update the cells
+ cells = vtkSmartPointer<vtkCellArray>::New ();
+- vtkIdType *cell = cells->WritePointer (verts.size (), verts.size () * (max_size_of_polygon + 1));
+- int idx = 0;
+- if (!lookup.empty ())
+- {
+- for (std::size_t i = 0; i < verts.size (); ++i, ++idx)
+- {
+- std::size_t n_points = verts[i].vertices.size ();
+- *cell++ = n_points;
+- for (std::size_t j = 0; j < n_points; j++, cell++, ++idx)
+- *cell = lookup[verts[i].vertices[j]];
+- }
+- }
+- else
+- {
+- for (std::size_t i = 0; i < verts.size (); ++i, ++idx)
+- {
+- std::size_t n_points = verts[i].vertices.size ();
+- *cell++ = n_points;
+- for (std::size_t j = 0; j < n_points; j++, cell++, ++idx)
+- *cell = verts[i].vertices[j];
+- }
+- }
++
++ const auto idx = details::fillCells(lookup, verts, cells, max_size_of_polygon);
++
+ cells->GetData ()->SetNumberOfValues (idx);
+ cells->Squeeze ();
+ // Set the the vertices
+@@ -3552,7 +3616,8 @@ pcl::visualization::PCLVisualizer::rende
+
+ //center object
+ double CoM[3];
+- vtkIdType npts_com = 0, *ptIds_com = nullptr;
++ vtkIdType npts_com = 0;
++ vtkCellPtsPtr ptIds_com = nullptr;
+ vtkSmartPointer<vtkCellArray> cells_com = polydata->GetPolys ();
+
+ double center[3], p1_com[3], p2_com[3], p3_com[3], totalArea_com = 0;
+@@ -3611,10 +3676,11 @@ pcl::visualization::PCLVisualizer::rende
+ // * Compute area of the mesh
+ //////////////////////////////
+ vtkSmartPointer<vtkCellArray> cells = mapper->GetInput ()->GetPolys ();
+- vtkIdType npts = 0, *ptIds = nullptr;
++ vtkIdType npts = 0;
++ vtkCellPtsPtr ptIds = nullptr;
+
+ double p1[3], p2[3], p3[3], totalArea = 0;
+- for (cells->InitTraversal (); cells->GetNextCell (npts, ptIds);)
++ for (cells->InitTraversal (); cells->GetNextCell(npts, ptIds);)
+ {
+ polydata->GetPoint (ptIds[0], p1);
+ polydata->GetPoint (ptIds[1], p2);
+@@ -3830,7 +3896,8 @@ pcl::visualization::PCLVisualizer::rende
+ polydata->BuildCells ();
+
+ vtkSmartPointer<vtkCellArray> cells = polydata->GetPolys ();
+- vtkIdType npts = 0, *ptIds = nullptr;
++ vtkIdType npts = 0;
++ vtkCellPtsPtr ptIds = nullptr;
+
+ double p1[3], p2[3], p3[3], area, totalArea = 0;
+ for (cells->InitTraversal (); cells->GetNextCell (npts, ptIds);)
+@@ -4040,9 +4107,9 @@ pcl::visualization::PCLVisualizer::fromH
+
+ vtkSmartPointer<vtkPolyData> polydata;
+ vtkSmartPointer<vtkIdTypeArray> initcells;
++
+ // Convert the PointCloud to VTK PolyData
+ convertPointCloudToVTKPolyData (geometry_handler, polydata, initcells);
+- // use the given geometry handler
+
+ // Get the colors from the handler
+ bool has_colors = false;
Index: pkgsrc/graphics/pcl/patches/patch-visualization_src_point__picking__event.cpp
diff -u /dev/null pkgsrc/graphics/pcl/patches/patch-visualization_src_point__picking__event.cpp:1.1
--- /dev/null Fri May 7 11:36:30 2021
+++ pkgsrc/graphics/pcl/patches/patch-visualization_src_point__picking__event.cpp Fri May 7 11:36:29 2021
@@ -0,0 +1,14 @@
+$NetBSD: patch-visualization_src_point__picking__event.cpp,v 1.1 2021/05/07 11:36:29 thor Exp $
+
+Support VTK 9, from PR 4262
+
+--- visualization/src/point_picking_event.cpp.orig 2020-08-14 12:23:03.000000000 +0000
++++ visualization/src/point_picking_event.cpp
+@@ -49,7 +49,6 @@
+ #include <vtkPointData.h>
+ #include <vtkVertexGlyphFilter.h>
+ #include <vtkPlanes.h>
+-#include <vtkXYPlotActor.h>
+ #include <vtkRenderer.h>
+ #include <vtkRenderWindow.h>
+
Home |
Main Index |
Thread Index |
Old Index