[vtkusers] Viewport clipping
Doug Hoppes
dhoppes at mbfbioscience.com
Wed Jun 29 10:39:51 EDT 2016
Sorry about that…. Here’s more information…
In VTK Version 6.2.0 using the OpenGL flag, this is what we see in all 4 viewports, we see that the vtkimageactor looks fine.
[cid:image003.png at 01D1D1F1.8D2F5CF0]
However, we just moved to VTK Version 7.0.0 using the OpenGL2 flag. This is what we now see:
[cid:image004.png at 01D1D1F2.8FB66080]
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.
We have seen this issue with really large vtkvolumes but it doesn’t happen all of the time. Using the vtkimageactor, this happens consistently. This problem does not present itself with any generic vtkactors.
I’ll also check the vtkImageSliceMapper code to see if I can get any information from it.
Doug
From: David Gobbi [mailto:david.gobbi at gmail.com]
Sent: Wednesday, June 29, 2016 9:03 AM
To: Doug Hoppes
Subject: Re: [vtkusers] Viewport clipping
Hi Doug,
Please keep the discussion on the list. It's possible that the near/far clipping planes are too tight. When you reset the focal point, you can try calling SetClippingRange(near, far) at the same time.
Also, I hate to be redundant, but what version of VTK are you using? Do you see this only with vtkImageActor, or also with vtkVolume? It helps me help you if you answer these questions...
- David
On Wed, Jun 29, 2016 at 6:45 AM, Doug Hoppes <dhoppes at mbfbioscience.com<mailto:dhoppes at mbfbioscience.com>> wrote:
Hey David!
Thanks for responding. Here’s what we are seeing:
I can move the image in the 3D area without any problem…. It’s just that the image is clipped. We have seen it happen with a couple of large images and I noticed that it happens when I try to reset the camera focal point.
From: David Gobbi [mailto:david.gobbi at gmail.com<mailto:david.gobbi at gmail.com>]
Sent: Wednesday, June 29, 2016 8:25 AM
To: Doug Hoppes
Cc: vtkusers at vtk.org<mailto:vtkusers at vtk.org>
Subject: Re: [vtkusers] Viewport clipping
On Wed, Jun 29, 2016 at 6:10 AM, Doug Hoppes <dhoppes at mbfbioscience.com<mailto:dhoppes at mbfbioscience.com>> wrote:
Hey all,
Running into a critical issue and not sure where to turn. We’ve been using vtkViewport for a while and never seem to have an issue with them. However, just updated the software and moved to OpenGL2 and now running into an issue. Some of the viewports seem to be clipped. I can move my objects without a problem in them but, in one case, vtkImageActor, the display is clipped.
Is there a particular place I can look at in the code to see what is happening? The vtkViewport code seems to have the correct port size. Where is the display rendering done? I’ve noticed that, if I use a sphere actor or any general surface actor, there doesn’t seem to be a problem. It only happens when I’m rendering a volume or an image actor.
Hmm... I haven't seen anything like this. By "clipped", do you mean that the actor/volume is limited to a rectangle that is smaller than the viewport? Is this rectangle always in the upper left corner of the viewport, or is it somewhere else? When you say "rendering a volume", do you mean rendered with a vtkVolume? If so, what volume mapper was used? What version of VTK?
For OpenGL2 the vtkImageActor rendering is done by Rendering/OpenGL2/vtkOpenGLImageSliceMapper.cxx, which in turn uses vtkTexture and vtkPolyDataMapper.
- David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160629/3e8ed820/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.emz
Type: application/octet-stream
Size: 34768 bytes
Desc: image002.emz
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160629/3e8ed820/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 28972 bytes
Desc: image003.png
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160629/3e8ed820/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: oledata.mso
Type: application/octet-stream
Size: 30817 bytes
Desc: oledata.mso
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160629/3e8ed820/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.emz
Type: application/octet-stream
Size: 20866 bytes
Desc: image001.emz
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160629/3e8ed820/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 15944 bytes
Desc: image004.png
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160629/3e8ed820/attachment-0003.png>
More information about the vtkusers
mailing list