[vtkusers] SetInputArrayToProces(...) ..??

Rakesh Patil rakeshthp at in.com
Wed Feb 17 08:25:08 EST 2010


 Oh thanks,But why the first three parameters are zero..?? and what do each parameter stand for...??Thanks Original message From:David Doria< daviddoria+vtk at gmail.com >Date: 17 Feb 10 18:37:04Subject:Re: [vtkusers] SetInputArrayToProces(...) ..??To: rakeshthp at in.comOn Wed, Feb 17, 2010 at 3:32 AM, Rakesh Patilwrote:> I was going through the documentation of vtkGlyph3D here>> http://www.vtk.org/doc/release/5.4/html/a00651.html>> I came across:>> "You can set what arrays to use for the scalars, vectors, normals, and color> scalars by using the SetInputArrayToProcess methods in vtkAlgorithm. The> first array is scalars, the next vectors, the next normals and finally color> scalars.">> SetInputArrayToProces(...)>> Sorry to ask such stupid question, but can any one explain me with example> how to use this method..?? In my case, I have two different arrays.. one> scalar array and another color scalars.. So how do i do this..??>> Thanks in advance>> Rakesh Patil>>vtkGlyph3D is deriv
 ed from vktAlgorithm, so you can callSetInputArrayToProcess directly on the glyph filter:vtkGlyph3D* glyph = vtkGlyph3D::New();glyph>SetInputArrayToProcess(...)The trick, then, is knowing what to pass it :) It is extremelyconfusing  here are a couple of use cases I've seen, maybe you canuse this as a starting point:glyph>SetInputArrayToProcess(0, 0, 0,vtkDataObject::FIELDASSOCIATIONCELLS,vtkDataSetAttributes::SCALARS);glyph>SetInputArrayToProcess(0, 0, 0,vtkDataObject::FIELDASSOCIATIONCELLS, "index");glyph>SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELDASSOCIATIONCELLS, vtkDataSetAttributes::SCALARS);I think you'd want to change the first 0 to a 1, 2 or 3 depending onif you want to set scalars, vectors, normals or color scalars.Play around with those and let us know if you get anywhere.Thanks,DavidPowered by www.kitware.comVisit other Kitware opensource projects at http://www.kitware.com/opensource/opensource.htmlPlease keep messages ontopic and check the VTK FAQ at: ht
 tp://www.vtk.org/Wiki/VTKFAQFollow this link to subscribe/unsubscribe:http://www.vtk.org/mailman/listinfo/vtkusers 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100217/6670902f/attachment.htm>


More information about the vtkusers mailing list