[vtk-developers] Performance improvement of vtkCornerAnnotation class using vtkTextActor

Roger Bramon Feixas rogerbramon at gmail.com
Wed Apr 6 11:38:24 EDT 2011


Hi David,

Sure, I can do that but the implementation is not good. It was just to show
you the benefits of using vtkTextActor instead of vtkActor2D. Does it not
matter?

Thanks,

Roger

On Wed, Apr 6, 2011 at 1:56 PM, David Doria <daviddoria at gmail.com> wrote:

> On Wed, Apr 6, 2011 at 2:31 AM, Roger Bramon Feixas <rogerbramon at gmail.com
> > wrote:
>
>> Hi,
>>
>> I'm developing on Mac OS X and I recently updated my VTK version from
>> 5.0.4 to 5.6. On Mac Os X, the frame rate of a 2D render window is
>> drastically reduced when vtkCornerAnnotation is set to on. I also noticed
>> that from VTK 5.2 the vtkTextActor implementation uses textures instead of
>> OpenGL sentences but the current implementation of vtkCornerAnnotation uses
>> vtkActor2D instead of vtkTextActor therefore it doesn't take the benefit of
>> using textures. I changed vtkCornerAnnotation implementation in order to
>> test the performance of using textures and the result is really interesting.
>> The frame rate increases from 6 frames/s to 60 frames/s which is the same
>> frame rate when vtkCornerAnnotation isn't used.
>>
>> I attach a zip which includes the implementation (even thought it isn't a
>> nice implementation because I just did the minimum changes to be able to use
>> vtkTextActor), the patch file, and a pdf file which is a summary of my test
>> results done on Windows XP and Mac OS X. On Windows, if we just analyze the
>> frame rate, we could conclude that it isn't necessary to change the
>> implementation to use vtkTextActor, however, we could reduce a lot the CPU
>> usage.
>>
>> I would like to know your opinion about it, and, perhaps, someone could
>> test it on Linux, or with ATI graphics card or on Windows with dual core
>> processor (I test it with quad core processor).
>>
>> Thanks for your attention.
>>
>> Roger
>>
>
> Hi Roger,
>
> I think your patch would be better received if you pushed it to Gerrit:
>
>
> http://www.itk.org/Wiki/VTK/Git/Simple#Publishing_a_Topic_for_Review_.28Optional.29
> <http://www.itk.org/Wiki/VTK/Git/Simple#Publishing_a_Topic_for_Review_.28Optional.29>
> David
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20110406/f94ddefa/attachment.html>


More information about the vtk-developers mailing list