Quantcast

How is the color of cell interpolated given different colors to each cell point?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How is the color of cell interpolated given different colors to each cell point?

Tharun
In all the workflows I see, we assign a scalar value to each point and color of cell(colors inside cell) is interpolated(calculated) automatically by VTK using the color of cell points.

May I know how is the interpolation done?

Thanks in advance.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How is the color of cell interpolated given different colors to each cell point?

David E DeMarle
If vtkMapper::InterpolateScalarsBeforeMapping is Off, we send the RGBs at each vertex and GL interpolates the RGB values over the polygon. This can produce incorrect results (colors outside of the lookup table) so I don't recommend it.

If On, we send the color lookup table for the object over and the values at each vertex instead of the colors at each vertex. GL interpolates the values over the polygon and looks up the color at each pixel from the lookup table.

Note that you can also color by cell aligned values. See vtkMapper::SetScalarModeToUseCellData(). Here the color of all pixels within a polygon will be the same and determined by looking up the cell's value in the lookuptable.


On May 2, 2017 3:19 AM, "Tharun" <[hidden email]> wrote:
In all the workflows I see, we assign a scalar value to each point and color
of cell(colors inside cell) is interpolated(calculated) automatically by VTK
using the color of cell points.

May I know how is the interpolation done?

Thanks in advance.



--
View this message in context: http://vtk.1045678.n5.nabble.com/How-is-the-color-of-cell-interpolated-given-different-colors-to-each-cell-point-tp5743035.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers

_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Loading...