[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 --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070102/45a4eb3c/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jf-sign.gif
Type: image/gif
Size: 11512 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070102/45a4eb3c/attachment.gif>


More information about the vtkusers mailing list