[vtkusers] Multiple SCALARS or VECTORS in POINT_DATA

Jean Favre jfavre at cscs.ch
Tue Jan 2 05:00:28 EST 2007


Mengda Wu wrote:
> Thanks for your answer.
>
> Then, for the data which has multiple scalars or vectors.
> How to tell a filter(such as threshold, contour, glyph, etc.) to
> operate on a particular scalar or vector?
you may look at the file
Graphics/Testing/Cxx/TestHierarchicalBoxPipeline.cxx for an example in  C++

  vtkContourFilter* contour = vtkContourFilter::New();
  contour->SetInputConnection(0, c2p->GetOutputPort(0));
  contour->SetValue(0, -0.013);
 
contour->SetInputArrayToProcess(0,0,0,vtkDataObject::FIELD_ASSOCIATION_POINTS,"phi");

the last line does what you want: tell the contour to operate on the
scalar field called "phi"

hope this helps
-- 
-------------- next part --------------
Skipped content of type multipart/related


More information about the vtkusers mailing list