[vtkusers] vtkScalarBar with non linear labels

Drak draktharrblorf at gmail.com
Fri Aug 14 11:57:09 EDT 2015



Is there any way to get the scalar bar to not automatically set my labels to
a linear value?

I would like to access the labels table and change myself the value so it
follows my own formula.

// scalar bar
_hueLut = vtkLookupTable::New();
_hueLut->SetNumberOfTableValues(100);
_hueLut->SetTableRange(0, 100);
_hueLut->SetTableValue(0, 0, 0, 1);
_hueLut->SetTableValue(1, 0, 1, 0);
//etc...
_hueLut->Build();


_scalarBar = vtkScalarBarActor::New();
_scalarBar->SetLookupTable(_hueLut);
_scalarBar->SetTitle("logarithm scalar bar");
_scalarBar->SetNumberOfLabels(5);
_scalarBar->SetLabelFormat("%5.4g");

The problem is that my scalar bar labels seems to show the value 0, 25, 50,
75 and 100. I want to be able to change the labels value. For example: 0,
10, 25, 50, 100.

Thank you.




--
View this message in context: http://vtk.1045678.n5.nabble.com/vtkScalarBar-with-non-linear-labels-tp5733498.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list