A couple/several of issues about the ROI Manager

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

A couple/several of issues about the ROI Manager

CARL Philippe (LBP)
Dear all / Wayne,

I’m contacting you again about a couple issues found within the ROI Manager
which is a very powerful feature I really use a lot for my applications
(actually for all of my applications).

So here is the list of the found issues:

-          Macro recorder: the recorder isn’t anymore saving the show_all
and label fonctions of the ROI Manager

-          The fonction Update of the ROI Manager can’t be used anymore:
when you select a ROI in the ROI Manager, then select something else in the
picture, the ROI in the ROI Manager gets deselected and thus it isn’t
anymore possible to update it.

I’m unfortunately almost sure that the ROI Manager behaves this way
following a modification I already asked in a mail from the 30th October L

I think what should be the best behavior of the ROI Manager concerning this
issue is that it behaves similarly to how it was in the version 1.45s,
where, when selecting a ROI in the ROI Manager it gets selected and by
clicking again on it gets deselected, that is it…

-          Restore selection: I guess this issue is more or less connected
with the previous one and can be seen by putting a couple (let’s say 3) ROIs
in the ROI Manager, then make another selection with a selection tool in the
picture, then reselect a ROI in the ROI manager (let’s say the second one)
and by restoring the selection (Shift + e) you are actually reselecting the
last ROI in the ROI manager (i.e. the third one) and not the last manually
draw ROI as expected.

-          Multiple selections in the ROI Manager: By selecting several ROIs
within the ROI Manager, I would expect that all the selected ROIs are shown
up in the picture, but only the first selected one can be seen.

I thank you very much for your feedback and/or answer on this issues.

My best regards,

Philippe

 

Philippe CARL

Laboratoire de Biophotonique et Pharmacologie

UMR 7213 CNRS - Université de Strasbourg

Faculté de Pharmacie

74 route du Rhin

67401 ILLKIRCH

Tel : +33(0)3 68 85 41 84


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: A couple/several of issues about the ROI Manager

Rasband, Wayne (NIH/NIMH) [E]
On Feb 5, 2015, at 6:06 AM, Philippe CARL <[hidden email]> wrote:

>
> Dear all / Wayne,
>
> I'm contacting you again about a couple issues found within the ROI Manager
> which is a very powerful feature I really use a lot for my applications
> (actually for all of my applications).
>
> So here is the list of the found issues:
>
> -          Macro recorder: the recorder isn't anymore saving the show_all
> and label fonctions of the ROI Manager

This regression is fixed in the latest ImageJ daily build (1.49p13).

> -          The fonction Update of the ROI Manager can't be used anymore:
> when you select a ROI in the ROI Manager, then select something else in the
> picture, the ROI in the ROI Manager gets deselected and thus it isn't
> anymore possible to update it.

The ROI Manager’s “Update” command still works. You can move, resize, add to (by holding down shift key) or subtract from (by holding down alt key) an ROI, click “Update” and the ROI will be updated. What you can no longer do is use “Update” to replace an ROI in the ROI Manager with another ROI, but why would you need to do that?

> I'm unfortunately almost sure that the ROI Manager behaves this way
> following a modification I already asked in a mail from the 30th October L
>
> I think what should be the best behavior of the ROI Manager concerning this
> issue is that it behaves similarly to how it was in the version 1.45s,
> where, when selecting a ROI in the ROI Manager it gets selected and by
> clicking again on it gets deselected, that is it.
>
> -          Restore selection: I guess this issue is more or less connected
> with the previous one and can be seen by putting a couple (let's say 3) ROIs
> in the ROI Manager, then make another selection with a selection tool in the
> picture, then reselect a ROI in the ROI manager (let's say the second one)
> and by restoring the selection (Shift + e) you are actually reselecting the
> last ROI in the ROI manager (i.e. the third one) and not the last manually
> draw ROI as expected.

This bug is fixed in the latest daily build (1.49p13).

> -          Multiple selections in the ROI Manager: By selecting several ROIs
> within the ROI Manager, I would expect that all the selected ROIs are shown
> up in the picture, but only the first selected one can be seen.

Only the first ROI is shown because, except in an overlay, ImageJ can only display one ROI at a time.

-wayne


> I thank you very much for your feedback and/or answer on this issues.
>
> My best regards,
>
> Philippe

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: A couple/several of issues about the ROI Manager

CARL Philippe (LBP)
Dear Wayne,
I thank you very much for your updates which are already improving a lot the
ROI Manager tool.
I would just have two comments on these updates:

>> -          Macro recorder: the recorder isn't anymore saving the show_all
>> and label fonctions of the ROI Manager
> This regression is fixed in the latest ImageJ daily build (1.49p13).

"roiManager("Show All");" is recorded the first time you press the "Show
All" CheckBox, but after that it is not recorded anymore, as
"roiManager("Show None");" is correctly recorded each time you deselect the
"Show All" CheckBox.
In the same way "roiManager("Show All with labels");" is correctly recorded
as "roiManager("Show All without labels");" isn't recorded each time you
press the "Labels" CheckBox.

>> -          Multiple selections in the ROI Manager: By selecting several
ROIs
>> within the ROI Manager, I would expect that all the selected ROIs are
>> shown up in the picture, but only the first selected one can be seen.
> Only the first ROI is shown because, except in an overlay, ImageJ can only
display one ROI at a time.

Up to now in ImageJ it is possible to simultaneously display all the ROIs in
the ROI Manager with the "Show All" feature together (= simultaneously) with
a selection and a ROI.
Now let's say you have a couple hundred of ROIs within the ROI Manager, and
you want then select several tens of them is order to apply a logical
combination (OR, XOR, AND)...
Today this is a quite difficult task unless of course there is an easy
solution that I may be missing.
What I'm thinking about is a code similar to what is running behind the
"Show All" feature as soon as you select more than a ROI within the ROI
Manager.
Only the first ROI is drawn as up selection, but behind you see all the
other selected ones and this selection is of course as well ignored in the
case the "Show All" CheckBox is set to "true".

I thank you very much in advance for your answer and work on this.
Have a nice day,
Philippe

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: A couple/several of issues about the ROI Manager

Romain Guiet
Hi Philippe,

I don't know if I understood correctly what you're looking for but did you try the function :

roiManager("select", indexes)
Selects multiple items in the ROI Manager list, where indexes is an array of integers, each of which must be greater than or equal to 0 and less than the value returned by roiManager("count").
The selected ROIs are not highlighted in the ROI Manager list and are no longer selected after the next ROI Manager command is executed.



Cheers,

Romain

---------------------------------------------------------------
Dr. Romain Guiet
Bioimaging and Optics Platform (PT-BIOP)
Ecole Polytechnique Fédérale de Lausanne (EPFL)
Faculty of Life Sciences
Station 19, AI 0140
CH-1015 Lausanne

Phone: [+4121 69] 39629
http://biop.epfl.ch/
---------------------------------------------------------------

________________________________________
De : ImageJ Interest Group [[hidden email]] de la part de Philippe CARL [[hidden email]]
Envoyé : mercredi 18 février 2015 10:58
À : [hidden email]
Objet : Re: A couple/several of issues about the ROI Manager

Dear Wayne,
I thank you very much for your updates which are already improving a lot the
ROI Manager tool.
I would just have two comments on these updates:

>> -          Macro recorder: the recorder isn't anymore saving the show_all
>> and label fonctions of the ROI Manager
> This regression is fixed in the latest ImageJ daily build (1.49p13).

"roiManager("Show All");" is recorded the first time you press the "Show
All" CheckBox, but after that it is not recorded anymore, as
"roiManager("Show None");" is correctly recorded each time you deselect the
"Show All" CheckBox.
In the same way "roiManager("Show All with labels");" is correctly recorded
as "roiManager("Show All without labels");" isn't recorded each time you
press the "Labels" CheckBox.

>> -          Multiple selections in the ROI Manager: By selecting several
ROIs
>> within the ROI Manager, I would expect that all the selected ROIs are
>> shown up in the picture, but only the first selected one can be seen.
> Only the first ROI is shown because, except in an overlay, ImageJ can only
display one ROI at a time.

Up to now in ImageJ it is possible to simultaneously display all the ROIs in
the ROI Manager with the "Show All" feature together (= simultaneously) with
a selection and a ROI.
Now let's say you have a couple hundred of ROIs within the ROI Manager, and
you want then select several tens of them is order to apply a logical
combination (OR, XOR, AND)...
Today this is a quite difficult task unless of course there is an easy
solution that I may be missing.
What I'm thinking about is a code similar to what is running behind the
"Show All" feature as soon as you select more than a ROI within the ROI
Manager.
Only the first ROI is drawn as up selection, but behind you see all the
other selected ones and this selection is of course as well ignored in the
case the "Show All" CheckBox is set to "true".

I thank you very much in advance for your answer and work on this.
Have a nice day,
Philippe

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: A couple/several of issues about the ROI Manager

CARL Philippe (LBP)
Dear Romain,
As you pointed it correctly out, The macro instruction "roiManager("select",
indexes)" with "indexes" being an array of integers between 0 and
"roiManager("count")" is indeed doing the required job...
The "only" problem is to know WHAT you are putting within this "indexes"
array...
So I want (or rather need) to manually build up this array given certain
conditions (intensity [or evolution of the intensity on a time lapse] of the
pixels within a given ROI ; x, y position of a given ROI ; ...)...
And up to now it is not possible to see the newly added ROI in a selection
within the ROI Manager but only the first selected ROI.
What would actually be perfect is to have all the selected ROIs within the
ROI Manager displayed in the same way than in the "Show All" feature and the
last selected or added ROI within the selection as being highlighted.
But even without the last added ROI within the selection being highlighted,
I would already be extremely happy...
Bonne fin de journée,
Philippe

-----Message d'origine-----
De : ImageJ Interest Group [mailto:[hidden email]] De la part de Guiet
Romain
Envoyé : mercredi 18 février 2015 11:31
À : [hidden email]
Objet : Re: A couple/several of issues about the ROI Manager

Hi Philippe,

I don't know if I understood correctly what you're looking for but did you
try the function :

roiManager("select", indexes)
Selects multiple items in the ROI Manager list, where indexes is an array of
integers, each of which must be greater than or equal to 0 and less than the
value returned by roiManager("count").
The selected ROIs are not highlighted in the ROI Manager list and are no
longer selected after the next ROI Manager command is executed.



Cheers,

Romain

---------------------------------------------------------------
Dr. Romain Guiet
Bioimaging and Optics Platform (PT-BIOP) Ecole Polytechnique Fédérale de
Lausanne (EPFL) Faculty of Life Sciences Station 19, AI 0140
CH-1015 Lausanne

Phone: [+4121 69] 39629
http://biop.epfl.ch/
---------------------------------------------------------------

________________________________________
De : ImageJ Interest Group [[hidden email]] de la part de Philippe CARL
[[hidden email]] Envoyé : mercredi 18 février 2015 10:58 À :
[hidden email] Objet : Re: A couple/several of issues about the ROI
Manager

Dear Wayne,
I thank you very much for your updates which are already improving a lot the
ROI Manager tool.
I would just have two comments on these updates:

>> -          Macro recorder: the recorder isn't anymore saving the show_all
>> and label fonctions of the ROI Manager
> This regression is fixed in the latest ImageJ daily build (1.49p13).

"roiManager("Show All");" is recorded the first time you press the "Show
All" CheckBox, but after that it is not recorded anymore, as
"roiManager("Show None");" is correctly recorded each time you deselect the
"Show All" CheckBox.
In the same way "roiManager("Show All with labels");" is correctly recorded
as "roiManager("Show All without labels");" isn't recorded each time you
press the "Labels" CheckBox.

>> -          Multiple selections in the ROI Manager: By selecting several
ROIs
>> within the ROI Manager, I would expect that all the selected ROIs are
>> shown up in the picture, but only the first selected one can be seen.
> Only the first ROI is shown because, except in an overlay, ImageJ can
> only
display one ROI at a time.

Up to now in ImageJ it is possible to simultaneously display all the ROIs in
the ROI Manager with the "Show All" feature together (= simultaneously) with
a selection and a ROI.
Now let's say you have a couple hundred of ROIs within the ROI Manager, and
you want then select several tens of them is order to apply a logical
combination (OR, XOR, AND)...
Today this is a quite difficult task unless of course there is an easy
solution that I may be missing.
What I'm thinking about is a code similar to what is running behind the
"Show All" feature as soon as you select more than a ROI within the ROI
Manager.
Only the first ROI is drawn as up selection, but behind you see all the
other selected ones and this selection is of course as well ignored in the
case the "Show All" CheckBox is set to "true".

I thank you very much in advance for your answer and work on this.
Have a nice day,
Philippe

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: A couple/several of issues about the ROI Manager

Jerome Mutterer-3
In reply to this post by Romain Guiet
Salut Philippe.

The following javascript transiently displays rois that are selected in the
Roi manager.
Maybe you could use something like this.
Sincerely,

Jerome


imp = IJ.getImage();
rm=RoiManager.getInstance();
rm.runCommand("Show None");
si=rm.getSelectedIndexes();
overlay = new Overlay();
for (i in si) {
roi = rm.getRoi(si[i]);
     roi.setStrokeWidth(0.1);
     roi.setStrokeColor(Color.cyan);
overlay.add(roi);
}
imp.setOverlay(overlay);
IJ.wait(2000);
overlay.clear();
imp.setOverlay(overlay);
rm.runCommand("Show All");





On 18 February 2015 at 14:58, Philippe CARL <[hidden email]>
wrote:
>
> Dear Romain,
> As you pointed it correctly out, The macro instruction
"roiManager("select",
> indexes)" with "indexes" being an array of integers between 0 and
> "roiManager("count")" is indeed doing the required job...
> The "only" problem is to know WHAT you are putting within this "indexes"
> array...
> So I want (or rather need) to manually build up this array given certain
> conditions (intensity [or evolution of the intensity on a time lapse] of
the
> pixels within a given ROI ; x, y position of a given ROI ; ...)...
> And up to now it is not possible to see the newly added ROI in a selection
> within the ROI Manager but only the first selected ROI.
> What would actually be perfect is to have all the selected ROIs within the
> ROI Manager displayed in the same way than in the "Show All" feature and
the
> last selected or added ROI within the selection as being highlighted.
> But even without the last added ROI within the selection being
highlighted,
> I would already be extremely happy...
> Bonne fin de journée,
> Philippe
>
> -----Message d'origine-----
> De : ImageJ Interest Group [mailto:[hidden email]] De la part de
Guiet

> Romain
> Envoyé : mercredi 18 février 2015 11:31
> À : [hidden email]
> Objet : Re: A couple/several of issues about the ROI Manager
>
> Hi Philippe,
>
> I don't know if I understood correctly what you're looking for but did you
> try the function :
>
> roiManager("select", indexes)
> Selects multiple items in the ROI Manager list, where indexes is an array
of
> integers, each of which must be greater than or equal to 0 and less than
the

> value returned by roiManager("count").
> The selected ROIs are not highlighted in the ROI Manager list and are no
> longer selected after the next ROI Manager command is executed.
>
>
>
> Cheers,
>
> Romain
>
> ---------------------------------------------------------------
> Dr. Romain Guiet
> Bioimaging and Optics Platform (PT-BIOP) Ecole Polytechnique Fédérale de
> Lausanne (EPFL) Faculty of Life Sciences Station 19, AI 0140
> CH-1015 Lausanne
>
> Phone: [+4121 69] 39629
> http://biop.epfl.ch/
> ---------------------------------------------------------------
>
> ________________________________________
> De : ImageJ Interest Group [[hidden email]] de la part de Philippe
CARL
> [[hidden email]] Envoyé : mercredi 18 février 2015 10:58 À :
> [hidden email] Objet : Re: A couple/several of issues about the ROI
> Manager
>
> Dear Wayne,
> I thank you very much for your updates which are already improving a lot
the
> ROI Manager tool.
> I would just have two comments on these updates:
>
> >> -          Macro recorder: the recorder isn't anymore saving the
show_all
> >> and label fonctions of the ROI Manager
> > This regression is fixed in the latest ImageJ daily build (1.49p13).
>
> "roiManager("Show All");" is recorded the first time you press the "Show
> All" CheckBox, but after that it is not recorded anymore, as
> "roiManager("Show None");" is correctly recorded each time you deselect
the
> "Show All" CheckBox.
> In the same way "roiManager("Show All with labels");" is correctly
recorded

> as "roiManager("Show All without labels");" isn't recorded each time you
> press the "Labels" CheckBox.
>
> >> -          Multiple selections in the ROI Manager: By selecting several
> ROIs
> >> within the ROI Manager, I would expect that all the selected ROIs are
> >> shown up in the picture, but only the first selected one can be seen.
> > Only the first ROI is shown because, except in an overlay, ImageJ can
> > only
> display one ROI at a time.
>
> Up to now in ImageJ it is possible to simultaneously display all the ROIs
in
> the ROI Manager with the "Show All" feature together (= simultaneously)
with
> a selection and a ROI.
> Now let's say you have a couple hundred of ROIs within the ROI Manager,
and

> you want then select several tens of them is order to apply a logical
> combination (OR, XOR, AND)...
> Today this is a quite difficult task unless of course there is an easy
> solution that I may be missing.
> What I'm thinking about is a code similar to what is running behind the
> "Show All" feature as soon as you select more than a ROI within the ROI
> Manager.
> Only the first ROI is drawn as up selection, but behind you see all the
> other selected ones and this selection is of course as well ignored in the
> case the "Show All" CheckBox is set to "true".
>
> I thank you very much in advance for your answer and work on this.
> Have a nice day,
> Philippe
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html




--
Jerome Mutterer
CNRS - Institut de biologie moléculaire des plantes
12, rue du Général Zimmer
67084 Strasbourg Cedex
www.ibmp.cnrs.fr

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: A couple/several of issues about the ROI Manager

CARL Philippe (LBP)
Salut Jérôme,
How are you doing?
What's new?
I thank you very much for your code which is indeed giving an excellent
solution for the discussed issue, especially when associated to an hotkey to
easily launch it.
For the users of the list who would as well be interested by using your code
within Fiji (sorry about that) I had to slightly modify your code (so that
it is working) in the following way:

importClass(Packages.ij.IJ);
importClass(Packages.ij.plugin.frame.RoiManager);
importClass(Packages.ij.gui.Overlay);
importClass(Packages.java.awt.Color);

imp = IJ.getImage();
rm = RoiManager.getInstance();
rm.runCommand("Show None");
si = rm.getSelectedIndexes();
overlay = new Overlay();
for(i in si)
{
        roi = rm.getRoi(si[i]);
// roi.setStrokeWidth(0.1);
// roi.setStrokeColor(Color.green);
        overlay.add(roi);
}
imp.setOverlay(overlay);
IJ.wait(2000);
overlay.clear();
imp.setOverlay(overlay);
rm.runCommand("Show All");

Also and especially, from your code I discovered the instruction "for(i in
si)" which I didn't know (since then I looked of course for all the
alternative options available for using the "for" instruction) and able me
now to modify (= simplify) other code I have (and that was written by using
the traditional way of the "for" instruction).

Thanks a lot and have a nice day,

Philippe

-----Message d'origine-----
De : ImageJ Interest Group [mailto:[hidden email]] De la part de Jerome
Mutterer
Envoyé : mercredi 18 février 2015 15:29
À : [hidden email]
Objet : Re: A couple/several of issues about the ROI Manager

Salut Philippe.

The following javascript transiently displays rois that are selected in the
Roi manager.
Maybe you could use something like this.
Sincerely,

Jerome


imp = IJ.getImage();
rm=RoiManager.getInstance();
rm.runCommand("Show None");
si=rm.getSelectedIndexes();
overlay = new Overlay();
for (i in si) {
roi = rm.getRoi(si[i]);
     roi.setStrokeWidth(0.1);
     roi.setStrokeColor(Color.cyan);
overlay.add(roi);
}
imp.setOverlay(overlay);
IJ.wait(2000);
overlay.clear();
imp.setOverlay(overlay);
rm.runCommand("Show All");





On 18 February 2015 at 14:58, Philippe CARL <[hidden email]>
wrote:
>
> Dear Romain,
> As you pointed it correctly out, The macro instruction
"roiManager("select",
> indexes)" with "indexes" being an array of integers between 0 and
> "roiManager("count")" is indeed doing the required job...
> The "only" problem is to know WHAT you are putting within this "indexes"
> array...
> So I want (or rather need) to manually build up this array given
> certain conditions (intensity [or evolution of the intensity on a time
> lapse] of
the
> pixels within a given ROI ; x, y position of a given ROI ; ...)...
> And up to now it is not possible to see the newly added ROI in a
> selection within the ROI Manager but only the first selected ROI.
> What would actually be perfect is to have all the selected ROIs within
> the ROI Manager displayed in the same way than in the "Show All"
> feature and
the
> last selected or added ROI within the selection as being highlighted.
> But even without the last added ROI within the selection being
highlighted,
> I would already be extremely happy...
> Bonne fin de journée,
> Philippe
>
> -----Message d'origine-----
> De : ImageJ Interest Group [mailto:[hidden email]] De la part de
Guiet

> Romain
> Envoyé : mercredi 18 février 2015 11:31 À : [hidden email] Objet
> : Re: A couple/several of issues about the ROI Manager
>
> Hi Philippe,
>
> I don't know if I understood correctly what you're looking for but did
> you try the function :
>
> roiManager("select", indexes)
> Selects multiple items in the ROI Manager list, where indexes is an
> array
of
> integers, each of which must be greater than or equal to 0 and less
> than
the

> value returned by roiManager("count").
> The selected ROIs are not highlighted in the ROI Manager list and are
> no longer selected after the next ROI Manager command is executed.
>
>
>
> Cheers,
>
> Romain
>
> ---------------------------------------------------------------
> Dr. Romain Guiet
> Bioimaging and Optics Platform (PT-BIOP) Ecole Polytechnique Fédérale
> de Lausanne (EPFL) Faculty of Life Sciences Station 19, AI 0140
> CH-1015 Lausanne
>
> Phone: [+4121 69] 39629
> http://biop.epfl.ch/
> ---------------------------------------------------------------
>
> ________________________________________
> De : ImageJ Interest Group [[hidden email]] de la part de
> Philippe
CARL
> [[hidden email]] Envoyé : mercredi 18 février 2015 10:58 À :
> [hidden email] Objet : Re: A couple/several of issues about the
> ROI Manager
>
> Dear Wayne,
> I thank you very much for your updates which are already improving a
> lot
the
> ROI Manager tool.
> I would just have two comments on these updates:
>
> >> -          Macro recorder: the recorder isn't anymore saving the
show_all
> >> and label fonctions of the ROI Manager
> > This regression is fixed in the latest ImageJ daily build (1.49p13).
>
> "roiManager("Show All");" is recorded the first time you press the
> "Show All" CheckBox, but after that it is not recorded anymore, as
> "roiManager("Show None");" is correctly recorded each time you
> deselect
the
> "Show All" CheckBox.
> In the same way "roiManager("Show All with labels");" is correctly
recorded
> as "roiManager("Show All without labels");" isn't recorded each time
> you press the "Labels" CheckBox.
>
> >> -          Multiple selections in the ROI Manager: By selecting several
> ROIs
> >> within the ROI Manager, I would expect that all the selected ROIs
> >> are shown up in the picture, but only the first selected one can be
seen.
> > Only the first ROI is shown because, except in an overlay, ImageJ
> > can only
> display one ROI at a time.
>
> Up to now in ImageJ it is possible to simultaneously display all the
> ROIs
in
> the ROI Manager with the "Show All" feature together (=
> simultaneously)
with
> a selection and a ROI.
> Now let's say you have a couple hundred of ROIs within the ROI
> Manager,
and

> you want then select several tens of them is order to apply a logical
> combination (OR, XOR, AND)...
> Today this is a quite difficult task unless of course there is an easy
> solution that I may be missing.
> What I'm thinking about is a code similar to what is running behind
> the "Show All" feature as soon as you select more than a ROI within
> the ROI Manager.
> Only the first ROI is drawn as up selection, but behind you see all
> the other selected ones and this selection is of course as well
> ignored in the case the "Show All" CheckBox is set to "true".
>
> I thank you very much in advance for your answer and work on this.
> Have a nice day,
> Philippe
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html




--
Jerome Mutterer
CNRS - Institut de biologie moléculaire des plantes 12, rue du Général
Zimmer
67084 Strasbourg Cedex
www.ibmp.cnrs.fr

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: A couple/several of issues about the ROI Manager

Rasband, Wayne (NIH/NIMH) [E]
In reply to this post by CARL Philippe (LBP)
On Feb 18, 2015, at 4:58 AM, Philippe CARL <[hidden email]> wrote:

>
> Dear Wayne,
> I thank you very much for your updates which are already improving a lot the
> ROI Manager tool.
> I would just have two comments on these updates:
>
>>> -          Macro recorder: the recorder isn't anymore saving the show_all
>>> and label fonctions of the ROI Manager
>> This regression is fixed in the latest ImageJ daily build (1.49p13).
>
> "roiManager("Show All");" is recorded the first time you press the "Show
> All" CheckBox, but after that it is not recorded anymore, as
> "roiManager("Show None");" is correctly recorded each time you deselect the
> "Show All" CheckBox.
> In the same way "roiManager("Show All with labels");" is correctly recorded
> as "roiManager("Show All without labels");" isn't recorded each time you
> press the "Labels" CheckBox.

These problems should be fixed in the latest daily build (1.49p17).

>
>>> -          Multiple selections in the ROI Manager: By selecting several
> ROIs
>>> within the ROI Manager, I would expect that all the selected ROIs are
>>> shown up in the picture, but only the first selected one can be seen.
>> Only the first ROI is shown because, except in an overlay, ImageJ can only
> display one ROI at a time.
>
> Up to now in ImageJ it is possible to simultaneously display all the ROIs in
> the ROI Manager with the "Show All" feature together (= simultaneously) with
> a selection and a ROI.
> Now let's say you have a couple hundred of ROIs within the ROI Manager, and
> you want then select several tens of them is order to apply a logical
> combination (OR, XOR, AND)...
> Today this is a quite difficult task unless of course there is an easy
> solution that I may be missing.
> What I'm thinking about is a code similar to what is running behind the
> "Show All" feature as soon as you select more than a ROI within the ROI
> Manager.
> Only the first ROI is drawn as up selection, but behind you see all the
> other selected ones and this selection is of course as well ignored in the
> case the "Show All" CheckBox is set to "true”.

The following JavaScript code highlights selected ROIs in “Show All” mode. Selected ROIs are drawn in cyan with a stroke width of 2 and all others are drawn in the default ROI color and stroke width. This code requires the latest daily build, which adds the RoiManager.isSelected() method.

-wayne

   rm = RoiManager.getInstance();
   for (i=0; i<rm.getCount(); i++) {
     roi = rm.getRoi(i);
     if (rm.isSelected(i)) {
        roi.setStrokeWidth(2);
        roi.setStrokeColor(Color.cyan);
     } else {
        roi.setStrokeWidth(0);
        roi.setStrokeColor(Roi.getColor());
    }
  }
  rm.runCommand("Show All");




--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html