[vtkusers] Problems with the visualization of scalar data (vtk4.4.2)

Toh Da Jun tohdj at bii.a-star.edu.sg
Mon May 30 05:38:06 EDT 2005


after you have modified the points, call this function before displaying 
them...

points->modified();


toh da jun


Scheurer, Christian wrote:

>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  
>
>
>_______________________________________________
>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
>
>  
>




More information about the vtkusers mailing list