[vtkusers] Colour iso-surface by another variable
Philip Morris Jones
philip at cd.co.uk
Fri May 3 05:29:23 EDT 2002
Hi
I am creating an isosurface of some results using
vtkContourFilter *iso = vtkContourFilter::New();
iso->SetInput( ProMesh->GetOutput() );
but once I have the isosurface I want to colour it by another variable. I am
presently doing this using
vtkProbeFilter *probe = vtkProbeFilter::New();
probe->SetInput(iso->GetOutput() );
probe->SetSource(ProCol->GetOutput() );
vtkCastToConcrete *cast2 = vtkCastToConcrete::New();
cast2->SetInput(probe->GetOutput() );
Then I take the output from cast2 to render it.
I am using two vtkUnstructuredGridReader, one sets the variable to contour
by:
ProMesh->SetScalarsName("VMAG");
and the other to colour by:
ProCol->SetScalarsName("PRES");
My data is an unstructured grid with point data. I am told that there is a
better way to do this using AddArray but can find no examples of such. Is
there anyone who can shed some light on this?
regards
Philip
Philip M. Jones Fax: +44 (0)20 7471 6201
MA, MSc, MIMechE, CEng Tel: +44 (0)20 7471 6200
New Technology Consultant e-mail: philip at cd.co.uk
More information about the vtkusers
mailing list