[vtkusers] Slow text rendering with vtkCornerAnnotation and big windows

Marc Ruiz Altisent marc.ruiz+vtk at gmail.com
Tue Jul 28 10:19:40 EDT 2015


Hi, I'm the developer of a medical viewer that uses vtkCornerAnnotation to
display image-related information in the corners of the window. I have
found that updating the text for each frame is slow when the window is very
big, like for example in a 5 MPixel medical display.

Previously we used the vtkRenderingFreeTypeOpenGL module and annotation
updates were instantaneous no matter the window size, but it doesn't
support UTF-8, so we decided to not use it anymore.

Now, with the default implementation in the vtkRenderingFreeType module,
when the window is very big the updates take a considerable amount of time,
to the point of making the application very laggy when scrolling through
images. I have tried to limit the text size to a small number, but even
then with a big window text rendering is slow and with a small window it's
fast, so it's not directly related to text size. I don't know exactly what
is causing the slowness, but according to profiling tests, the bottleneck
is the vtkFreeTypeTools::RenderCharacter() method.

Could the performance of text rendering be improved? Currently I could
revert back to using the vtkRenderingFreeTypeOpenGL module, even with its
limitations, but since it will disappear in VTK 6.3 this would just be a
short-term workaround.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150728/9aa10335/attachment.html>


More information about the vtkusers mailing list