[Paraview] reading MATLAB file

Heiland, Randy heiland at iu.edu
Wed Oct 11 16:10:02 EDT 2017


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 <mailto: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 <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 <http://www.kitware.com/>
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html <http://www.kitware.com/opensource/opensource.html>
> 
> Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView <http://paraview.org/Wiki/ParaView>
> 
> Search the list archives at: http://markmail.org/search/?q=ParaView <http://markmail.org/search/?q=ParaView>
> 
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview <http://public.kitware.com/mailman/listinfo/paraview>
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20171011/2d9d40dd/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4035 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20171011/2d9d40dd/attachment.bin>


More information about the ParaView mailing list