[vtkusers] vtkUnstructuredGrid coloring by PointData

Dominik Szczerba domi at vision.ee.ethz.ch
Thu Oct 4 04:35:49 EDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You have to use something like

dataset->GetPointData()->SetActiveScalars(scalarName.c_str());
mapper->SetScalarVisibility(1);
mapper->SetScalarModeToUseCellFieldData();

- -- Dominik

Luke J West wrote:
> Hi,
> 
> I have a vtkUnstructuredGrid that contains a number of named PointData fields
> 
> but no matter what I try, it always comes out a uniform colour.
> 
> How do I select the pointdata field to display, please?
> 
> I'm using Grid->SelectColorArray("Temperature") and Mapper->SetScalarRange(...)
> 
> Maybe someone has a snippet I can crib?
> 
> Thanks,
> 
> Luke
> 
> -----------------------------------------------------------------------
> National Oceanography Centre, Southampton :: http://www.noc.soton.ac.uk
> _______________________________________________
> 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

- --
Dominik Szczerba, Ph.D.
Computer Vision Lab CH-8092 Zurich
http://www.vision.ee.ethz.ch/~domi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHBKXk/EBMh9bUuzIRApB/AJ9Mi3tJ/USRm79XjXn97V8OdxczowCfRl1E
xHim+G4F65LVEZNNcVGgp5A=
=JjMU
-----END PGP SIGNATURE-----



More information about the vtkusers mailing list