[vtkusers] How to put vtkDiskSource on vtkPolyDataMapper

Andaharoo Andx_roo at live.com
Mon Nov 12 02:08:16 EST 2018


Do the disks need to be "apart" of the polygon for exporting and other
things? Or do you just need to render/visualize them? 

If they need to be apart of the dataset then you need to join the disk's
polyData with your target polyData using vtkTransformFilter to move and
transform the disks and use vtkAppendPolyData or
vtkBooleanOperationPolyDataFilter to join all the disks with the target.

If you just need to render them then it's much easier:

For just a few of them you can simply specify a different vtkActor for each
disk and use SetPosition and SetOrientation to get them where you want them.

For visualizing many of them I would highly suggest using the glyphing
features of VTK as long as the disks only vary in position, scale, and/or
color. You can use vtkOpenGLGlyph3DMapper to render hundreds of thousands of
them on the latest gpus (assuming the disks are relatively low poly). Or use
vtkGlyph3DMapper if you don't have a gpu. Just supply it with the source, in
your case vtkDiskSource's output. And supply it with an input data object.
Which should contain point data, orientation data, and/or scalars in the
input data object. I'd use this to draw the normals of a polygon or a vector
field from image data as polygonal arrows. It's a little tricky and
undocumented currently and lacking examples. I can supply one if this is
what you need.



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html


More information about the vtkusers mailing list