Login  Register

Re: Multiple measurements per image & multiple images

Posted by Justin McGrath on May 23, 2007; 8:43pm
URL: http://imagej.273.s1.nabble.com/Multiple-measurements-per-image-multiple-images-tp3699380p3699381.html

Using macros you can store each length in variables, then use the
built-in setResult() function and nResults variable. You can use
getTitle() and setResult("Label",row,title) to set the label.

This macro is close to what you want:
http://rsb.info.nih.gov/ij/macros/Measure3Lengths.txt

You could do something like:
---------
//macros to get the 4 lengths and store in an array

macro "Save results" {
row = nResults -1;
for i < length of my array {
  column = "Length_" + i;
  setResult(column,row,length[i]);
  setResult("Label",row,getTitle());
}
updateResults();
}
----------

You might have to make some changes so it works with how you're doing
the measurements, but that's the gist of it.

Built in macros are defined at this page:
http://rsb.info.nih.gov/ij/developer/macro/functions.html
There are examples at this page: http://rsb.info.nih.gov/ij/macros/

Justin

On 5/21/07, Frances Knapczyk <[hidden email]> wrote:

> Hello,
>   I need to measure four distances on each of hundreds of photographs.  Is
> there a way to get Image J to create this structure in the Results output?
> Ideally, the results file would have the photo id# (or just a simple
> numbering corresponding to measuring order) in the left column, and the
> series of measurements as column headings.  Each row would then contain four
> measurements that are from one image.
>   Thanks for any suggestions you have.
>
> Frances Knapczyk
> Plant Biology
> Michigan State University
>