[vtk-developers] vtkColorTransferFunction

Lisa Sobierajski Avila lisa.avila at kitware.com
Wed Jul 5 22:12:19 EDT 2000


Hello Jim,



>I just saw your message below.  While I am not relying on having 3 
>piecewise functions in the color
>transfer function, I am sorry to see them leave :) (I do rely heavily on 
>the methods BuildTable and
>BuildFunctionFromTable, so please do not remove them :)

They are still there.

>I have written GUI's that operated on piecewise functions.  With a single 
>line of code, I could have
>the GUI operate on a specified channel of the piecewise function. It was 
>nice way to reuse a GUI to
>operate on a piecewise function or a color transfer function.  I'll have 
>to look at your changes in
>more depth to see how I could do the same thing now.

It shouldn't be that hard to do something similar now - you'll just need 
another variable as to how many components are in the function. 
vtkPiecewiseFunction has 1, vtkColorTransferFunction has 3.

>As an aside, if I had seen this message earlier, I would have pushed to 
>have you create a new
>subclass rather than change the current class.  I think its getting pretty 
>late in the VTK game to
>remove a portion of the API.

A subclass wouldn't have really worked. A new class at the same level could 
have worked - but then there is the dilemma -  do you create a class that 
is almost the same as vtkColorTransferFunction? If there is a big uproar 
from the user community we can incorporate the old functionality back in 
(have two modes) but that seems like an awful lot of similar code to 
maintain unless people really need it.

Lisa 





More information about the vtk-developers mailing list