[vtkusers] Interpolating polydata scalar values using implicit function

vlibertiaux vlibertiaux at gmail.com
Wed Mar 30 19:05:00 EDT 2011


Hi everyone !

I am trying to interpolate the scalar values of a polydata using an implicit
function.

Here's what I'm doing:

1) I create a vtkDoubleArray of scalar values
2) I use polydata->GetPointData()->SetScalars(vtkDoubleArray) to pass it to
my polydata
3) I create a vtkImplicitDataSet and pass my polydata as the argument of
SetDataSet;
4) I create a vtkContourFilter and a vtkSampleFunction sample
5) sample->SetModelBounds is set to the bounds of my polydata
6) sample->SetImplicitFunction is set to my implicitDataSet

Finally, I declare
double range[2] and fill it with the min and max values of my scalar array
and pass it in the function
contourFilter->GenerateValues(1,range) after setting the input connection to
the output of the sample function.

Then I create a mapper, an actor, a renderer and a render window but nothing
is rendered.  I know that a lot of processing takes place since the program
runs for a while, but I have no output.

Can someone please help me to figure out what I did wrong ?

Thank you very much,

V.

--
View this message in context: http://vtk.1045678.n5.nabble.com/Interpolating-polydata-scalar-values-using-implicit-function-tp4272519p4272519.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list