ROIScaler plugin

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

ROIScaler plugin

Avi Leftin
Hi,

    I found the plugin ROIScaler on this list:  

    http://rsb.info.nih.gov/ij/developer/api/allclasses-noframe.html

    With details:

    http://rsb.info.nih.gov/ij/developer/api/ij/plugin/RoiScaler.html

    How is this plugin installed and used?

    Regards,

Avi


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

Re: ROIScaler plugin

ctrueden
Hi Avi,

> I found the plugin ROIScaler
> How is this plugin installed and used?

It it built in to ImageJ. Edit > Selection > Scale.

-Curtis


On Fri, Mar 20, 2015 at 10:30 AM, Avi Leftin <[hidden email]>
wrote:

> Hi,
>
>     I found the plugin ROIScaler on this list:
>
>     http://rsb.info.nih.gov/ij/developer/api/allclasses-noframe.html
>
>     With details:
>
>     http://rsb.info.nih.gov/ij/developer/api/ij/plugin/RoiScaler.html
>
>     How is this plugin installed and used?
>
>     Regards,
>
> Avi
>
>
> --
> 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: ROIScaler plugin

Michael Schmid
In reply to this post by Avi Leftin
Hi Avi,

this RoiScaler is the built-in ImageJ command responsible for Edit>Selection>Scale.
You see this if you type CTRL-L (cmd-L on Macs) in ImageJ and enter "scale":

It will tell you that the "Scale..." in Edit>Selection calls ij.plugin.RoiScaler.

In a java program such as a plugin, you can call
  newRoi = RoiScaler.scale(roi, xscale, yscale, centered);

Michael
________________________________________________________________
On Mar 20, 2015, at 16:30, Avi Leftin wrote:

> Hi,
>
>    I found the plugin ROIScaler on this list:  
>
>    http://rsb.info.nih.gov/ij/developer/api/allclasses-noframe.html
>
>    With details:
>
>    http://rsb.info.nih.gov/ij/developer/api/ij/plugin/RoiScaler.html
>
>    How is this plugin installed and used?
>
>    Regards,
>
> Avi
>
>
> --
> 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: ROIScaler plugin

Avi Leftin
In reply to this post by ctrueden
Hey,

    Any idea of how to write this into a macro with double/numeric input
instead of the ordinary usage?

  run("Scale... ", "x=0.80 y=0.80 centered");


I'd like to use a loop in my macro that increments the x= and y= inputs,
while keeping centered a constant.


   Avi

On Fri, Mar 20, 2015 at 11:36 AM, Curtis Rueden <[hidden email]> wrote:

> Hi Avi,
>
> > I found the plugin ROIScaler
> > How is this plugin installed and used?
>
> It it built in to ImageJ. Edit > Selection > Scale.
>
> -Curtis
>
>
> On Fri, Mar 20, 2015 at 10:30 AM, Avi Leftin <[hidden email]>
> wrote:
>
> > Hi,
> >
> >     I found the plugin ROIScaler on this list:
> >
> >     http://rsb.info.nih.gov/ij/developer/api/allclasses-noframe.html
> >
> >     With details:
> >
> >     http://rsb.info.nih.gov/ij/developer/api/ij/plugin/RoiScaler.html
> >
> >     How is this plugin installed and used?
> >
> >     Regards,
> >
> > Avi
> >
> >
> > --
> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> >
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>



--
Avigdor Leftin
Department of Medical Physics
Memorial Sloan-Kettering Cancer Center

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

Re: ROIScaler plugin

Avi Leftin
In reply to this post by Michael Schmid
Thanks Michael,

In the java call newRoi = RoiScaler.scale(roi, xscale, yscale, centered);

The xscale is double/numeric, as is yscale?

I'd like to use this in a loop within a macro that increments the xscale
and yscale factors, while leaving centered where the original ROI was
centered.

What are the inputs for roi, and centered?

How would such a call be used in a loop?

Avi


On Fri, Mar 20, 2015 at 11:55 AM, Michael Schmid <[hidden email]>
wrote:

> Hi Avi,
>
> this RoiScaler is the built-in ImageJ command responsible for
> Edit>Selection>Scale.
> You see this if you type CTRL-L (cmd-L on Macs) in ImageJ and enter
> "scale":
>
> It will tell you that the "Scale..." in Edit>Selection calls
> ij.plugin.RoiScaler.
>
> In a java program such as a plugin, you can call
>   newRoi = RoiScaler.scale(roi, xscale, yscale, centered);
>
> Michael
> ________________________________________________________________
> On Mar 20, 2015, at 16:30, Avi Leftin wrote:
>
> > Hi,
> >
> >    I found the plugin ROIScaler on this list:
> >
> >    http://rsb.info.nih.gov/ij/developer/api/allclasses-noframe.html
> >
> >    With details:
> >
> >    http://rsb.info.nih.gov/ij/developer/api/ij/plugin/RoiScaler.html
> >
> >    How is this plugin installed and used?
> >
> >    Regards,
> >
> > Avi
> >
> >
> > --
> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>



--
Avigdor Leftin
Department of Medical Physics
Memorial Sloan-Kettering Cancer Center

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

Re: ROIScaler plugin

Michael Schmid
In reply to this post by Avi Leftin
Hi Avi,

is the problem having variables in the run("Scale... " command?

  theScale = 0,7;
or
  theScale = getNumber("enter the scale", 0.8);

then
  run("Scale... ", "x=&theScale y=&theScale centered");
or
  run("Scale... ", "x="+theScale+" y="+theScale+" centered");

The latter uses the '+' for String concatenation.
See
  http://rsb.info.nih.gov/ij/developer/macro/macros.html#run

Michael
________________________________________________________________
On Mar 20, 2015, at 16:58, Avigdor Leftin wrote:

> Hey,
>
>    Any idea of how to write this into a macro with double/numeric input
> instead of the ordinary usage?
>
>  run("Scale... ", "x=0.80 y=0.80 centered");
>
>
> I'd like to use a loop in my macro that increments the x= and y= inputs,
> while keeping centered a constant.
>
>
>   Avi
>
> On Fri, Mar 20, 2015 at 11:36 AM, Curtis Rueden <[hidden email]> wrote:
>
>> Hi Avi,
>>
>>> I found the plugin ROIScaler
>>> How is this plugin installed and used?
>>
>> It it built in to ImageJ. Edit > Selection > Scale.
>>
>> -Curtis
>>
>>
>> On Fri, Mar 20, 2015 at 10:30 AM, Avi Leftin <[hidden email]>
>> wrote:
>>
>>> Hi,
>>>
>>>    I found the plugin ROIScaler on this list:
>>>
>>>    http://rsb.info.nih.gov/ij/developer/api/allclasses-noframe.html
>>>
>>>    With details:
>>>
>>>    http://rsb.info.nih.gov/ij/developer/api/ij/plugin/RoiScaler.html
>>>
>>>    How is this plugin installed and used?
>>>
>>>    Regards,
>>>
>>> Avi
>>>
>>>
>>> --
>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>>
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>
>
>
> --
> Avigdor Leftin
> Department of Medical Physics
> Memorial Sloan-Kettering Cancer Center
>
> --
> 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: ROIScaler plugin

Avi Leftin
Thanks Michael.  That did the trick.  Thank you for the syntax lesson :)

Avi

On Fri, Mar 20, 2015 at 12:07 PM, Michael Schmid <[hidden email]>
wrote:

> Hi Avi,
>
> is the problem having variables in the run("Scale... " command?
>
>   theScale = 0,7;
> or
>   theScale = getNumber("enter the scale", 0.8);
>
> then
>   run("Scale... ", "x=&theScale y=&theScale centered");
> or
>   run("Scale... ", "x="+theScale+" y="+theScale+" centered");
>
> The latter uses the '+' for String concatenation.
> See
>   http://rsb.info.nih.gov/ij/developer/macro/macros.html#run
>
> Michael
> ________________________________________________________________
> On Mar 20, 2015, at 16:58, Avigdor Leftin wrote:
>
> > Hey,
> >
> >    Any idea of how to write this into a macro with double/numeric input
> > instead of the ordinary usage?
> >
> >  run("Scale... ", "x=0.80 y=0.80 centered");
> >
> >
> > I'd like to use a loop in my macro that increments the x= and y= inputs,
> > while keeping centered a constant.
> >
> >
> >   Avi
> >
> > On Fri, Mar 20, 2015 at 11:36 AM, Curtis Rueden <[hidden email]>
> wrote:
> >
> >> Hi Avi,
> >>
> >>> I found the plugin ROIScaler
> >>> How is this plugin installed and used?
> >>
> >> It it built in to ImageJ. Edit > Selection > Scale.
> >>
> >> -Curtis
> >>
> >>
> >> On Fri, Mar 20, 2015 at 10:30 AM, Avi Leftin <[hidden email]>
> >> wrote:
> >>
> >>> Hi,
> >>>
> >>>    I found the plugin ROIScaler on this list:
> >>>
> >>>    http://rsb.info.nih.gov/ij/developer/api/allclasses-noframe.html
> >>>
> >>>    With details:
> >>>
> >>>    http://rsb.info.nih.gov/ij/developer/api/ij/plugin/RoiScaler.html
> >>>
> >>>    How is this plugin installed and used?
> >>>
> >>>    Regards,
> >>>
> >>> Avi
> >>>
> >>>
> >>> --
> >>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> >>>
> >>
> >> --
> >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> >>
> >
> >
> >
> > --
> > Avigdor Leftin
> > Department of Medical Physics
> > Memorial Sloan-Kettering Cancer Center
> >
> > --
> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>



--
Avigdor Leftin
Department of Medical Physics
Memorial Sloan-Kettering Cancer Center

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