From: Gerbil Gerbil on
Hey everyone,

I have a program that does interactive selection of ROIs, using the
imroi class. One thing I'm trying to do is label the ROIs on the
image, directly below the ROI box. For whatever reason, I can't find
anything to do this in a straightforward way.

There is an annotation function, but it takes arguments from zero to
one, and seems to have a different set of axes (the entire plot area
vs. just the image), so it has little relation to the location I get
from the getPosition function, which follows the standard matlab
indices.

If I have the handle of my roi, say, h_roi, how to I use that to
insert a text box or some other type of label near or pointing to it?
It would be too cumbersome to use the gui for this, so I have to find
a command line way to do it.

Thanks for your help,

Laura
From: ImageAnalyst on
Get some coordinate on your roi, then use the function text() to place
some text near that coordinate.