-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make fixes for VTK 6 #218
Make fixes for VTK 6 #218
Conversation
This is a first pass which allows PCL to compile against VTK 6. In the future another cleanup pass could be made to reduce (or abstract away) the separations between the VTK5 and VTK6 code paths. |
Thanks a lot for submitting this! I will put some questions and comments inline. |
@@ -209,9 +218,12 @@ | |||
vtkSmartPointer<vtkPolyData> poly_data = vtkSmartPointer<vtkPolyData>::New (); | |||
|
|||
pcl::io::mesh2vtk (mesh, poly_data); | |||
poly_data->Update (); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this ok with VTK5 as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, see my comments below.
You've remove quite a lot of update() calls. Are you sure this still works as before with VTK5? Otherwise I guess we have to #ifdef all of them. |
This fixes compilation errors encountered when building PCL against VTK 6 (from the current git master). The changes are based on the recommendations in the VTK 6 migration guide [1]. This closes issue PointCloudLibrary#199. [1] http://www.vtk.org/Wiki/VTK/VTK_6_Migration_Guide
Thanks for the feedback! In VTK5, I checked the changes by running the unit-tests (with Thanks, |
Fixing indention while at it.
Hi Kylelutz, I tried using your changes for PCL 1.7 and it compiles fine. However I do get runtime errors when trying to run the openni_viewer example, in PCL_visualization: Some methods are defined like: #if ((VTK_MAJOR_VERSION == 5) && (VTK_MINOR_VERSION >= 10)) but the constructor is in the opposite way #if ((VTK_MAJOR_VERSION == 5) && (VTK_MINOR_VERSION <= 10)) and hence the method tries to access the image_viewer which isn't initialized. There was a few other changes too, but since I don't have that much experince with VTK, I think you or someone with more experince should go over the files. I don't mind committing the changes I have made, since I can run the viewer example, but something should probably be changed/optimized. Long post, but hopes its okay. Regards, Lars |
This fixes compilation errors encountered when building PCL against VTK 6 (from the current git master). The changes are based on the recommendations in the VTK 6 migration guide [1]. This closes issue PointCloudLibrary#199. [1] http://www.vtk.org/Wiki/VTK/VTK_6_Migration_Guide
Conflicts: visualization/src/image_viewer.cpp
@larshg Sorry for the delay, I've been quite busy. Can you upload the changes that you have? I'll look them over and merge them into my branch. Thanks! |
Hi Kyle, I have uploaded the changes, but I have started from a newer master branch - so mayby you can cherry pick the commits or else I'll try make a branch from your branch and upload it separately for a pull/merge. Here is the commit: larshg@d72b363 The imageviewer is not working probably yet, though it doesn't crash due to invalid pointer. As of now it only shows a black screen. The VTK lib comes with following error: vtkTrivialProducer: <0BD1777B8> This data object does not contain the requested extent. I can't find any comments about this and I haven't figured out what is wrong. The image data seems fine, but mayby its wrong use of a dataobject in VTK. regards, Lars |
PCLConfig.cmake.in also needs to be changed for this patch to work. Right now, the VTK_LIBRARIES are hard-coded into the cmake file, and they're all wrong for vtk6. Additionally, it looks like the way PCLConfig.cmake is collecting preprocessor definitions is broken when using vtk6. When trying to build a project that uses pcl, calling ADD_DEFINITIONS(${PCL_DEFINITIONS}) causes make to bail because of unescaped parentheses on the command line. I'm still looking into that issue, I'll try to generate a test case to reproduce the issue |
HI @kylelutz could you streamline this a litte? Like remove the merge and unrelated commits? Try git rebase -i. This would make it easier to review. Thanks! |
Conflicts: apps/3d_rec_framework/include/pcl/apps/3d_rec_framework/pc_source/mesh_source.h
More VTK6 fixes.
closing this one in favor of #363, thanks for the work! |
This fixes compilation errors encountered when building PCL
against VTK 6 (from the current git master). The changes are
based on the recommendations in the VTK 6 migration guide [1].
[1] http://www.vtk.org/Wiki/VTK/VTK_6_Migration_Guide