MantisBT - VTK
View Issue Details
0015787VTKBugpublic2015-10-16 14:152015-10-28 00:07
Max Smolens 
Alexis Girault 
normalminoralways
closedfixed 
 
 
TBD
incorrect functionality
0015787: Setting vtkCornerAnnotation text to empty string renders incorrectly
After a text element of vtkCornerAnnotation has been set to a non-empty string and has been rendered, then setting the text element to an empty string results in incorrect rendering.

Result:
A rectangle is drawn with the bounds of the previous text element.

Expected result:
Nothing is drawn.

See attached file that's modified from the CornerAnnotation example [1].

Also see a proposed solution in the attached patch.

Reproduced with gitlab VTK as of commit 5158a4ce.

[1] http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/CornerAnnotation [^]
hackaton
cxx CornerAnnotation.cxx (2,011) 2015-10-16 14:15
https://www.vtk.org/Bug/file/9929/CornerAnnotation.cxx
patch vtkTextMapper-empty-string.patch (487) 2015-10-16 14:15
https://www.vtk.org/Bug/file/9930/vtkTextMapper-empty-string.patch
png CornerAnnotation.png (14,357) 2015-10-16 14:18
https://www.vtk.org/Bug/file/9931/CornerAnnotation.png
png
Issue History
2015-10-16 14:15Max SmolensNew Issue
2015-10-16 14:15Max SmolensFile Added: CornerAnnotation.cxx
2015-10-16 14:15Max SmolensFile Added: vtkTextMapper-empty-string.patch
2015-10-16 14:18Max SmolensFile Added: CornerAnnotation.png
2015-10-19 14:44Utkarsh AyachitTag Attached: Hackathon-Oct-2015
2015-10-19 14:50Utkarsh AyachitTag Detached: Hackathon-Oct-2015
2015-10-19 14:50Utkarsh AyachitTag Attached: hackaton
2015-10-19 15:38Jean-Christophe Fillion-RobinNote Added: 0035312
2015-10-19 15:39Jean-Christophe Fillion-RobinNote Edited: 0035312bug_revision_view_page.php?bugnote_id=35312#r1346
2015-10-19 15:44Jean-Christophe Fillion-RobinNote Added: 0035313
2015-10-21 11:31Alexis GiraultNote Added: 0035329
2015-10-21 11:39Alexis GiraultAssigned To => Alexis Girault
2015-10-21 13:30Alexis GiraultNote Deleted: 0035329
2015-10-21 13:34Alexis GiraultReproducibilityhave not tried => always
2015-10-21 13:34Alexis GiraultStatusbacklog => gerrit review
2015-10-21 13:34Alexis GiraultCategory(No Category) => Bug
2015-10-28 00:07Cory QuammenNote Added: 0035402
2015-10-28 00:07Cory QuammenStatusgerrit review => closed
2015-10-28 00:07Cory QuammenResolutionopen => fixed

Notes
(0035312)
Jean-Christophe Fillion-Robin   
2015-10-19 15:38   
(edited on: 2015-10-19 15:39)
@Max: Thanks for reporting the issue. To better understand the context, did you build VTK using OpenGL or OpenGL2 backend ?

(0035313)
Jean-Christophe Fillion-Robin   
2015-10-19 15:44   
From Max comment posted on the associated Slicer issue:

  With the OpenGL backend it renders a white rectangle, like in Slicer. With the OpenGL2 backend it renders a black rectangle.

See http://www.na-mic.org/Bug/view.php?id=4043#c13387 [^]
(0035402)
Cory Quammen   
2015-10-28 00:07   
Fixed with gitlab merge request https://gitlab.kitware.com/vtk/vtk/merge_requests/794 [^]