Change default Image scale (when open)

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

Change default Image scale (when open)

Nikolay
Hello,

Is it possible to change default scale for newly opened images?

Thank you.

--
Rogoshchenkov Nikolay

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

Re: Change default Image scale (when open)

ctrueden
Hi Nikolay,

> Is it possible to change default scale for newly opened images?

Under Edit > Options > Appearance you can check the "Open images at 100%"
box to force all images to appear at 100% zoom initially. Other than that,
I do not know a way without changing the ImageJ source code.

Regards,
Curtis


On Tue, Nov 13, 2012 at 1:40 PM, Nikolay Rogoshchenkov
<[hidden email]>wrote:

> Hello,
>
> Is it possible to change default scale for newly opened images?
>
> Thank you.
>
> --
> Rogoshchenkov Nikolay
>
> --
> 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: Change default Image scale (when open)

Michael Schmid
In reply to this post by Nikolay
Hi Nikolay,

you can write a short plugin that implements ImageListener:
  http://rsbweb.nih.gov/ij/developer/source/ij/ImageListener.java.html

In the imageOpened(ImagePlus imp) method you can set the scale of the newly opened image.

You can call the plugin in your StartupMacros.txt, in a macro named "AutoRun", then it will be executed automatically when ImageJ starts, and valid for all images opened thereafter.
[I am not sure whether it will also affect an image opened by drag&drop onto the ImageJ icon while ImageJ is not running, but I guess it would also set the scale of that image.]

Michael
________________________________________________________________
On Nov 13, 2012, at 20:40, Nikolay Rogoshchenkov wrote:

> Hello,
>
> Is it possible to change default scale for newly opened images?
>
> Thank you.
>
> --
> Rogoshchenkov Nikolay
>

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

Re: Change default Image scale (when open)

Jerome Mutterer-3
Hi Nikolay,
You could try the 'Droplet' plugin. It has a simple interface with which
you can select a macro that is triggered when you drag-and-drop something
on it.
See: http://imagejdocu.tudor.lu/doku.php?id=plugin:utilities:droplet:start
Sincerely,
Jerome.

On 14 November 2012 09:27, Michael Schmid <[hidden email]> wrote:

> Hi Nikolay,
>
> you can write a short plugin that implements ImageListener:
>   http://rsbweb.nih.gov/ij/developer/source/ij/ImageListener.java.html
>
> In the imageOpened(ImagePlus imp) method you can set the scale of the
> newly opened image.
>
> You can call the plugin in your StartupMacros.txt, in a macro named
> "AutoRun", then it will be executed automatically when ImageJ starts, and
> valid for all images opened thereafter.
> [I am not sure whether it will also affect an image opened by drag&drop
> onto the ImageJ icon while ImageJ is not running, but I guess it would also
> set the scale of that image.]
>
> Michael
> ________________________________________________________________
> On Nov 13, 2012, at 20:40, Nikolay Rogoshchenkov wrote:
>
> > Hello,
> >
> > Is it possible to change default scale for newly opened images?
> >
> > Thank you.
> >
> > --
> > Rogoshchenkov Nikolay
> >
>
> --
> 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: Change default Image scale (when open)

kgalenkamp
In reply to this post by Nikolay
Hi Nikolay,

I would like to know if you have been able to tackle the problem.
Im using ImageJ on a daily basis and it would save me a lot of unnecessary repetitive movements if Im able to adjust the default scale for newly opened images.
Unfortunately Im not known with programming (writing plugins/macros etc.)

Thank you
Reply | Threaded
Open this post in threaded view
|

Re: Change default Image scale (when open)

pang
Nikolay,

If you don't want to do this repeatedly, you will have to know how to use macro language. I would like to suggest you to use the record macro to find the function to remove the scale.
Go to Plugins/Macro/Record...

Hopefully you can find the function.
Anyway, the function is
run("Set Scale...", "distance=0 known=0 pixel=1 unit=pixel");

Just make a macro with one line, and run macro to remove the scale.

Best luck,

Zhengyu


-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of kgalenkamp
Sent: Tuesday, May 14, 2013 9:58 AM
To: [hidden email]
Subject: Re: Change default Image scale (when open)

Hi Nikolay,

I would like to know if you have been able to tackle the problem.
Im using ImageJ on a daily basis and it would save me a lot of unnecessary repetitive movements if Im able to adjust the default scale for newly opened images.
Unfortunately Im not known with programming (writing plugins/macros etc.)

Thank you



--
View this message in context: http://imagej.1557.x6.nabble.com/Change-default-Image-scale-when-open-tp5000792p5002991.html
Sent from the ImageJ mailing list archive at Nabble.com.

--
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: Change default Image scale (when open)

Krs5
In reply to this post by kgalenkamp
Hi,

Not sure I understand the question, but If you set the scale in Analyze > Set Scale and select "Globel" all the images opened during your session will have the same scale. Is that what you want?

Best wishes

Kees

________________________________________
From: ImageJ Interest Group [[hidden email]] On Behalf Of kgalenkamp [[hidden email]]
Sent: 14 May 2013 14:57
To: [hidden email]
Subject: Re: Change default Image scale (when open)

Hi Nikolay,

I would like to know if you have been able to tackle the problem.
Im using ImageJ on a daily basis and it would save me a lot of unnecessary
repetitive movements if Im able to adjust the default scale for newly opened
images.
Unfortunately Im not known with programming (writing plugins/macros etc.)

Thank you



--
View this message in context: http://imagej.1557.x6.nabble.com/Change-default-Image-scale-when-open-tp5000792p5002991.html
Sent from the ImageJ mailing list archive at Nabble.com.

--
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: Change default Image scale (when open)

kgalenkamp
Sorry if I have not explained myself sufficiently.

The main problem is that I want my images to open at 50% of their original size, instead of the 75% at which they are opening at the moment.
I have seen ImageJ contains the option to open images at 100% of their original size (Edit/Options/Appearance), however I am unable to fix it at 50%.
Is there a way to change the option "Open images at 100%" so images will be opened at 50% of their original size.
Or to write a macro which will do the same

Thank you for your response
Reply | Threaded
Open this post in threaded view
|

Re: Change default Image scale (when open)

Antoinette
We can use a mature image scaling tool to resize image proportionally,  and adjust the image size without changing the ratio between image width & height.

Public Shared Function ApplyResize(img As REImage, ratio As Single) As Integer
Reply | Threaded
Open this post in threaded view
|

Re: Change default Image scale (when open)

ab.hamon
In reply to this post by Nikolay
Hello Nikolay,

When you open the picture adjust the image size view using: ctrl +  or ctrl -

Best