[vtkusers] How to get the color of contours
Bill Lorensen
bill.lorensen at gmail.com
Thu May 6 14:32:44 EDT 2010
There are no "colors" for contour lines. There are scalar point data.
For contour lines the scalar data will be the contour value. In your
case, contour lines for 50 will have scalar point data = 50, 60 will
have 60, etc.
The mappers use lookup tables to transform scalar point (or cell) data
into rgb (or rgba) colors. So the color corresponding to 50 will be
the value stored in location 50 of the lookup table (assuming the
scalar range of the lookuptable matches the scalar range of the point
data).
Bill
On Thu, May 6, 2010 at 7:00 AM, Jothy <jothybasu at gmail.com> wrote:
> Hi all,
>
> I am trying to create a set of contour lines using vtkContourFilter,
> for instance[50,60,70]. Since there is no way to create legends in vtk
> for these lines, I am trying to create a text for each line with the
> corresponding color. But how to get the color of these lines?
>
> Thanks,
>
> Jothy
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list