roiManager("Deselect");

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

roiManager("Deselect");

Ed Siefker
roiManager("Deselect"); does not work.

Just FYI.  I'm using run("Select None"); and it works fine.
-Ed

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

Re: roiManager("Deselect");

Michael Schmid-3
Hi Ed,

there is a fundamental difference between these two commands:

   run("Select None");
Clears any selection (ROI) from the active image

   roiManager("Deselect");
Clears any selection in the *list* of ROIs displayed in the ROI Manager.

See:
   http://imagej.nih.gov/ij/docs/guide/146-27.html#toc-Subsubsection-27.12.2
 
http://imagej.nih.gov/ij/developer/macro/functions.html#roiManager(%22deselect%22)



Here is an example:

run("Blobs (25K)");
setAutoThreshold("Default");
run("Analyze Particles...", "add");
roiManager("Select", 3);
wait(1000);
roiManager("Deselect");

In the list of ROIs shown in the ROI Manager, you will see that the
macro selects the fourth line from the top (index 3, starting from 0),
named "0068-0011". One second later the line will be deselected.


Michael
________________________________________________________________
On 04.12.18 21:31, Ed Siefker wrote:
> roiManager("Deselect"); does not work.
>
> Just FYI.  I'm using run("Select None"); and it works fine.
> -Ed
>
> --
> 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: roiManager("Deselect");

Ed Siefker
I'm a little confused.  What's the point of deselecting the ROI in the
manager if it doesn't affect the selection in the image?  I can see
that "Deselect" removes the highlighting from the line, does that have
any other effects?  What use case is there for this function?
On Wed, Dec 5, 2018 at 4:00 AM Michael Schmid <[hidden email]> wrote:

>
> Hi Ed,
>
> there is a fundamental difference between these two commands:
>
>    run("Select None");
> Clears any selection (ROI) from the active image
>
>    roiManager("Deselect");
> Clears any selection in the *list* of ROIs displayed in the ROI Manager.
>
> See:
>    http://imagej.nih.gov/ij/docs/guide/146-27.html#toc-Subsubsection-27.12.2
>
> http://imagej.nih.gov/ij/developer/macro/functions.html#roiManager(%22deselect%22)
>
>
>
> Here is an example:
>
> run("Blobs (25K)");
> setAutoThreshold("Default");
> run("Analyze Particles...", "add");
> roiManager("Select", 3);
> wait(1000);
> roiManager("Deselect");
>
> In the list of ROIs shown in the ROI Manager, you will see that the
> macro selects the fourth line from the top (index 3, starting from 0),
> named "0068-0011". One second later the line will be deselected.
>
>
> Michael
> ________________________________________________________________
> On 04.12.18 21:31, Ed Siefker wrote:
> > roiManager("Deselect"); does not work.
> >
> > Just FYI.  I'm using run("Select None"); and it works fine.
> > -Ed
> >
> > --
> > 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: roiManager("Deselect");

Herbie
Good day Ed,

I can confirm that there is a problem with

        roiManager("Deselect");

This little macro demonstrates it:


// begin
run("Set Measurements...", "area mean redirect=None decimal=1");
newImage("Untitled", "8-bit ramp", 256, 256, 1);
makeOval(11, 7, 116, 116);
roiManager("Add");
makeOval(166, 23, 79, 206);
roiManager("Add");
makeOval(21, 174, 135, 40);
roiManager("Add");
roiManager("Show All");
roiManager("Select", 1);
run("Measure");
roiManager("Deselect");
run("Measure");
exit();
// end

In fact both calls of
       
        run("Measure");

give the same result in spite of the fact that the ROI #1 was deselected
but in fact it isn't. Inserting

        roiManager("update")

doesn't change this situation.

Perhaps Wayne could have a look at this problem.

Regards

Herbie

::::::::::::::::::::::::::::::::::::::::
Am 05.12.18 um 17:06 schrieb Ed Siefker:

> I'm a little confused.  What's the point of deselecting the ROI in the
> manager if it doesn't affect the selection in the image?  I can see
> that "Deselect" removes the highlighting from the line, does that have
> any other effects?  What use case is there for this function?
> On Wed, Dec 5, 2018 at 4:00 AM Michael Schmid <[hidden email]> wrote:
>>
>> Hi Ed,
>>
>> there is a fundamental difference between these two commands:
>>
>>     run("Select None");
>> Clears any selection (ROI) from the active image
>>
>>     roiManager("Deselect");
>> Clears any selection in the *list* of ROIs displayed in the ROI Manager.
>>
>> See:
>>     http://imagej.nih.gov/ij/docs/guide/146-27.html#toc-Subsubsection-27.12.2
>>
>> http://imagej.nih.gov/ij/developer/macro/functions.html#roiManager(%22deselect%22)
>>
>>
>>
>> Here is an example:
>>
>> run("Blobs (25K)");
>> setAutoThreshold("Default");
>> run("Analyze Particles...", "add");
>> roiManager("Select", 3);
>> wait(1000);
>> roiManager("Deselect");
>>
>> In the list of ROIs shown in the ROI Manager, you will see that the
>> macro selects the fourth line from the top (index 3, starting from 0),
>> named "0068-0011". One second later the line will be deselected.
>>
>>
>> Michael
>> ________________________________________________________________
>> On 04.12.18 21:31, Ed Siefker wrote:
>>> roiManager("Deselect"); does not work.
>>>
>>> Just FYI.  I'm using run("Select None"); and it works fine.
>>> -Ed
>>>
>>> --
>>> 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: roiManager("Deselect");

Wayne Rasband-2
In reply to this post by Ed Siefker
> On Dec 5, 2018, at 11:06 AM, Ed Siefker <[hidden email]> wrote:
>
> I'm a little confused.  What's the point of deselecting the ROI in the
> manager if it doesn't affect the selection in the image?  I can see
> that "Deselect" removes the highlighting from the line, does that have
> any other effects?  What use case is there for this function?

It’s not intuitive, but use roiManager("Deselect”) when you want to operate on all the ROI’s using commands such as roiManager("Measure”) or roiManager(“Fill”). These commands operate on all the ROI’s if none are selected.

-wayne


> On Wed, Dec 5, 2018 at 4:00 AM Michael Schmid <[hidden email]> wrote:
>>
>> Hi Ed,
>>
>> there is a fundamental difference between these two commands:
>>
>>   run("Select None");
>> Clears any selection (ROI) from the active image
>>
>>   roiManager("Deselect");
>> Clears any selection in the *list* of ROIs displayed in the ROI Manager.
>>
>> See:
>>   http://imagej.nih.gov/ij/docs/guide/146-27.html#toc-Subsubsection-27.12.2
>>
>> http://imagej.nih.gov/ij/developer/macro/functions.html#roiManager(%22deselect%22)
>>
>>
>>
>> Here is an example:
>>
>> run("Blobs (25K)");
>> setAutoThreshold("Default");
>> run("Analyze Particles...", "add");
>> roiManager("Select", 3);
>> wait(1000);
>> roiManager("Deselect");
>>
>> In the list of ROIs shown in the ROI Manager, you will see that the
>> macro selects the fourth line from the top (index 3, starting from 0),
>> named "0068-0011". One second later the line will be deselected.
>>
>>
>> Michael
>> ________________________________________________________________
>> On 04.12.18 21:31, Ed Siefker wrote:
>>> roiManager("Deselect"); does not work.
>>>
>>> Just FYI.  I'm using run("Select None"); and it works fine.
>>> -Ed
>>>
>>> --
>>> 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: roiManager("Deselect");

Wayne Rasband-2
In reply to this post by Herbie
> On Dec 5, 2018, at 11:27 AM, Herbie <[hidden email]> wrote:
>
> Good day Ed,
>
> I can confirm that there is a problem with
>
> roiManager("Deselect");
>
> This little macro demonstrates it:

This macro works as expected. The roiManager("Deselect”) command deselects any selected ROI’s on the ROI Manager list. It does not remove the ROI of the active image. Use run("Select None”) to do that.

-wayne


> // begin
> run("Set Measurements...", "area mean redirect=None decimal=1");
> newImage("Untitled", "8-bit ramp", 256, 256, 1);
> makeOval(11, 7, 116, 116);
> roiManager("Add");
> makeOval(166, 23, 79, 206);
> roiManager("Add");
> makeOval(21, 174, 135, 40);
> roiManager("Add");
> roiManager("Show All");
> roiManager("Select", 1);
> run("Measure");
> roiManager("Deselect");
> run("Measure");
> exit();
> // end
>
> In fact both calls of
>
> run("Measure");
>
> give the same result in spite of the fact that the ROI #1 was deselected but in fact it isn't. Inserting
>
> roiManager("update")
>
> doesn't change this situation.
>
> Perhaps Wayne could have a look at this problem.
>
> Regards
>
> Herbie
>
> ::::::::::::::::::::::::::::::::::::::::
> Am 05.12.18 um 17:06 schrieb Ed Siefker:
>> I'm a little confused.  What's the point of deselecting the ROI in the
>> manager if it doesn't affect the selection in the image?  I can see
>> that "Deselect" removes the highlighting from the line, does that have
>> any other effects?  What use case is there for this function?
>> On Wed, Dec 5, 2018 at 4:00 AM Michael Schmid <[hidden email]> wrote:
>>>
>>> Hi Ed,
>>>
>>> there is a fundamental difference between these two commands:
>>>
>>>    run("Select None");
>>> Clears any selection (ROI) from the active image
>>>
>>>    roiManager("Deselect");
>>> Clears any selection in the *list* of ROIs displayed in the ROI Manager.
>>>
>>> See:
>>>    http://imagej.nih.gov/ij/docs/guide/146-27.html#toc-Subsubsection-27.12.2
>>>
>>> http://imagej.nih.gov/ij/developer/macro/functions.html#roiManager(%22deselect%22)
>>>
>>>
>>>
>>> Here is an example:
>>>
>>> run("Blobs (25K)");
>>> setAutoThreshold("Default");
>>> run("Analyze Particles...", "add");
>>> roiManager("Select", 3);
>>> wait(1000);
>>> roiManager("Deselect");
>>>
>>> In the list of ROIs shown in the ROI Manager, you will see that the
>>> macro selects the fourth line from the top (index 3, starting from 0),
>>> named "0068-0011". One second later the line will be deselected.
>>>
>>>
>>> Michael
>>> ________________________________________________________________
>>> On 04.12.18 21:31, Ed Siefker wrote:
>>>> roiManager("Deselect"); does not work.
>>>>
>>>> Just FYI.  I'm using run("Select None"); and it works fine.
>>>> -Ed

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

Re: roiManager("Deselect");

Herbie
Thanks Wayne,

for making things more transparent.

We learn that

        roiManager("Deselect");

concerns the ROI Manager *list* only!

Best

Herbie

:::::::::::::::::::::::::::::::::::::::::::
Am 05.12.18 um 21:42 schrieb Wayne Rasband:

>> On Dec 5, 2018, at 11:27 AM, Herbie <[hidden email]> wrote:
>>
>> Good day Ed,
>>
>> I can confirm that there is a problem with
>>
>> roiManager("Deselect");
>>
>> This little macro demonstrates it:
>
> This macro works as expected. The roiManager("Deselect”) command deselects any selected ROI’s on the ROI Manager list. It does not remove the ROI of the active image. Use run("Select None”) to do that.
>
> -wayne
>
>
>> // begin
>> run("Set Measurements...", "area mean redirect=None decimal=1");
>> newImage("Untitled", "8-bit ramp", 256, 256, 1);
>> makeOval(11, 7, 116, 116);
>> roiManager("Add");
>> makeOval(166, 23, 79, 206);
>> roiManager("Add");
>> makeOval(21, 174, 135, 40);
>> roiManager("Add");
>> roiManager("Show All");
>> roiManager("Select", 1);
>> run("Measure");
>> roiManager("Deselect");
>> run("Measure");
>> exit();
>> // end
>>
>> In fact both calls of
>>
>> run("Measure");
>>
>> give the same result in spite of the fact that the ROI #1 was deselected but in fact it isn't. Inserting
>>
>> roiManager("update")
>>
>> doesn't change this situation.
>>
>> Perhaps Wayne could have a look at this problem.
>>
>> Regards
>>
>> Herbie
>>
>> ::::::::::::::::::::::::::::::::::::::::
>> Am 05.12.18 um 17:06 schrieb Ed Siefker:
>>> I'm a little confused.  What's the point of deselecting the ROI in the
>>> manager if it doesn't affect the selection in the image?  I can see
>>> that "Deselect" removes the highlighting from the line, does that have
>>> any other effects?  What use case is there for this function?
>>> On Wed, Dec 5, 2018 at 4:00 AM Michael Schmid <[hidden email]> wrote:
>>>>
>>>> Hi Ed,
>>>>
>>>> there is a fundamental difference between these two commands:
>>>>
>>>>     run("Select None");
>>>> Clears any selection (ROI) from the active image
>>>>
>>>>     roiManager("Deselect");
>>>> Clears any selection in the *list* of ROIs displayed in the ROI Manager.
>>>>
>>>> See:
>>>>     http://imagej.nih.gov/ij/docs/guide/146-27.html#toc-Subsubsection-27.12.2
>>>>
>>>> http://imagej.nih.gov/ij/developer/macro/functions.html#roiManager(%22deselect%22)
>>>>
>>>>
>>>>
>>>> Here is an example:
>>>>
>>>> run("Blobs (25K)");
>>>> setAutoThreshold("Default");
>>>> run("Analyze Particles...", "add");
>>>> roiManager("Select", 3);
>>>> wait(1000);
>>>> roiManager("Deselect");
>>>>
>>>> In the list of ROIs shown in the ROI Manager, you will see that the
>>>> macro selects the fourth line from the top (index 3, starting from 0),
>>>> named "0068-0011". One second later the line will be deselected.
>>>>
>>>>
>>>> Michael
>>>> ________________________________________________________________
>>>> On 04.12.18 21:31, Ed Siefker wrote:
>>>>> roiManager("Deselect"); does not work.
>>>>>
>>>>> Just FYI.  I'm using run("Select None"); and it works fine.
>>>>> -Ed
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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