[vtk-developers] vtkImageReslice mapping to a texture

David Gobbi david.gobbi at gmail.com
Wed Feb 24 08:46:16 EST 2016


Hi Lonni,

Did you expect that vtkImageReslice would always produce a 2D image?
When given a 3D image as input, it will produce another 3D image as
output unless it is specifically told to produce a 2D image (which is often
done by calling SetOutputExtent() with an extent that is only 1 slice
thick).

 - David

On Wed, Feb 24, 2016 at 2:04 AM, Lonni Besançon <lonni.besancon at gmail.com>
wrote:

> Hello,
>
> Just wanted to share the weird experience that I had with vtkImageReslice.
> I actually used it in combination with a plane to create a vtkImageData
> that
> is a slice of my dataset. I then wanted to create a texture based on that
> vtkImageData. Which works just fine until I tried to render in which case,
> since I am using OpenGLES I had issues with 3D texture rendering.
> So I thought this problem should not occur as I was trying to render a 2D
> texture only. Yet, checking the dimensions of my vtkImageReslice gave me
> dimensions > 1 on all axes.
>
> I finally got my piece of code to work thanks to the
> SetOutputDimensionality(2) function.
> I don't know if this behaviour is normal or not, but I thought I should
> share my workaround, and at the very least let you guys know about the
> behaviour so that you could take a look at it if you believe the behaviour
> to be incorrect.
>
> Lonni
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20160224/bd6d6425/attachment.html>


More information about the vtk-developers mailing list