-
-
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
Fix: vtk version handling in ImageViewer (PCLVisualizer) #998
Conversation
On a side note I'm currently investigating problems related to the use of VTK6 with the ImageViewer, #910. |
Hi Victor, I haven't tested VTK 6.X yet (what means to use 'win_->Render ()' instead of 'image_viewer_->Render ()' in 'ImageViewer.cpp'). I should do that... |
Hmm, I didn't have a chance to test your changes, but the version checking seems to be somewhat inconsistent. In the |
Yes, you're right. How can we avoid this? I used latest pcl trunk to make the code changes for the pull request... |
If you provide a code snippet that showcases the problems that you are getting, I can try it with vtk5.10. |
The test case was: tool/demo: "pcl_pcd_select_object_plane" with input file: "trunk/test/milk_cartoon_all_small_clorox.pcd" (pcl latest trunk, vtk 5.8) => after shift-clicking on an object (milk bottle) in cloud viewer the result was a wrong y-position of the context item in image viewer to mark the object as overlay on the image (i.e. rectangle): image_viewer_->addRectangle (...), apps/src/pcd_select_object_plane.cpp, line 493 |
After clicking on each of the objects in sequence, I get the following image: The frame is clearly misaligned. After I changed 7 to 10 in Is this the output that I am supposed to get? If yes, then what kind of problem you are trying to address with the changes in |
Hi Sergey, For completeness I checked out the positions of the output of all other context item functions for lines, circles, text and so on ( image_viewer.cpp ). These other context items were misaligned as well with vtk5.8, so I changed the code in the same way as in image_viewer.hpp. |
But why don't you use the same condition #if ((VTK_MAJOR_VERSION == 5) && (VTK_MINOR_VERSION <= 10)) as in |
You're right, that would be better. But recently I testet vtk6 and found that the items are misaligned as well. Therefore i propose a complete workaround. I'll make a new pull request then. You can close this. |
Hi,
during testing some image viewer tools with VTK 5.8 I got false positions of several context items on image viewer screen. I think the vtk version handling wasn't correct, so I did some rework on it.