[vtkusers] How to get grid result from vtkWarpVector ??
Fabio Canesin
fabio.canesin at gmail.com
Fri May 16 11:16:23 EDT 2014
It did work, thanks. Also I used warp.vtkUnstructuredGridOutput()
instead of Extract
On Tue, May 13, 2014 at 2:15 PM, David E DeMarle
<dave.demarle at kitware.com> wrote:
> 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
>> >
>> >
>
>
More information about the vtkusers
mailing list