Re: ROI manager Tools: how to put label name into result table?

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

Re: ROI manager Tools: how to put label name into result table?

Tiago Ferreira-2
Dear Anton,

I am posting this to the I1J mailing list as others are likely to either profit
from this discussion or help you further.

On Dec 27, 2013, at 20:37, Anton Lyakh wrote:
> I use ROI Manager Tools that you have developed. It is a nice and useful tool,
> and I use it to measure length of different lines.
>
> But the name of these labels look like "image-file-name-prefix:label-name".
> Could you help me to understand how to remove image-file-name-prefix from the
> label name displayed in the result table?

Historically, the Results table has only allowed for text in the "Label" column
(that is no longer the case since IJ 1.47o). That is the reason why both the
image title and the ROI name appear under the same heading (separated by the ":"
delimiter) rather than being displayed across dedicated columns.

I guess the easiest to remove "image_title" from the default "image_title:ROI_name",
label would be to use a small macro:

// ---- Start
for (i=0; i<nResults; i++) {
   oldLabel = getResultLabel(i);
   delimiter = indexOf(oldLabel, ":");
   newLabel = substring(oldLabel, delimiter+1);
   setResult("Label", i, newLabel);
}
// ---- End

Does that help?
-tiago
--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html