Unable to save csv files using ImageJ macro

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Unable to save csv files using ImageJ macro

fieryice12
I'm using ImageJ to try to export the raw data values of the grayscale mean
of a rectangular region of interest over time. I don't have much experience
with macros, but using the macro recorder, here's what I have so far.


     makeRectangle(75, 45, 44, 43); // ROI selected

     run("Plot Z-axis Profile", "profile=time"); // graph relating mean and
time is generated

     saveAs("Results", "C:/Users/Admin/Desktop/PlotValues.csv"); // csv file
is generated


Running this macro produces the graph, but the csv file in't created.

What's the problem here?



--
Sent from: http://imagej.1557.x6.nabble.com/

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Unable to save csv files using ImageJ macro

George Patterson
You probably need to send the values to the results table before the saveAs
command.
Plot.showValues() should work.

Best,
George

On Thu, Jun 6, 2019 at 1:59 PM fieryice12 <[hidden email]>
wrote:

> I'm using ImageJ to try to export the raw data values of the grayscale mean
> of a rectangular region of interest over time. I don't have much experience
> with macros, but using the macro recorder, here's what I have so far.
>
>
>      makeRectangle(75, 45, 44, 43); // ROI selected
>
>      run("Plot Z-axis Profile", "profile=time"); // graph relating mean and
> time is generated
>
>      saveAs("Results", "C:/Users/Admin/Desktop/PlotValues.csv"); // csv
> file
> is generated
>
>
> Running this macro produces the graph, but the csv file in't created.
>
> What's the problem here?
>
>
>
> --
> Sent from: http://imagej.1557.x6.nabble.com/
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Unable to save csv files using ImageJ macro

fieryice12
That fixed the problem. Thanks for your help.



--
Sent from: http://imagej.1557.x6.nabble.com/

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html