[vtkusers] Problems with the visualization of scalar data (vtk4.4.2)
Scheurer, Christian
scheurer at ira.uka.de
Tue May 24 06:32:16 EDT 2005
Hello everybody,
i have a problem with the visualization of some scalar data with the vtk version 4.4.4.
My software worked fine with former versions of vtk and i can´t find my fault or is there a fault in this particular version???
I have to deal with my problem because i can´t change the vtk version in our lab.
Now to the failure:
I have some points in 3D from a laser range finder and some scalar data known as reflectance values corresponding to points.
*** vtkPoints *points = vtkPoints::New();
*** vtkIntArray *remiss = vtkIntArray::New();
*** remiss->SetNumberOfValues(scanlines*pgr); // scanline: no of scans; pgr: no of points each scanline
I insert the points in a loop with
*** points->InsertPoint(i*pgr+j,pv[i*pgr+j]);
at the same position as the scalar data to ensure the correspondings
*** remiss->SetValue(i*pgr+j,temp[i].remission[j]);
Then i hand all over to my polydata element
*** polydata->SetPoints(points);
*** polydata->GetPointData()->SetScalars(remiss);
and the mapper has to render at least.
Thats all and quite easy.
But the correspondence between points and scalar data isn´t correct in the visualization!!!
First, it is correct, but when the data changes and the loop is executed next and the renderer shows me the new picture.
The correspondece has changed and is incorrect. After the next update it is quite well again. And so on....
So every second step is not correct!!!!
So please help me, if you can.
Thanks.
Best regards,
Christian
More information about the vtkusers
mailing list