[vtkusers] surface expansion
Bill Lorensen
bill.lorensen at gmail.com
Tue Apr 19 11:29:29 EDT 2016
Here is a c++ example. When I get a chance, I'll add it to the wiki examples...
Try it with this file and a scale factor of 5 (second argument).
https://raw.githubusercontent.com/lorensen/VTKWikiExamples/master/Testing/Data/Torso.vtp
On Tue, Apr 19, 2016 at 9:12 AM, David Gobbi <david.gobbi at gmail.com> wrote:
> I don't know of any example that does specifically what you want.
> But the pipeline would go something like this:
>
> 1) use vtkPolyDataNormals to compute normals at each point.
>
> 2) feed the output of vtkPolyDataNormals into vtkWarpVector.
>
> 3) tell vtkWarpVector to use the normals, and give it a scale factor:
>
> warp.SetInputConnection(norms.GetOutputPort())
>
> warp.SetInputArrayToProcess(0, 0, 0,
> vtkDataObject.FIELD_ASSOCIATION_POINTS,
> vtkDataSetAttributes.NORMALS)
>
> warp.SetScaleFactor(5.0)
>
> I've never actually tried this, but in theory, it should work.
>
> - David
>
>
>
--
Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WarpSurface.cxx
Type: application/octet-stream
Size: 3850 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160419/ac7b2fca/attachment.obj>
More information about the vtkusers
mailing list