vtkScalarsToColors::SetAnnotations(...) does not update correctly.
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
If vtkScalarsToColors::SetAnnotations(..,...) is called with certain arrays, and those array are later changed from code outside vtkScalarsToColors, vtkScalarsToColors never realizes the change. Calling SetAnnotations(..) again has no effect.
e.g.
vtkVariantArray* foo=... vtkStringArray* bar=...
/// fill values
stc->SetAnnotations(foo, bar);
/// Render/Update the LUT. Annotations shown/used as expected
/// change values in foo and bar
stc->SetAnnnotations(foo, bar);
/// Render/Update the LUT. Annotations won't be changed, it will still /// use the old values. DOing the following overcomes the issue:
stc->SetAnnnotations(NULL, NULL); stc->SetAnnnotations(foo, bar);