Login  Register

Re: Roi_Manager->Properties->Position in macro

Posted by CARL Philippe (LBP) on May 28, 2017; 11:03pm
URL: http://imagej.273.s1.nabble.com/Roi-Manager-Properties-Position-in-macro-tp5018780p5018799.html

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