[vtkusers] Problem rotating vtkImageSlice
David Gobbi
david.gobbi at gmail.com
Sat Aug 27 13:51:30 EDT 2016
Hi Rick,
You're seeing this because you are doing an out-of-plane rotation on an
image that has only one slice. The rotation is around the image origin,
which (in this case) is at the bottom-left corner of the image.
The vtkImageResliceMapper has a SetSlicePlane() method:
http://www.vtk.org/Wiki/VTK/Image_Rendering_Classes#vtkImageResliceMapper
You must rotate this SlicePlane when you rotate the vtkImageSlice.
- David
On Sat, Aug 27, 2016 at 10:54 AM, Richard Frank <rickfrank at me.com> wrote:
> Hi,
>
> If I build the example
>
> VTK/Examples/Cxx/Images/ImageSlice
> and add
>
> imageSlice->RotateX(1);
>
> Which should, I think, rotate the image actor about its X axis by 1
> degree, I instead get
>
> [image: PastedImage-1.png]
>
> which seems incorrect.
>
> I can rotate about Z.
>
> Is there something I'm not doing correctly, or is this a bug?
>
> I also tried RotateWXYZ(1,1,0,0) and get the same result.
>
> This is VTK 7
>
> Thanks
>
> Rick
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160827/1ebe14c5/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PastedImage-1.png
Type: image/png
Size: 2328 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160827/1ebe14c5/attachment.png>
More information about the vtkusers
mailing list