[vtkusers] Coloring Isolines -> Grey

Martin Baumann mailsgetlost at web.de
Fri Jun 2 11:00:53 EDT 2006


I create a iso surface based on scalar u_x. I want to color this iso surface by scalar u_y.
The following code does the following:
If I choose u_y to build the surface then the iso surface is colored in one single color. This is correct as u_y is constant in an iso surface that is created based on u_y.
If I choose u_x  or any other scalar to build the iso surface, then the color is grey - one single color.
I can't understand why. 

Does anyone have an idea what I am doing wrong?

  _filter = vtkContourFilter ::New();
  _mapper = vtkPolyDataMapper::New();

  _filter->SetInput(_scalar_grid);  // _scalar_grid is of type vtkUnstructuredGrid*
  _filter->ComputeScalarsOn();

  _mapper->SetInput(_filter->GetOutput());
  _mapper->ScalarVisibilityOn();
  _mapper->SetScalarRange(0.0,1.0);
  _mapper->SetScalarModeToUsePointFieldData();
  _mapper->ColorByArrayComponent("u_y", 0);

Regards, M.B.
______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193




More information about the vtkusers mailing list