[Paraview] vtkClipDataSet in a programmable filter

Cory Quammen cory.quammen at kitware.com
Thu Sep 7 17:15:34 EDT 2017


Xavier,

The runtime error is troubling. I suspect there may be a problem or
incompatibility with a shared library on your system.

If you wanted to debug further, you could try downloading Dependency Walker
[1] and load paraview.exe with it. It should show you the DLLs ParaView is
trying to load. I wonder if ParaView is trying to load a Python other than
the one it ships with?

HTH,
Cory

[1] http://www.dependencywalker.com/

On Thu, Aug 31, 2017 at 2:32 AM, Xavier Garnaud <xgarnaud at gmail.com> wrote:

> Dear Cory,
>
> Thank you for your help.
> In my case, this does not work and I get the following error message:
>
> Traceback (most recent call last):
>
> File "<string>", line 22, in <module>
>
> File "<string>", line 12, in RequestData
>
> TypeError: SetInputData argument 1: method requires a VTK object
>
> Maybe it is related to the fact that when I create the first programmable
> filter, I get this error message:
> [image: Inline image 1]
>
> I use Paraview 5.4.1 on windows (I get the same behavior with Paraview
> 5.3.0)
>
> Best regards,
>
> Xavier
>
> On Wed, Aug 30, 2017 at 7:38 PM, Cory Quammen <cory.quammen at kitware.com>
> wrote:
>
>> This works for me in 5.4.1:
>>
>> import vtk
>>
>> plane = vtk.vtkPlane()
>> plane.SetOrigin(0, 0, 0)
>> plane.SetNormal(0, 1, 0)
>>
>> clip = vtk.vtkClipDataSet()
>> clip.SetClipFunction(plane)
>> clip.SetInputData(self.GetInput())
>> clip.Update()
>>
>> self.GetOutput().DeepCopy(clip.GetOutput())
>>
>> Make sure you set the "Output Data Set Type" to "vtkUnstructuredGrid"
>> before you first hit Apply. I believe there is a bug that does not let
>> you change the output data set type after you first click Apply.
>>
>> HTH,
>> Cory
>>
>> On Wed, Aug 30, 2017 at 10:27 AM, Xavier Garnaud <xgarnaud at gmail.com>
>> wrote:
>> > Dear all,
>> >
>> > I'd like to use the vtkClipDataSet in a programmable filter, but I can't
>> > find it it paraview.vtk, and the function from vtk does not seem to
>> work. (I
>> > am using Paraview 5.2 or 5.4 on windows).
>> > Is the function available, or is there another way to perform the clip?
>> >
>> > Best regards,
>> >
>> > Xavier
>> >
>> > _______________________________________________
>> > 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 ParaView Wiki at:
>> > http://paraview.org/Wiki/ParaView
>> >
>> > Search the list archives at: http://markmail.org/search/?q=ParaView
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://public.kitware.com/mailman/listinfo/paraview
>> >
>>
>>
>>
>> --
>> Cory Quammen
>> Staff R&D Engineer
>> Kitware, Inc.
>>
>
>


-- 
Cory Quammen
Staff R&D Engineer
Kitware, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170907/935f6af1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 26979 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170907/935f6af1/attachment.png>


More information about the ParaView mailing list