[vtk-developers] Scalar coloring modes and polygonal rendering

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Wed Nov 12 16:34:51 EST 2014


Great! Thanks for your input, guys. I think I like
VTK_COLOR_MODE_DIRECT_SCALARS. I don't want to include RGB since the
code support 2-component direct mapping as well. I'll push a topic of
review soon.

Utkarsh

On Wed, Nov 12, 2014 at 12:53 PM, David Gobbi <david.gobbi at gmail.com> wrote:
> Hi Utkarsh,
>
> I think this feature will be useful. VTK_COLOR_MODE_RAW_SCALARS
> might be a better name.  Or if it specifically meant for color scalars, then
> VTK_COLOR_MODE_RGB_SCALARS.
>
>  - David
>
> On Wed, Nov 12, 2014 at 10:42 AM, Utkarsh Ayachit
> <utkarsh.ayachit at kitware.com> wrote:
>>
>> Folks,
>>
>> vtkPolyDataMapper since a long time supports two coloring modes, viz.
>> VTK_COLOR_MODE_DEFAULT and VTK_COLOR_MODE_MAP_SCALARS. MapScalars
>> indicates always use a vtkScalarsToColors instance to map data values
>> to colors. Default means only use the vtkScalarsToColors if the data
>> array is not an unsigned char array.
>>
>> I am working on a feature request [1] to add support to not use a
>> vtkScalarsToColors instance for non-unsigned-char arrays (including
>> double/float), assuming they are in the range 0, 1.
>>
>> To support this mode without breaking current behavior, I am thinking
>> of adding a new VTK_COLOR_MODE_NO_MAP_SCALARS mode which can be used
>> to force interpreting the data values as colors directly.
>>
>> Any objections to that? Also if any suggestions for the name for this
>> new mode are highly welcome.
>>
>> Thanks
>> Utkarsh
>>
>> [1] http://www.paraview.org/Bug/view.php?id=14943


More information about the vtk-developers mailing list