[Homer-users] RE: Inquiry on exporting image
Huppert, Ted
huppertt at upmc.edu
Mon Aug 18 18:41:53 EDT 2008
If you open a *.fig file in matlab, you can access any of the data stored in the figure using the "children" functions. For example:
open('myFig.fig');
children=get(gca,'children');
for idx=1:length(children)
try
xdata=get(children(idx),'xdata');
ydata=get(childen(idx),'ydata');
catch
disp('This child is not a line object, there is no data for this child- skipping...');
end
end
The trick is that you need to figure out the order of the children and which one is the data you want. I typed this directly into this email- so pardon me if this doesn't run directly... but, you get the picture.
Note- that in HOMER, if you right click on a data line, you can directly copy that line's data to the clipboard or export just that data trace to an ASCII file.
-Ted
________________________________
From: homer-users-bounces at nmr.mgh.harvard.edu [mailto:homer-users-bounces at nmr.mgh.harvard.edu] On Behalf Of He, Jiwei
Sent: Monday, August 18, 2008 4:59 PM
To: homer-users at nmr.mgh.harvard.edu
Subject: [Homer-users] Inquiry on exporting image
Hi All,
I intend to export reconstructed images (HbO and Hb) into ASCII files so as to conduct various statistical analyses.
It looks like HomER just allows an image-style output (like .fig, .jpg, etc.), rather than a numeric fashion. Does anybody here happen to know a tricky way to convert the .fig file into an ASCII file?
I really appreciate any help in advance!
Jiwei He
Ph.D. student
Department of Psychology,
University of Texas at Arlington,
Arlington, Texas, 76019
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/homer-users/attachments/20080818/41fa20be/attachment.html
More information about the Homer-users
mailing list