[vtk-developers] Color series changes (was: Manual conversion of some Tcl to Python tests.)

Marcus D. Hanwell marcus.hanwell at kitware.com
Mon Sep 3 00:13:34 EDT 2012


On Sun, Sep 2, 2012 at 5:47 PM, David Thompson <dcthomp at me.com> wrote:
>>>> My $0.02, there is another color table class in the charts modules
>>>> that lets us pass around color sequences for plot colors too.
>>>
>>> Argh! I was looking for that the other day and missed it. Would you object to me performing a little surgery on it to reconcile it with vtkBrewerColors?
>>>
>> It depends what the surgery is, I would be happy to take a look at
>> what you want to do/review it. It would be great to get more colors in
>> there (I would like to retain the current ones for the tests at least
>> even if you add nicer ones), but it has been in for quite some time so
>> we should retain the API.
>
> The surgery I am thinking of:
>
> + Move the class from Charts to Common (maybe Common/Misc; or a new module such as Common/Color; or even Color/Core if you think there might one day be a Color/Lcms).
> + Add a method similar to vtkBrewerColors::CreateLookupTable() that creates or populates a vtkLookupTable with one entry for each color in the series.
> + Start moving from an integer for each scheme to using -- or at least including -- string names. There are a lot of palettes in Brewer's collection, making enums hard to adapt to a GUI. Plus, it strikes me as awkward that only one custom palette seems to be allowed when an application might like to load/save multiple user-created schemes.
>
> If that sounds acceptable, I'll make the changes and have you review them in Gerrit.
>
Sounds good to me, I look forward to checking out the changes.

Thanks,

Marcus



More information about the vtk-developers mailing list