[vtkusers] Setting interactor views (coronal, sagital, axial)

David Gobbi david.gobbi at gmail.com
Wed Dec 5 07:16:39 EST 2012


Hi Sergio,

The view will change if you call SetImageOrientation().  For example:

style->SetImageOrientation(style->GetZViewRightVector(),
                          style->GetZViewUpVector());

Or you can use code like this:

double vector1[3] = { 1.0, 0.0, 0.0 };
double vector2[3] = { 0.0, 0.0, -1.0 };
style->SetImageOrientation(vector1, vector2);

 - David

On Wed, Dec 5, 2012 at 2:53 AM, Sergio Vera <sergio.vera at alma3d.com> wrote:
> Hello all
> I'm implementing a medical image viewer with the typical 3+1 windows (axial,
> coronal sagittal and 3d) layout.
>
> Each window has his vtkRenderWindowInteractor and vtkIntractorStyleImage
>
> I setup the interactor styles views vectors (right & up) for each slice view
> (axial, coronal, sagital) with
> SetZViewRightVector() and SetZViewUpVector().
>
> However, my views don't change, no matter how hard I try to update the
> window / renderer / renderwindow /camera (I believe I've tested almost all,
> if not all possibilities)
>
> The only way is to manually click "x" "z" or "y" keys on each window to
> obtain the desired point of view in the images.
>
> Anyone knows how to automatically set my views to the desired way without
> having to press keys?
>
> By the wai I use ctkVTKRenderView not a regular vtkRenderWindow but I
> believe this is not related to CTK.
>
> Best regards
> --
> Sergio Vera
>
>  Alma IT Systems
>  C/ Vilana, 4B, 4º 1ª
>  08022 Barcelona
>  T. (+34) 932 380 592
>  www.alma3d.com



More information about the vtkusers mailing list