[vtkusers] Undo vtkImageFlip effects
David Gobbi
david.gobbi at gmail.com
Mon Sep 14 13:19:15 EDT 2015
Hi Marcos,
It might be more convenient to use vtkImageReslice to flip the images. It
can take a 3x3 or 4x4 matrix that describes the transformation.
For a 3x3 matrix that flips the Y axis, you would use this:
reslice->SetResliceAxesDirectionCosines(
1, 0, 0,
0, -1, 0,
0, 0, 1);
Be careful, though, because this flips the image around the origin, rather
than flipping it around its center.
For a 4x4 matrix, use reslice->SetResliceAxes(vtkMatrix4x4 *). By using a
4x4 matrix, you can make sure that the correct center-of-rotation is
applied.
- David
On Mon, Sep 14, 2015 at 11:03 AM, Marcos <fotosentido at gmail.com> wrote:
> Hi,
>
> I attached a vtkImageFlip filter to my pipeline, but I can't find the way
> to "switch off" this filter or revert its effects.
>
> I just want to flip my image when I press a button.
>
> Any suggestions?
> Thank you.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150914/0815ff95/attachment.html>
More information about the vtkusers
mailing list