Re: Help needed: Macro to save plot profile data as text
Posted by
Silas Kraus on
Apr 26, 2015; 9:56pm
URL: http://imagej.273.s1.nabble.com/Help-needed-Macro-to-save-plot-profile-data-as-text-tp5012614p5012616.html
Hey thanks!
I already got help from another ImageJ user who sent me a link to a very
similar example macro that worked for me:
http://rsb.info.nih.gov/ij/macros/GetProfileExample.txt
> You are trying to save the plot, not the values. You have to get the
> values into a results table:
>
> run("Clear Results");
> profile = getProfile();
> for (i=0; i<profile.length; i++) {
> setResult("Value", i, profile[i]);
> }
> updateResults;
> saveAs("results","/path/to/file");
>
The strange thing is that this code still threw the same error. It only
differs from the above mentioned example macro in one line: The
"updateResults;" command is outside of the loop. When I put it inside
the loop, everything works fine.
Anyway, thanks a lot for the quick help. Now I can get to work.
See you.
Silas Kraus
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html