[vtk-developers] Manual conversion of some Tcl to Python tests.

David Gobbi david.gobbi at gmail.com
Fri Aug 31 11:21:53 EDT 2012


On Fri, Aug 31, 2012 at 3:14 AM, Andrew Maclean
<andrew.amaclean at gmail.com> wrote:
>
> There would be only two functions e.g GetColor(std::string) returning
> a std::vector and SetColor(std::string, std::vector) - this function
> would allow the user to add new colours.
>
> Hopefully this would be wrapped and easy to use in Python etc. thus
> removing the need for colors.py.

Well, std::string is wrapped but std::vector is not.  You could use the
new vtkColor type instead.

I notice that vtkBrewerColors used vtkColor4ub, i.e. unsigned char RGBA.
This highlights a problem with any GetColor method... what format is the
color going to be returned in?  Most VTK classes like vtkProperty  expect
"double[3]" or "double *" as the color type.

 - David



More information about the vtk-developers mailing list