[vtkusers] Viewport clipping
Doug Hoppes
dhoppes at mbfbioscience.com
Wed Jun 29 11:33:30 EDT 2016
Forgot to mention… it’s the same VTKImageActor for all of the viewports.
From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Doug Hoppes
Sent: Wednesday, June 29, 2016 11:25 AM
To: David Gobbi
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] Viewport clipping
Okay… I’ll see how hard it is to move our code back to OpenGL with the latest version and see if the problem persists.
Here’s the image with a different background. As you can see, the vtkimageactor looks like it’s the correct size.
[cid:image005.png at 01D1D1FA.0EEF7BA0]
If I use the mouse to drag the image over to the right (using the interactorstyle Pan()), I see:
[cid:image006.png at 01D1D1FA.0EEF7BA0]
Doug
From: David Gobbi [mailto:david.gobbi at gmail.com]
Sent: Wednesday, June 29, 2016 11:15 AM
To: Doug Hoppes
Cc: vtkusers at vtk.org<mailto:vtkusers at vtk.org>
Subject: Re: [vtkusers] Viewport clipping
For troubleshooting problems like this, use test images that don't have a black background. That way we can see where the boundaries of the images are.
It looks like the images are simply being rendered in the wrong position. So the question is whether this is due to the fact that multiple viewports are being used (i.e. due to a bug in the display coords or view coords), or if this is due to a shift in the world coords. Either way, this is strange because the OpenGL2 vtkImageSliceMapper simply uses a vtkPolyDataMapper under the hood.
There were many changes between VTK 6.2 and VTK 7.0... any chance that you can try this with the OpenGL backend in VTK 7.0 (instead of OpenGL2)?
Also, here is a very important question: do you create a separate vtkImageActor for each of your viewports? Actors should not, in general, be shared between viewports.
- David
On Wed, Jun 29, 2016 at 8:39 AM, Doug Hoppes <dhoppes at mbfbioscience.com<mailto:dhoppes at mbfbioscience.com>> wrote:
Notice the clipping. The upper two viewports show nothing, the bottom viewport is correct and the rightmost viewport is clipped in the center of the viewport. If we resize the overall vtk window, the viewport is still clipped in the center. It seems that there is no display to the right-side of the viewport. In the main right viewport, we can actually move the objects around without a problem but the results are still clipped.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160629/b243a4c9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.png
Type: image/png
Size: 26181 bytes
Desc: image005.png
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160629/b243a4c9/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.png
Type: image/png
Size: 25172 bytes
Desc: image006.png
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160629/b243a4c9/attachment-0001.png>
More information about the vtkusers
mailing list