[vtk-developers] Setting color properties directly by name in VTK.

David Thompson david.thompson at kitware.com
Fri Jun 14 12:15:57 EDT 2013


Hi John,

> Modifying vtkObject just so that you can set colours in Lookuptables strikes me as shockingly bad.

I think that there is a general need for an abstract interface to set properties; setting colors just happens to be driving the change. For example, vtkPlot already has a similar method as do the statistics filters (vtkStatisticsAlgorithm::SetParameter). We are just talking about moving these down to vtkObject in order to allow the functionality elsewhere and get around some module dependency issues.

I am obviously in favor of adding something, although I would rather see a single method with this signature:

    virtual void SetProperty(
        const std::string& property, int component, const vtkVariant&);

There is no reason vtkPlot cannot keep its alternate signature (as a deprecated method).

	David


More information about the vtk-developers mailing list