[Insight-users] [vtkusers] Reading .mat Matlab(R) files

Aviv Hurvitz aviv.hurvitz at gmail.com
Mon Oct 6 02:24:50 EDT 2008


If you own MATLAB, you could use the C-callable API to parse the mat file
and access the data inside.
See for example the C function matOpen:
http://www.mathworks.com/access/helpdesk/help/techdoc/apiref/matopen.html

In this approach, you would need to write code to read the data from
MATLAB's mxArray and write it to an itk::Image.

- Aviv


On Fri, Oct 3, 2008 at 6:16 PM, Jean-Pierre Roux
<jpr at creatis.insa-lyon.fr>wrote:

> Thiebaut Mochel wrote:
>
>> Could this be useful : http://matitk.cs.sfu.ca/ ?
>>
> I read about matitk before.
> It's used to extend matlab with itk, right?
> It must be great for matlab users ... but I'm not one of them : I never
> used matlab (and I don't plan to do), I was given matlab file, and I would
> like to process them with my C++ applications.
> I was wonder if it it exist something like 'vtkMatlabRader' (or
> i'tkMaltab...'), or any C/C++ piece of code that fopens a .mat file, freads
> it, fseeks what it feels like, and bring into main memory the values the
> file contains.
>
> Thx for your help, anyway.
>
> Jean-Pierre
>
>
>> Jean-Pierre Roux wrote:
>>
>>> Hi,
>>>
>>> I have tons on .mat Matlab(R) files and I would like to read them, with
>>> VTK, or ITK, or with a C++ program.
>>> I wouldn't like too much to have to convert them into Dicom files (under
>>> Matlab), or to write a raw file, and add (under vi) a .mhd...
>>>
>>> Any suggestion?
>>>
>>> Thx a lot.
>>>
>>> Jean-Pierre Roux
>>> _______________________________________________
>>> This is the private VTK discussion list.
>>> Please keep messages on-topic. Check the FAQ at:
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>
>>>
>>>
>>  _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20081006/c153a420/attachment.htm>


More information about the Insight-users mailing list