Re: how do you get an ROI name in a macro?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: how do you get an ROI name in a macro?

dpoburko
I'm really sorry about this one folks. I'm sure I'm going to smack my
forehead when I find out how to do this. I just need to know how to get
the name of a given ROI. For the last few days I've been going over the
roiManager documentation. I can see how to remain and ROI, but I can't
see how you get at the current name for an ROI. This is in the context
of a macro.

Tx,
Damon
Reply | Threaded
Open this post in threaded view
|

Re: how do you get an ROI name in a macro?

Matthew Eichenfield
In the ij.gui.Roi Class there is a public method called getName() which
returns either the String name or null if the ROI does not have a name.
I hope this helps,
Matthew Eichenfield
Reply | Threaded
Open this post in threaded view
|

Re: how do you get an ROI name in a macro?

Wayne Rasband
In reply to this post by dpoburko
On Apr 20, 2009, at 8:16 PM, Damon Poburko wrote:

> I'm really sorry about this one folks. I'm sure I'm going to smack my
> forehead when I find out how to do this. I just need to know how to
> get the name of a given ROI. For the last few days I've been going
> over the roiManager documentation. I can see how to remain and ROI,
> but I can't see how you get at the current name for an ROI. This is in
> the context of a macro.

The latest 1.42m daily build adds a getInfo("roi.name") function that
returns the ROI name or "" if there is no ROI or the ROI does not have
a name.

-wayne
Reply | Threaded
Open this post in threaded view
|

Re: how do you get an ROI name in a macro?

dpoburko
Wayne Rasband wrote:

> On Apr 20, 2009, at 8:16 PM, Damon Poburko wrote:
>
>> I'm really sorry about this one folks. I'm sure I'm going to smack my
>> forehead when I find out how to do this. I just need to know how to
>> get the name of a given ROI. For the last few days I've been going
>> over the roiManager documentation. I can see how to remain and ROI,
>> but I can't see how you get at the current name for an ROI. This is
>> in the context of a macro.
>
> The latest 1.42m daily build adds a getInfo("roi.name") function that
> returns the ROI name or "" if there is no ROI or the ROI does not have
> a name.
>
> -wayne
Thanks Wayne!