Roi_Manager->Properties->Position in macro

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

Roi_Manager->Properties->Position in macro

CARL Philippe (LBP)
Dear all (probably Wayne),

Within the Roi_Manager it is possible to associate a given stack position to
a ROI.

Nevertheless, I haven’t found a way to modify the stack position of a given
ROI saved within the Roi_Manager by means of a macro code.

I thank you very much in advance for your lights about this issue.

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: Roi_Manager->Properties->Position in macro

Wayne Rasband-2
> On May 24, 2017, at 11:06 AM, Philippe CARL <[hidden email]> wrote:
>
> Dear all (probably Wayne),
>
> Within the Roi_Manager it is possible to associate a given stack position to
> a ROI.
>
> Nevertheless, I haven’t found a way to modify the stack position of a given
> ROI saved within the Roi_Manager by means of a macro code.
>
> I thank you very much in advance for your lights about this issue.

You can set the position of an ROI in the ROI Manager by selecting the ROI, setting the stack position, and updating the ROI. Here is an example:

   newImage("Stack", "8-bit label", 300, 200, 1, 10, 1);
   roiManager("Reset");
   makeRectangle(50, 50, 60, 40);
   roiManager("Add");
   makeRectangle(70, 70, 60, 40);
   roiManager("Add");
   roiManager("Select", 0);
   Stack.setPosition(0, 3, 0)
   roiManager("Update");
   roiManager("Select", 1);
   Stack.setPosition(0, 6, 0)
   roiManager("Update”);

-wayne

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

Re: Roi_Manager->Properties->Position in macro

CARL Philippe (LBP)
Dear Wayne,
I thank you very much for your answer and proposed solution.
We were able to fix the stack position of a given ROI by deleting and re-adding it to the Roi_Manage but this can make codes quite complicated.
Your solution is way easier and more efficient...
Kindest regards,
Philippe

Le Jeudi 25 Mai 2017 06:15 CEST, Wayne Rasband <[hidden email]> a écrit:

> > On May 24, 2017, at 11:06 AM, Philippe CARL <[hidden email]> wrote:
> >
> > Dear all (probably Wayne),
> >
> > Within the Roi_Manager it is possible to associate a given stack position to
> > a ROI.
> >
> > Nevertheless, I haven’t found a way to modify the stack position of a given
> > ROI saved within the Roi_Manager by means of a macro code.
> >
> > I thank you very much in advance for your lights about this issue.

>
> You can set the position of an ROI in the ROI Manager by selecting the ROI, setting the stack position, and updating the ROI. Here is an example:
>
>    newImage("Stack", "8-bit label", 300, 200, 1, 10, 1);
>    roiManager("Reset");
>    makeRectangle(50, 50, 60, 40);
>    roiManager("Add");
>    makeRectangle(70, 70, 60, 40);
>    roiManager("Add");
>    roiManager("Select", 0);
>    Stack.setPosition(0, 3, 0)
>    roiManager("Update");
>    roiManager("Select", 1);
>    Stack.setPosition(0, 6, 0)
>    roiManager("Update”);
>
> -wayne
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html





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