[vtkusers] An issue with vtkLabeledDataMapper

Darshan Pai darshanpai at gmail.com
Tue Sep 25 16:02:11 EDT 2012

I was debugging my code where there were  some issues with

I have two sets of labels ,one a vtkIntArray and another a vtkStringArray.

The code I used for vtkStringArray is given below:
vtkSmartPointer<vtkLabeledDataMapper> lmap =
    lmap->SetInputArrayToProcess(0, 0, 0,
vtkDataObject::FIELD_ASSOCIATION_POINTS, "labelname");

labelname is the name of the  vtkStringArray array I used.  This works fine

This same code crashes when I use  vtkIntArray by changing the following
lmap->SetInputArrayToProcess(0, 0, 0,
vtkDataObject::FIELD_ASSOCIATION_POINTS, "proplabelname");

The crash is in the MouseMove Event and  I see that the problem is in the
GetMTime() function call . The reason is there is a vtkTextProperty entry
which points to null.

if i use lmap->SetFieldDataName("proplabelname") it works  fine.

Since both of vtkIntArray and vtkStringArray are attributes I do not think
SetInputArrayToProcess() should discriminate against them .
I am unclear if it a bug,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120925/0a24f38b/attachment.htm>

More information about the vtkusers mailing list