[vtkusers] AddArray() to polydata

Eric E. Monson emonson at cs.duke.edu
Thu Sep 30 17:13:10 EDT 2010


At any point you can use SetNumberOfCountours(int) if you need to reduce the number of entries in the list of contour values, and if you're just replacing a current value with another, you should be able to use the SetValue(int index, double value) method. You may have to call contour->Modifed(); after you do this, and then just Render your view or Update your pipeline to regenerate the contour.

(Note that for setting a single value it might be more clear in your code if you just use SetValue(0, 0.0) rather than GenerateRange(1, -0.1 0.1))

http://www.vtk.org/doc/nightly/html/classvtkContourFilter.html

-Eric

On Sep 30, 2010, at 4:37 PM, ChiaWeng Boon wrote:

> Thanks for the suggestions!  May I know how do I change the scalar
> values in my contour plot?  I still want to plot the contour of F(x,y)
> = 0.  But because I am rendering multiple implicit functions, I may
> want to change its scalar values.
> 
> 
> boon




More information about the vtkusers mailing list