[vtkusers] where is the code for rotation?

Alex Malyushytskyy alexmalvtk at gmail.com
Thu Feb 21 19:06:16 EST 2013


Have you tried to call

void vtkInteractorStyle::StartRotate()
before rotation

and
void vtkInteractorStyle::StopState()
after?

I am not sure this will be sufficient, but it should be at least part
of the solution.

Alex



On Wed, Feb 20, 2013 at 10:09 PM, Hossein Nazem <hossein.nazem at gmail.com> wrote:
> hi Alex
>
> I reTest SetDesierdUpdateRate, there is a slight rise in rotation speed but
> in comparison with default rotation(by mouse) it is still very slow. the
> default rotation reduces resolution during rotation and recover it after
> rotation.
>
> as you said rotate method was in vtkInteractorStyle subclasses but I can't
> understand how this method reduces resolution.
>
> the mapper I'm using is vtksmartvolumemapper and having some methods
> to work with memory it has arouse my suspicious, although I didn't find
> anything yet.
>  as a novice I will appreciate any advice
>
> thanks
>
> hossein
>
>
> On Wed, Feb 20, 2013 at 4:05 PM, Hossein Nazem <hossein.nazem at gmail.com>
> wrote:
>>
>> tnx alex
>> i will explore vtkInteractorStyle,... i tested GetDesiredUpdateRate()
>> but i didnt see any impact on image quality i think its better i test it
>> again
>> hossein
>>
>>
>>
>> On Wed, Feb 20, 2013 at 1:06 AM, Alex Malyushytskyy <alexmalvtk at gmail.com>
>> wrote:
>>>
>>> I bet it is in vtkInteractorStyle or it subclass.
>>> I would expect  all you need to do is SetDesiredUpdateRate
>>> for vtkRenderWindow ( get it from interactor ) to interactor desired
>>> update rate ( GetDesiredUpdateRate() )
>>> before rotation:
>>>
>>> ( r - vtkRenderWindowInteractor )
>>>
>>>  r->GetRenderWindow()->SetDesiredUpdateRate(r->GetDesiredUpdateRate());
>>>
>>> and return it back tio normal after rotation :
>>>
>>>  r->GetRenderWindow()->SetDesiredUpdateRate(r->GetStillUpdateRate());
>>>
>>>
>>> Alex
>>>
>>>
>>>
>>> On Mon, Feb 18, 2013 at 10:01 AM, Hossein Nazem <hossein.nazem at gmail.com>
>>> wrote:
>>> > i checked the  vtkRenderWindowInteractor.cxx but i couldnt find the
>>> > code
>>> > relevent to rotation
>>> >
>>> >
>>> > On Mon, Feb 18, 2013 at 9:24 PM, Hossein Nazem
>>> > <hossein.nazem at gmail.com>
>>> > wrote:
>>> >>
>>> >>
>>> >> hi all,
>>> >> i have a 3d volume and i ve wrote a function to rotate it:
>>> >>
>>> >> Renderer->GetActiveCamera()->Roll(deg1);
>>> >> Renderer->GetActiveCamera()->Azimuth(deg2);
>>> >> Renderer->GetActiveCamera()->Elevation(deg3);
>>> >>
>>> >> in comparison with defult rotation in vtkrenderwindowinteractor, mine
>>> >> is
>>> >> slower and keep the image quality while the defult rotation(which use
>>> >> mouse
>>> >> events) reduces the quality during the rotation and when the rotation
>>> >> finished it restores the initial quality, i want to know where is the
>>> >> code
>>> >> of this process or how could i do the same?
>>> >> thanks
>>> >> hossein
>>> >
>>> >
>>> >
>>> > _______________________________________________
>>> > 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