[vtkusers] VTK equivalent of Paraview SetInterpolateColorsFlag

François Bertel francois.bertel at kitware.com
Tue Sep 13 22:43:19 EDT 2005


Hi Paul,

you might look at method SetInterpolateScalarsBeforeMapping(1) in vtkMapper:
instead of interpolating color with a color per vertex it uses a 1D texture.

http://www.vtk.org/doc/nightly/html/classvtkMapper.html#z4076_1

--
François Bertel, PhD  | Kitware Inc. Suite 204
1 (518) 371 3971 x113 | 28 Corporate Drive
                       | Clifton Park NY 12065, USA


Paul Cochrane wrote :
> Unfortunately, no.  I tried that.  It seems to be Gouraud interpolated by
> default anyway.  Also, that's a separate option in paraview to the
> interpolate colours flag, so one can have flat or Gouraud shading but still
> have interpolated colours.
> 
> 
>>how about
>>actor->GetProperty()->SetInterpolationToFlat(); // flat shading
>>actor->GetProperty()->SetInterpolationToGouraud();  // smooth shaded 
>>(with point values)
>>
>>Paul Cochrane wrote:
>>
>>
>>>Hi all,
>>>
>>>I'm wanting to replicate the colour interpolation one can obtain of a
>>>surface from within paraview with vtk.  Paraview has a flag that one can 
>>>set
>>>that makes the colour interpolation very nice when one is viewing a grid in
>>>a surface representation and I'm wondering what I have to do in vtk to
>>>obtain the same output.  To explain what I mean, I'm attaching two images 
>>>to
>>>this email.  In interpColorsOff.jpg one sees a nice range of colours
>>>(notably the yellow and green) in the peak, whereas in interpColorsOn.jpg
>>>there is just the red in the same place, which is the same output as what I
>>>get with vtk.  I managed to track the difference down to the
>>>SetInterpolateColorsFlag within paraview, however this doesn't seem to 
>>>exist
>>>in vtk, and I'm wondering what I have to do (if at all possible) within vtk
>>>to get the same result as having SetInterpolateColorsFlag set to Off.
>>>
>>>Any help would be greatly appreciated!
>>>
>>>Paul Cochrane
>>>
>>>
>>>
>>>
>>>------------------------------------------------------------------------
>>>
>>>
> 
> 




More information about the vtkusers mailing list