[vtkusers] How to get grid result from vtkWarpVector ??

David E DeMarle dave.demarle at kitware.com
Tue May 13 13:15:47 EDT 2014


Instead of
warp.Vectors = ['POINTS', 'Total_displacement']
try
warp.SetInputArraysToProcess(0,0,0,"vtkDataObject::FIELD_ASSOCIATION_POINTS",
"Total_displacement")


David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909


On Tue, May 13, 2014 at 12:42 PM, Fabio Canesin <fabio.canesin at gmail.com>wrote:

> Tried that, didn't work.. I'm thinking is something with
> SetInputArrayToProcess.
>
> On Tue, May 13, 2014 at 1:30 PM, David E DeMarle
> <dave.demarle at kitware.com> wrote:
> >
> > On Tue, May 13, 2014 at 12:06 PM, Fabio Canesin <fabio.canesin at gmail.com
> >
> > wrote:
> >>
> >> Dear vtkusers,
> >>
> >> Can someone help in the usage of vtkWarpVector, I need to load the
> >> deformed grid, this should be the result of applying vtkWarpVector in
> >> the 'Total_displacement' field.
> >>
> >> I have tried:
> >>
> >> warp = vtk.vtkWarpVector()
> >> warp.SetInputConnection(pregrid.GetProducerPort())
> >> warp.Vectors = ['POINTS', 'Total_displacement']
> >> warp.SetScaleFactor(1.0)
> >> Extract = vtk.vtkExtractUnstructuredGrid()
> >> Extract.SetInputConnection(warp.GetOutputPort())
> >
> >
> > Are you missing an update here?
> >> Extract.Update()
> >
> >>
> >> deformed_grid = Extract.GetOutput()
> >>
> >> Where pregrid is a vtkUnstrcturedGrid with the 'Total_displacement' as
> >> PointData. When I execute it I get the original mesh, without the
> >> warping.
> >>
> >> Any help ??
> >>
> >> Best regards,
> >> Fábio Canesin
> >> _______________________________________________
> >> 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/20140513/ac15f525/attachment.html>


More information about the vtkusers mailing list