[vtkusers] VTK equivalent of Paraview SetInterpolateColorsFlag

Paul Cochrane cochrane at esscc.uq.edu.au
Thu Sep 15 03:15:02 EDT 2005


Thanks for that Francois!  It looks like it's the right thing to use,
unfortunately, I'm restricted a bit to vtk version 4.2.  Maybe one can't do
that within that version of vtk...

Maybe it's time to upgrade ;-)

* François Bertel (francois.bertel at kitware.com) [050914 12:50]:
> 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
> >>>
> >>>
> >>>
> >>>
> >>>------------------------------------------------------------------------
> >>>
> >>>
> >
> >
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: 
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers

-- 
Paul Cochrane
Computational Scientist/Software Developer
Earth Systems Science Computational Centre
Rm 703, SMI Building
University of Queensland
Brisbane
Queensland 4072
Australia

E: cochrane at esscc.uq.edu.au
P: +61 7 3346 4109
F: +61 7 3365 7347



More information about the vtkusers mailing list