Assigning labels to results for multiple ROIs

I am trying to write a macro that will analyze the cross sectional area of multiple ROIs on one channel, and will assign each ROI a label based on the mean gray scale intensities for that ROI on other channels (To be specific, I want it to measure muscle fiber cross sectional area based on a laminin stain on one channel, and assign each ROI a fiber type based on fiber type stains on other channels).

I can get the cross sectional area, I can get gray scale intensities of ROIs from one channel on another, but I can’t change the labels. Anyone have any idea how to write a macro for this?

Thanks!

Hello Lyle -

If you are asking how to change the name of an ROI in the ROI
Manager (I’m assuming, based on your post, that you know how
to generate the desired name.), you can use the ijm roiManager
“rename” command: roiManager ("Rename", name).

Here is an ijm macro that illustrates this:

// add some ROIs to the ROI Manager
run ("Blobs (25K)");
makeRectangle (32, 32, 32, 32);
roiManager ("Add");
makeRectangle (128, 128, 64, 64);
roiManager ("Add");
// rename the secome (index = 1) ROI
roiManager ("Select", 1)
roiManager ("Rename", "second roi")

Thanks, mm