[vtkusers] pointdata and glyph

Eric E. Monson emonson at cs.duke.edu
Tue Aug 11 15:01:06 EDT 2009


Hey Claude,

Your vtkPointData should be part of some other element, like  
vtkPolyData (that you have read from a file, or created manually, or  
generated from a source). Create your polydata, then create your three- 
component vtkFloatArray that holds your vector coordinates, then do  
something like polydata->GetPointData()->SetVectors(floatarrayname).

As you said, the arrow source will be your source: glyph- 
 >SetSourceConnection(arrowsource->GetOutputPort())

If your polydata is going through some other filter before the glyph  
filter, then you use glyph->SetInputConnection(polyfilter- 
 >GetOutputPort()), but if it's going in directly, you should be able  
to use glyph->SetInput(polydata).

-Eric



On Aug 10, 2009, at 5:16 AM, ClaudeG wrote:

>
> hi ,
> i have created pointdata with the coordonnates of vectors and know i  
> want to
> use glyph to represente these vectors. As source i use vtkarrow but  
> how can
> i get my pointdata into the glyph?
>
> thanks for any help
>
> -- 
> View this message in context: http://www.nabble.com/pointdata-and-glyph-tp24896627p24896627.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow 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/20090811/dc7ea0cc/attachment.htm>


More information about the vtkusers mailing list