Altering results table from info printed in Log

Lets see if I can explain this thoroughly enough…
I have written a macro that analyzed muscle fiber size (cross sectional area), fiber type, and finds central nuclei in the middle of the fibers. The way it determines central nuclei is by creating ROIs from a DAPI stain of nuclei, then creating an ROI in the middle of the fiber, and simply determining if there is overlap between the ROIs. The program works very well, but I want to make it more user-friendly, especially with how the results are displayed.

The output of my program is a text file of the size and fiber type results, plus a saved Log file where the overlapping ROIs were printed. What I want is one results text file with all the information on it: Fibertype, area, and either yes/no or 1/0 for whether or not there is a central nuclei. This is the code that finds the overlapping ROIs, where i = the ROIs of the muscle fibers, and j = the ROIs of the nuclei.

for (i=0;i<roiManager('count');i++){
  for (j=0;j<roiManager('count');j++){
    roiManager('select',newArray(i,j));
    roiManager("AND");
    if ((i!=j)&&(selectionType>-1)) {
    print (i,j,"Overlap");  
    }
  }
}

Here are the issues I need help with:

How do I access the information printed in the Log?

Is there another way to store the information of which ROIs overlap?

When creating a new column in the results, I need an array (I think). How could I convert this data into an array (there are about 100 fibers in the test image, and only one central nuclei, so the number of items in the arrays won’t match)?

Thanks!
-Lyle Babcock

1 Like