[Paraview] reading MATLAB file

Mauro Fontana fontana.mauro at gmail.com
Thu Oct 12 10:52:12 EDT 2017


Hi Randy

I'm not sure if it is what you are asking, but this might be useful:
https://blog.kitware.com/easy-customization-of-the-paraview-python-programmable-filter-property-panel/
.

That way you can have a GUI field for the path of the .mat file to read,
much more convenient that changing the path in the code each time.

Cheers,

On Wed, Oct 11, 2017 at 5:10 PM Heiland, Randy <heiland at iu.edu> wrote:

> Not sure, but think it’s irrelevant for my particular use. I'm going to
> try the Programmable Source (Python script) approach (and use scipy.io.loadmat
> to read my .mat file). Maybe I missed it - is there a way to read in this
> script from a file? (copy/pasting into the Pgmable Source widget certainly
> works; just asking)  Thanks!
>
> On Oct 11, 2017, at 1:24 PM, Berk Geveci <berk.geveci at kitware.com> wrote:
>
> Is there a Python API to read .mat files? What is the underlying
> structure? I kind of remember them using HDF5 for some stuff...
>
> On Tue, Oct 10, 2017 at 2:18 PM, Heiland, Randy <heiland at iu.edu> wrote:
>
>> Hello,
>>
>> I have some matlab files I’d like to get into PV. Initially, the data is
>> quite simple: sphere centers, radii, color attribute (a few 100K spheres).
>> In the past, I’ve manually converted the files into .vtk formats using
>> Python w/ scipy to load/parse the .mat files. But I’d like to avoid
>> creating additional files and just read the .mat files directly.
>>
>> I *think* I’d like to do this w/ Python still (but without creating
>> files), if that’s an option. Basically, I’d welcome suggestions for the
>> simplest approach, at least initially. I’m not terribly concerned about the
>> “slowness” of Python reading/converting the .mat files.
>>
>> Using PV 5.4.1. And the solution needs to be easily adopted by others who
>> will be using PV.
>>
>> I’m sure there are concerns that I’ve side-stepped, e.g. would I ever
>> want to use it in client/server mode, etc.
>>
>> I’ve seen https://www.paraview.org/Wiki/Plugin_HowTo and I was also
>> curious if a “Programmable Source” would be an option.
>>
>> thanks! (and it’s nice to re-join the community after a long absence)
>> -Randy
>>
>> _______________________________________________
>> 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
>>
>>
>
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20171012/3fdf6bba/attachment.html>


More information about the ParaView mailing list