Get the selected indexes within the roiManager

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

Get the selected indexes within the roiManager

CARL Philippe (LBP)
Dear all,
Within the roiManager, there are the following methods:
        - roiManager("select", index)   to select a single ROI within the
ROI Manager list
        - roiManager("select", indexes) to select several ROIs within the
ROI Manager list, with indexes being an array of integers
But the roiManager("index") method returns only "the index of the first
selected ROI if more than one ROI is selected".
Thus how is it possible to get the list of selected indexes in the case more
than one ROI has been selected?
For information, I want to get the selected ROI indexes in order to make
some sequential calculations on them.
I thank you very much in advance for your lightings on this question.
My best regards,
Philippe

Philippe CARL
Laboratoire de Bioimagerie et Pathologies
UMR 7021 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: Get the selected indexes within the roiManager

Herbie
Bonjour Philippe,

I don't fully understand your problem.

In the context of your question the crucial issue for me is:
     How are the ROIs originally selected?

If they are selected by "roiManager("select", indexes)", you should know
the indices.

Some details my help.

Best

Herbie

:::::::::::::::::::::::::::::::::::::::::::
Am 15.04.19 um 14:26 schrieb Philippe CARL:

> Dear all,
> Within the roiManager, there are the following methods:
> - roiManager("select", index)   to select a single ROI within the
> ROI Manager list
> - roiManager("select", indexes) to select several ROIs within the
> ROI Manager list, with indexes being an array of integers
> But the roiManager("index") method returns only "the index of the first
> selected ROI if more than one ROI is selected".
> Thus how is it possible to get the list of selected indexes in the case more
> than one ROI has been selected?
> For information, I want to get the selected ROI indexes in order to make
> some sequential calculations on them.
> I thank you very much in advance for your lightings on this question.
> My best regards,
> Philippe
>
> Philippe CARL
> Laboratoire de Bioimagerie et Pathologies
> UMR 7021 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
>

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

Re: Get the selected indexes within the roiManager

Jan Eglinger
In reply to this post by CARL Philippe (LBP)
Dear Philippe,

is it an option for you to switch to a different scripting language?
In all other languages except IJ1 macros, this can be done easily:

Here's a Groovy example:

     #@ RoiManager rm
     println rm.getSelectedIndexes()

Cheers
Jan



On 15.04.2019 14:26, Philippe CARL wrote:

> Dear all,
> Within the roiManager, there are the following methods:
> - roiManager("select", index)   to select a single ROI within the
> ROI Manager list
> - roiManager("select", indexes) to select several ROIs within the
> ROI Manager list, with indexes being an array of integers
> But the roiManager("index") method returns only "the index of the first
> selected ROI if more than one ROI is selected".
> Thus how is it possible to get the list of selected indexes in the case more
> than one ROI has been selected?
> For information, I want to get the selected ROI indexes in order to make
> some sequential calculations on them.
> I thank you very much in advance for your lightings on this question.
> My best regards,
> Philippe
>
> Philippe CARL
> Laboratoire de Bioimagerie et Pathologies
> UMR 7021 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
>

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

Re: Get the selected indexes within the roiManager

CARL Philippe (LBP)
In reply to this post by Herbie
Gruss Gott Herbie,
Sorry for potentially introducing the confusion by talking about "roiManager("select", indexes)".
In my present problem, the single (or several) ROI (or ROIs) will be selected by the user through a waitForUser step.
Thus within my code I need to know the index or indexes of the selected ROI(s).
I just wanted to point out that in the selection direction, the option is given to select either one or several ROIs.
But up to now AFAIK you can only get the index of the first ROI in the case several of them have been selected.
My best regards,
Philippe

-----Message d'origine-----
De : ImageJ Interest Group [mailto:[hidden email]] De la part de Herbie
Envoyé : lundi 15 avril 2019 14:36
À : [hidden email]
Objet : Re: Get the selected indexes within the roiManager

Bonjour Philippe,

I don't fully understand your problem.

In the context of your question the crucial issue for me is:
     How are the ROIs originally selected?

If they are selected by "roiManager("select", indexes)", you should know
the indices.

Some details my help.

Best

Herbie

:::::::::::::::::::::::::::::::::::::::::::
Am 15.04.19 um 14:26 schrieb Philippe CARL:

> Dear all,
> Within the roiManager, there are the following methods:
> - roiManager("select", index)   to select a single ROI within the
> ROI Manager list
> - roiManager("select", indexes) to select several ROIs within the
> ROI Manager list, with indexes being an array of integers
> But the roiManager("index") method returns only "the index of the first
> selected ROI if more than one ROI is selected".
> Thus how is it possible to get the list of selected indexes in the case more
> than one ROI has been selected?
> For information, I want to get the selected ROI indexes in order to make
> some sequential calculations on them.
> I thank you very much in advance for your lightings on this question.
> My best regards,
> Philippe
>
> Philippe CARL
> Laboratoire de Bioimagerie et Pathologies
> UMR 7021 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
>

--
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: Get the selected indexes within the roiManager

Herbie
D'accord Philippe!

In any case you mean selected in the ROI-manager list not in the image.

I remember a similar request:
<http://imagej.1557.x6.nabble.com/Getting-a-list-of-indexes-of-selected-ROIs-td5013762.html>

Also see:
<https://forum.image.sc/t/retrieving-indices-of-multiple-selected-rois-in-a-macro/10329/16>

Perhaps these posts may help you further.

Best

Herbie

:::::::::::::::::::::::::::::::::::::::::::
Am 15.04.19 um 14:49 schrieb Philippe CARL:

> Gruss Gott Herbie,
> Sorry for potentially introducing the confusion by talking about "roiManager("select", indexes)".
> In my present problem, the single (or several) ROI (or ROIs) will be selected by the user through a waitForUser step.
> Thus within my code I need to know the index or indexes of the selected ROI(s).
> I just wanted to point out that in the selection direction, the option is given to select either one or several ROIs.
> But up to now AFAIK you can only get the index of the first ROI in the case several of them have been selected.
> My best regards,
> Philippe
>
> -----Message d'origine-----
> De : ImageJ Interest Group [mailto:[hidden email]] De la part de Herbie
> Envoyé : lundi 15 avril 2019 14:36
> À : [hidden email]
> Objet : Re: Get the selected indexes within the roiManager
>
> Bonjour Philippe,
>
> I don't fully understand your problem.
>
> In the context of your question the crucial issue for me is:
>       How are the ROIs originally selected?
>
> If they are selected by "roiManager("select", indexes)", you should know
> the indices.
>
> Some details my help.
>
> Best
>
> Herbie
>
> :::::::::::::::::::::::::::::::::::::::::::
> Am 15.04.19 um 14:26 schrieb Philippe CARL:
>> Dear all,
>> Within the roiManager, there are the following methods:
>> - roiManager("select", index)   to select a single ROI within the
>> ROI Manager list
>> - roiManager("select", indexes) to select several ROIs within the
>> ROI Manager list, with indexes being an array of integers
>> But the roiManager("index") method returns only "the index of the first
>> selected ROI if more than one ROI is selected".
>> Thus how is it possible to get the list of selected indexes in the case more
>> than one ROI has been selected?
>> For information, I want to get the selected ROI indexes in order to make
>> some sequential calculations on them.
>> I thank you very much in advance for your lightings on this question.
>> My best regards,
>> Philippe
>>
>> Philippe CARL
>> Laboratoire de Bioimagerie et Pathologies
>> UMR 7021 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
>>
>
> --
> 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: Get the selected indexes within the roiManager

CARL Philippe (LBP)
Dear Herbie,
Your indicated links solved my issue!
Thanks a lot and have a nice day.
My best regards,
Philippe

-----Message d'origine-----
De : ImageJ Interest Group [mailto:[hidden email]] De la part de Herbie
Envoyé : lundi 15 avril 2019 15:07
À : [hidden email]
Objet : Re: Get the selected indexes within the roiManager

D'accord Philippe!

In any case you mean selected in the ROI-manager list not in the image.

I remember a similar request:
<http://imagej.1557.x6.nabble.com/Getting-a-list-of-indexes-of-selected-ROIs-td5013762.html>

Also see:
<https://forum.image.sc/t/retrieving-indices-of-multiple-selected-rois-in-a-macro/10329/16>

Perhaps these posts may help you further.

Best

Herbie

:::::::::::::::::::::::::::::::::::::::::::
Am 15.04.19 um 14:49 schrieb Philippe CARL:

> Gruss Gott Herbie,
> Sorry for potentially introducing the confusion by talking about "roiManager("select", indexes)".
> In my present problem, the single (or several) ROI (or ROIs) will be selected by the user through a waitForUser step.
> Thus within my code I need to know the index or indexes of the selected ROI(s).
> I just wanted to point out that in the selection direction, the option is given to select either one or several ROIs.
> But up to now AFAIK you can only get the index of the first ROI in the case several of them have been selected.
> My best regards,
> Philippe
>
> -----Message d'origine-----
> De : ImageJ Interest Group [mailto:[hidden email]] De la part de Herbie
> Envoyé : lundi 15 avril 2019 14:36
> À : [hidden email]
> Objet : Re: Get the selected indexes within the roiManager
>
> Bonjour Philippe,
>
> I don't fully understand your problem.
>
> In the context of your question the crucial issue for me is:
>       How are the ROIs originally selected?
>
> If they are selected by "roiManager("select", indexes)", you should know
> the indices.
>
> Some details my help.
>
> Best
>
> Herbie
>
> :::::::::::::::::::::::::::::::::::::::::::
> Am 15.04.19 um 14:26 schrieb Philippe CARL:
>> Dear all,
>> Within the roiManager, there are the following methods:
>> - roiManager("select", index)   to select a single ROI within the
>> ROI Manager list
>> - roiManager("select", indexes) to select several ROIs within the
>> ROI Manager list, with indexes being an array of integers
>> But the roiManager("index") method returns only "the index of the first
>> selected ROI if more than one ROI is selected".
>> Thus how is it possible to get the list of selected indexes in the case more
>> than one ROI has been selected?
>> For information, I want to get the selected ROI indexes in order to make
>> some sequential calculations on them.
>> I thank you very much in advance for your lightings on this question.
>> My best regards,
>> Philippe
>>
>> Philippe CARL
>> Laboratoire de Bioimagerie et Pathologies
>> UMR 7021 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
>>
>
> --
> 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

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