[Paraview-developers] Python programmable source acting as filereader
Daan van Vugt
daanvanvugt at gmail.com
Wed Jan 25 02:53:21 EST 2017
Hi Utkarsh,
I think I can make that work. Is there any way to get a filename pattern
(or list of files) in a nice way through the GUI?
Also I'm having trouble accessing the Properties set in my script when
using it with python_filter_generator.py
Daan
On Tue, Jan 24, 2017 at 5:15 PM, Utkarsh Ayachit <
utkarsh.ayachit at kitware.com> wrote:
> Daan,
>
> I didn't notice this earlier, but you're using a vtkProgrammableFilter
> together with a vtkFileSeriesReader. That, I am afraid is not current
> supported. You're better off adding support to reading the multiple files
> to your Programamble Source itself. The ParaView guide does provide an
> example for a reading a file series of csv files as a time series (Section
> 13.2.2). That should give you pointers to update your Python script. Let me
> know if you need additional pointers.
>
> Utkarsh
>
> On Tue, Jan 24, 2017 at 10:22 AM, Daan van Vugt <daanvanvugt at gmail.com>
> wrote:
>
>> Hi Utkarsh,
>>
>> When I do that I get a segfault, with the following backtrace:
>>
>> =========================================================
>> Process id 7407 Caught SIGSEGV at 0x0 address not mapped to object
>> Program Stack:
>> WARNING: The stack trace will not use advanced capabilities because this
>> is a release build.
>> 0x7f27d2933080 : ??? [(???) ???:-1]
>> 0x7f27d242a536 : vtkProgrammableFilter::RequestData(vtkInformation*,
>> vtkInformationVector**, vtkInformationVector*)
>> [(libvtkFiltersProgrammable-pv5.2.so.1) ???:-1]
>> 0x7f27d26f7880 : vtkPythonProgrammableFilter::ProcessRequest(vtkInformation*,
>> vtkInformationVector**, vtkInformationVector*)
>> [(libvtkPVClientServerCoreCore-pv5.2.so.1) ???:-1]
>> 0x7f27c93e3e1b : vtkFileSeriesReader::RequestData(vtkInformation*,
>> vtkInformationVector**, vtkInformationVector*)
>> [(libvtkPVVTKExtensionsDefault-pv5.2.so.1) ???:-1]
>>
>> (this occurs before any of my python code has been executed)
>>
>> Thanks,
>> Daan
>>
>> On Tue, Jan 24, 2017 at 3:39 PM, Utkarsh Ayachit <
>> utkarsh.ayachit at kitware.com> wrote:
>>
>>> Daan,
>>>
>>> Can you try changing the `si_class` attribute in the XML for the proxy
>>> to be `vtkSIMetaReaderProxy`? I suspect the classname was changed at some
>>> point. If that works, I can update the Wiki.
>>>
>>> Thanks
>>> Utkarsh
>>>
>>> On Thu, Jan 19, 2017 at 11:01 AM, Daan van Vugt <daanvanvugt at gmail.com>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> I would like to create a plugin that uses h5py and numpy to read a
>>>> file, do some operations on it and return VTK objects.
>>>> Would it be possible to do the same thing as
>>>> http://www.paraview.org/Wiki/Animating_legacy_VTK_file_serie
>>>> s#Making_custom_readers_work_with_file_series
>>>> but instead of using a vtkPDataSetReader use a
>>>> vtkPythonProgrammableSource?
>>>>
>>>> I have made a (very naive) try, attached to this post.
>>>> When using this to read a series of files I get the errors (version
>>>> 5.2.0 64-bit) shown below.
>>>> To test, just use any hdf5 file. (.h5)
>>>>
>>>> Thanks for any help,
>>>> Daan
>>>>
>>>>
>>>>
>>>>
>>>> ERROR: In /home/buildslave/dashboards/buildbot/paraview-pvbinsdash-lin
>>>> ux-shared-release_opengl2_qt4_superbuild/source-paraview/Par
>>>> aViewCore/ServerImplementation/Core/vtkPVSessionCore.cxx, line 439
>>>> vtkPVSessionCore (0x100da30): Failed to instantiate
>>>> vtkSIFileSeriesReaderProxy
>>>>
>>>>
>>>> global_id: 4875
>>>> location: 2
>>>> [paraview_protobuf.DefinitionHeader.client_class]: "vtkSMSourceProxy"
>>>> [paraview_protobuf.DefinitionHeader.server_class]:
>>>> "vtkSIFileSeriesReaderProxy"
>>>> [paraview_protobuf.ProxyState.xml_group]: "sources"
>>>> [paraview_protobuf.ProxyState.xml_name]: "JorekReadH5"
>>>> [paraview_protobuf.ProxyState.subproxy] {
>>>> name: "Reader"
>>>> global_id: 4864
>>>> }
>>>> ############ ABORT #############
>>>> ERROR: In /home/buildslave/dashboards/buildbot/paraview-pvbinsdash-lin
>>>> ux-shared-release_opengl2_qt4_superbuild/source-paraview/Par
>>>> aViewCore/ServerImplementation/Core/vtkPVSessionCore.cxx, line 794
>>>> vtkPVSessionCore (0x100da30): No object with global-id: 4875
>>>>
>>>>
>>>> _______________________________________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at
>>>> http://www.kitware.com/opensource/opensource.html
>>>>
>>>> Search the list archives at: http://markmail.org/search/?q=
>>>> Paraview-developers
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://public.kitware.com/mailman/listinfo/paraview-developers
>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20170125/0f440e15/attachment.html>
More information about the Paraview-developers
mailing list