I am trying to develop a code to calculate Mean Linear Intercept of a lung tissue section by just taking into account the alveolar walls (thin black) and NOT the bronchiolar regions (thick black).
l = getWidth();
h = getHeight()/6;
run("Find Peaks", "min._peak_amplitude=254.99 min._peak_distance=0 min._value= max._value=");
So I have this square wave plot which I have generated from a binary image (first image). From this I use the BAR toolbar -> Data Analysis -> Find Peaks. That returns me the same square plot with the minimum and maximums labeled along with a table called “Plot Values” (following two images).
The BAR installation instructions can be found at: https://imagej.net/BAR#Installation
My only question right now is How do I save the values in Columns X1 and X2 in arrays called “X1” and “X2” using an ImageJ macro? Because I need this data to perform lots of different data analysis, And I have 100s of lines and images to work with so I want to automate this process so that I do not need to keep manually copying pasting data from the data table into an excel file. If anyone is able to help me how to get these values stored in arrays, I am good from there. Because then I can just directly do all my analysis in ImageJ macro and print only the final results my prof needs to an excel file, making the process efficient and simple and clean.
Dr. Glünder keeps misunderstanding what I am trying to do and misinterprets my posts and then backs out without trying to figure out what the problem I am having is. If anyone else is able to understand what I seek, please do help. Again I am only looking to get two columns of data which have variable row lengths each time.
I have tried printing the “nResults” in hopes I can use that but all it returns for a table having 6 columns, with the first pair of columns having 2080 rows, and the last two pairs of columns having 15 and 16 rows, respectively… nResults just returns 64 . What does this “64” mean?
P.S: I have tried this link already: https://imagej.nih.gov/ij/macros/examples/PlotGetValuesDemo.txt
It works only for two columns of data, but does not work for anything more than that.
For those of you who see this post, PLEASE run the code on the binary image I have pasted above to understand what I am talking about.
PS PS Why is this post flagged?