[vtkusers] get the rotation angles of volume

Bill Lorensen bill.lorensen at gmail.com
Sun Sep 20 08:24:22 EDT 2009


If you are using the mouse to rotate, you are probably changing the
orientation of the camera and not the volume. If you are using the
standard interactor, press the "a" key and the interactor should go
into actor mode. In actor mode, the mouse will rotate the volume.

http://www.vtk.org/doc/nightly/html/classvtkInteractorStyle.html
describes the other keypress events that control the interactor.

Bill

On Fri, Sep 18, 2009 at 4:59 AM, toulgen <toulgen at gmail.com> wrote:
> Hello,
>
>
>
> Unfortunely, using a :
>
>
>
> Double o[3] ;
>
> m_vtkpVolume->GetOrientation(o) ;
>
>
>
> I have every time (0,0,0) if I use just the mouse for applying rotations.
> The rotation applied by mouse has not saved on Orientation property !!!
>
> If I use a ->RotateX(angle), ->RotateY(angle), ->RotateZ(angle), I have a
> correct Orientation with GetOrientation().
>
>
>
> My question is:
>
> How I can get the volume orientation (rotation applied with the mouse and
> with the source code using RotateX, RotateY and RotateZ commands)?
>
>
>
>
>
> Date: Thu, 17 Sep 2009 11:50:52 -0400
>
> From: Francois Bertel <francois.bertel at kitware.com>
>
> Subject: Re: [vtkusers] get the rotation angles of volume
>
> To: vtkusers at vtk.org
>
> Message-ID:
>
>       <d9819a910909170850t954dd6frb75a29624a7b354a at mail.gmail.com>
>
> Content-Type: text/plain; charset=ISO-8859-1
>
>
>
> Hello,
>
>
>
> You can get the resulting angle and axis of rotation with void
> GetOrientationWXYZ(double wxyz[4]) (vtkTransform)
>
>
>
>
>
> On Thu, Sep 17, 2009 at 11:25 AM, toulgen <toulgen at gmail.com> wrote:
>
>> Hi,
>
>>
>
>>
>
>>
>
>> I have a 3D volume (vtkVolume*vol;).
>
>>
>
>> To rotate my volume with c++ code, I use this :
>
>> vol->RotateX(rotationX);
>
>> vol->RotateY(rotationY); vol->RotateZ(rotationZ);
>
>>
>
>> With mouse, I can rotate my volume.
>
>>
>
>>
>
>>
>
>> I want to get the rotation angles of the new volume position after
>
>> rotation with mouse?
>
>>
>
>>
>
>>
>
>> Thx
>
>>
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



More information about the vtkusers mailing list