Scale to DPI on 64bit Windows

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

Scale to DPI on 64bit Windows

Cameron Nowell-2
Hi List,

Has anyone had any issues getting the scale to DPI command to work on 64bit Windows? It works perfectly fine on all our 32 bit machines but on any 64bit system nothing happens other than getting a message in the taskbar saying command complete (but no dialog window opens).

Cheers

Cam

Cameron J. Nowell
Research Facilities Manager

Imaging, FACS and Analysis Core
Monash Institute of Pharmaceutical Sciences
Monash University
399 Royal Parade
(Mail address: 381 Royal Parade)
Parkville, VIC, 3052
Australia

Email: [hidden email]<mailto:[hidden email]>
Mobile: +61 422882700
Office: +61 9903 9587

LinkedIn: Profile<http://au.linkedin.com/pub/cameron-nowell/23/57/884/>
Research Gate:  Profile<http://www.researchgate.net/profile/Cameron_Nowell>

[BANNER3_foremail]


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

image001.jpg (39K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Scale to DPI on 64bit Windows

dscho
Hi Cameron,

On Fri, 18 Jul 2014, Cameron Nowell wrote:

> Has anyone had any issues getting the scale to DPI command to work on
> 64bit Windows? It works perfectly fine on all our 32 bit machines but on
> any 64bit system nothing happens other than getting a message in the
> taskbar saying command complete (but no dialog window opens).

The reason is the (ab)use of auto-imports. It is my fault, really, for not
seeing how big this project (or better: this ecosystem of projects) was
going to be. In the early days of Fiji, it looked like a good idea to
special-case two projects and auto-import all of its classes, but nobody
else's classes.

It is almost needless to say that there are a *lot* of other projects now,
all of them important, most developed quite actively, and auto-importing
all of them would simply result in conflicting class names, and favoring
some over others would be less than intelligent, given that nobody can
really see what the future brings.

Again, it was entirely my failure to see the so-called "technical debt" of
establishing auto-imports.

To avoid accruing even more technical debt, I decided that auto-imports
need to be deprecated. I was aware that the users of the few "special"
projects would not be happy about that, but in the interest of the bigger
ecosystem, there was simply no alternative.

In your particular case, the script at

        https://github.com/fiji/fiji/blob/master/plugins/Scripts/Image/Adjust/Scale_to_DPI.js

needs adjustment: it uses ImageJ 1.x classes without importing them
explicitly.

If you find the time, it would be awesome if you could Shift+click on the
Scale to DPI menu item (which will open the script editor; this is one of
the many magic functionalities that few users know about because it is not
*quite* intuitive a user interface :-)) and insert all the required
importClass statements, e.g.

        importClass(Packages.ij.IJ);

at the top, then share the fixed script with the ImageJ community.

Ciao,
Johannes

P.S.: If you do not have time to do that, do not worry. We will hopefully
eventually come around to fixing all the scripts, but we will have to work
a bit more on other things, including the Add import command in the script
editor, also something that unfortunately has to take a back seat because
of higher priority projects that need to be addressed first.

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

Re: Scale to DPI on 64bit Windows

Lachlan Whitehead
Hi Jahannes and Cam,

I took the liberty of tinkering and have added the class imports required.
I'm pretty inexperienced in both Java and Github, but I think I've suggested a change to that file.
Let me know if I've gone wrong somewhere.

Thanks,
-Lachie

PS: Incidentally, shift-click isn't opening the script editor for me, that would be most useful.

----- Original Message -----
From: "Johannes Schindelin" <[hidden email]>
To: [hidden email]
Sent: Friday, 18 July, 2014 11:34:06 PM
Subject: Re: Scale to DPI on 64bit Windows

Hi Cameron,

On Fri, 18 Jul 2014, Cameron Nowell wrote:

> Has anyone had any issues getting the scale to DPI command to work on
> 64bit Windows? It works perfectly fine on all our 32 bit machines but on
> any 64bit system nothing happens other than getting a message in the
> taskbar saying command complete (but no dialog window opens).

The reason is the (ab)use of auto-imports. It is my fault, really, for not
seeing how big this project (or better: this ecosystem of projects) was
going to be. In the early days of Fiji, it looked like a good idea to
special-case two projects and auto-import all of its classes, but nobody
else's classes.

It is almost needless to say that there are a *lot* of other projects now,
all of them important, most developed quite actively, and auto-importing
all of them would simply result in conflicting class names, and favoring
some over others would be less than intelligent, given that nobody can
really see what the future brings.

Again, it was entirely my failure to see the so-called "technical debt" of
establishing auto-imports.

To avoid accruing even more technical debt, I decided that auto-imports
need to be deprecated. I was aware that the users of the few "special"
projects would not be happy about that, but in the interest of the bigger
ecosystem, there was simply no alternative.

In your particular case, the script at

        https://github.com/fiji/fiji/blob/master/plugins/Scripts/Image/Adjust/Scale_to_DPI.js

needs adjustment: it uses ImageJ 1.x classes without importing them
explicitly.

If you find the time, it would be awesome if you could Shift+click on the
Scale to DPI menu item (which will open the script editor; this is one of
the many magic functionalities that few users know about because it is not
*quite* intuitive a user interface :-)) and insert all the required
importClass statements, e.g.

        importClass(Packages.ij.IJ);

at the top, then share the fixed script with the ImageJ community.

Ciao,
Johannes

P.S.: If you do not have time to do that, do not worry. We will hopefully
eventually come around to fixing all the scripts, but we will have to work
a bit more on other things, including the Add import command in the script
editor, also something that unfortunately has to take a back seat because
of higher priority projects that need to be addressed first.

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

______________________________________________________________________
The information in this email is confidential and intended solely for the addressee.
You must not disclose, forward, print or use it without the permission of the sender.
______________________________________________________________________

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

Re: Scale to DPI on 64bit Windows

dscho
Hi Lachie,

On Mon, 21 Jul 2014, Lachlan Whitehead wrote:

> I took the liberty of tinkering and have added the class imports required.

Great! (Although please note that you do not 'have to take the liberty' to
change the source code; The reason ImageJ/Fiji is Open Source is precisely
to enable you to do exactly what you did)

> I'm pretty inexperienced in both Java and Github, but I think I've
> suggested a change to that file.
> Let me know if I've gone wrong somewhere.

To the contrary! You did an excellent job!

Ciao,
Johannes

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