Hi all.
to lunch ImageJ under linux I use follow script: ----------------------------------------------------------------------------------------------------- #!/bin/bash # ImageJ launcher JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun IMAGEJ_HOME=/usr/local/ImageJ PLUGINS_DIR=/usr/local/ImageJ JAVA_OPT=Xmx500m CP=$IMAGEJ_HOME/ij.jar:$JAVA_HOME/lib/tools.jar echo "starting ImageJ.." $JAVA_HOME/jre/bin/java -cp $CP -$JAVA_OPT -Dplugins.dir=$PLUGINS_DIR -$JAVA_OPT ij.ImageJ ----------------------------------------------------------------------------------------------------- I have hight screen resolution (1920x1200) and ImageJ-fonts results very small. Exist any possibilities to make them bigger? (maybe in some way changing the script) Regards, -nicola |
> I have hight screen resolution (1920x1200) and ImageJ-fonts results very
> small. > Exist any possibilities to make them bigger? (maybe in some way changing > the script) We discussed this some time ago. I also have that screen size and it is almost unreadable... I use the plugin below, run from the startupmacros.txt file. I cannot remember who wrote it... (Dscho? Wayne? Albert? if somebody knows, please let me know). Mind the line breaks: //---------------------- import ij.IJ; import ij.ImageJ; import ij.Menus; import ij.gui.GenericDialog; import ij.plugin.PlugIn; import java.awt.Font; import java.awt.Menu; import java.awt.MenuBar; public class Menu_Font implements ij.plugin.PlugIn { public void run(String arg) { GenericDialog gd = new GenericDialog("New Menu Font Size"); gd.addNumericField("menuFontSize", 16, 0); gd.addCheckbox("Bold", true); gd.showDialog(); if (gd.wasCanceled()) return; int size = (int)gd.getNextNumber(); String bold=""; if (gd.getNextBoolean()) bold="bold-"; MenuBar menuBar = Menus.getMenuBar(); Font font = menuBar.getFont(); int oldSize = font.getSize(); // this does not work, because default is "fixed" //menuBar.setFont(font.deriveFont(size)); menuBar.setFont(Font.decode("sansserif-"+bold + size)); // work around AWT not recalculating the menu bar size int i, count = menuBar.getMenuCount(); Menu[] menus = new Menu[count]; for (i = 0; i < count; i++) { menus[i] = menuBar.getMenu(0); menuBar.remove(menus[i]); } for (i = 0; i < count; i++) menuBar.add(menus[i]); ImageJ ij = IJ.getInstance(); ij.pack(); ij.setSize(new java.awt.Dimension(ij.getWidth() *size / oldSize, ij.getHeight())); } } //---------------------- |
Thanks, it work great!!
A last thing.. Does someone know any method to avoid run plugin every time by hand, and automate process when imageJ is lunched (as parameters I need "MenuFontSize=15" and "noBold") ? Thanks, Nicola Plugin is make by Dscho.. Gabriel Landini ha scritto: >> I have hight screen resolution (1920x1200) and ImageJ-fonts results very >> small. >> Exist any possibilities to make them bigger? (maybe in some way changing >> the script) >> > > We discussed this some time ago. I also have that screen size and it is almost > unreadable... > I use the plugin below, run from the startupmacros.txt file. > I cannot remember who wrote it... (Dscho? Wayne? Albert? if somebody knows, > please let me know). > > Mind the line breaks: > > > //---------------------- > import ij.IJ; > import ij.ImageJ; > import ij.Menus; > import ij.gui.GenericDialog; > import ij.plugin.PlugIn; > import java.awt.Font; > import java.awt.Menu; > import java.awt.MenuBar; > > public class Menu_Font implements ij.plugin.PlugIn { > public void run(String arg) { > GenericDialog gd = new GenericDialog("New Menu Font Size"); > gd.addNumericField("menuFontSize", 16, 0); > gd.addCheckbox("Bold", true); > > gd.showDialog(); > if (gd.wasCanceled()) > return; > > int size = (int)gd.getNextNumber(); > String bold=""; > if (gd.getNextBoolean()) > bold="bold-"; > > MenuBar menuBar = Menus.getMenuBar(); > Font font = menuBar.getFont(); > int oldSize = font.getSize(); > > // this does not work, because default is "fixed" > //menuBar.setFont(font.deriveFont(size)); > menuBar.setFont(Font.decode("sansserif-"+bold + size)); > > // work around AWT not recalculating the menu bar size > int i, count = menuBar.getMenuCount(); > Menu[] menus = new Menu[count]; > for (i = 0; i < count; i++) { > menus[i] = menuBar.getMenu(0); > menuBar.remove(menus[i]); > } > for (i = 0; i < count; i++) > menuBar.add(menus[i]); > ImageJ ij = IJ.getInstance(); > ij.pack(); > ij.setSize(new java.awt.Dimension(ij.getWidth() *size / > oldSize, ij.getHeight())); > } > } > > //---------------------- > > |
Dear All,
Is there a way to get automated live imaging and simultaneous analysis with ImageJ? Thanks, Sinan Yordem -----Original Message----- From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Nicola B. Sent: Wednesday, October 31, 2007 10:02 AM To: [hidden email] Subject: Re: imageJ front panel fonts size Thanks, it work great!! A last thing.. Does someone know any method to avoid run plugin every time by hand, and automate process when imageJ is lunched (as parameters I need "MenuFontSize=15" and "noBold") ? Thanks, Nicola Plugin is make by Dscho.. Gabriel Landini ha scritto: >> I have hight screen resolution (1920x1200) and ImageJ-fonts results very >> small. >> Exist any possibilities to make them bigger? (maybe in some way changing >> the script) >> > > We discussed this some time ago. I also have that screen size and it is almost > unreadable... > I use the plugin below, run from the startupmacros.txt file. > I cannot remember who wrote it... (Dscho? Wayne? Albert? if somebody knows, > please let me know). > > Mind the line breaks: > > > //---------------------- > import ij.IJ; > import ij.ImageJ; > import ij.Menus; > import ij.gui.GenericDialog; > import ij.plugin.PlugIn; > import java.awt.Font; > import java.awt.Menu; > import java.awt.MenuBar; > > public class Menu_Font implements ij.plugin.PlugIn { > public void run(String arg) { > GenericDialog gd = new GenericDialog("New Menu Font > gd.addNumericField("menuFontSize", 16, 0); > gd.addCheckbox("Bold", true); > > gd.showDialog(); > if (gd.wasCanceled()) > return; > > int size = (int)gd.getNextNumber(); > String bold=""; > if (gd.getNextBoolean()) > bold="bold-"; > > MenuBar menuBar = Menus.getMenuBar(); > Font font = menuBar.getFont(); > int oldSize = font.getSize(); > > // this does not work, because default is "fixed" > //menuBar.setFont(font.deriveFont(size)); > menuBar.setFont(Font.decode("sansserif-"+bold + size)); > > // work around AWT not recalculating the menu bar size > int i, count = menuBar.getMenuCount(); > Menu[] menus = new Menu[count]; > for (i = 0; i < count; i++) { > menus[i] = menuBar.getMenu(0); > menuBar.remove(menus[i]); > } > for (i = 0; i < count; i++) > menuBar.add(menus[i]); > ImageJ ij = IJ.getInstance(); > ij.pack(); > ij.setSize(new java.awt.Dimension(ij.getWidth() *size / > oldSize, ij.getHeight())); > } > } > > //---------------------- > > |
In reply to this post by Nicola B.
Nicola,
Just launch it from a macro in the StartupMacros.txt , something like run("Menu Font", "menuFontSize=16 Bold"); (Gabriel: I did not write it, or at least, I can't remeber myself doing so.) Albert -- Albert Cardona http://www.mcdb.ucla.edu/Research/Hartenstein/acardona |
In reply to this post by Nicola B.
On Wednesday 31 October 2007 14:02:05 Nicola B. wrote:
> Thanks, it work great!! > A last thing.. > Does someone know any method to avoid run plugin every time by hand, and > automate process when imageJ is lunched (as parameters I need I already said: > > I use the plugin below, run from the startupmacros.txt file. But I forgot to point out that you could set it from Edit>Options>Appearance>Menu_Font_Size. Record your setting and put it in the startupmacros.txt file G. |
Would it be possible to program ImageJ to check the DPI from the
X-server at startup and adjust the font size appropriately? I don't know if you can access the DPI for Windows or Mac, but maybe something similar could be done for them too. Gabriel and Nicola, offhand, do you know the DPI for your monitors? I have a fairly large monitor , 1680 by 1024 or something like that, but the DPI is really low, so the fonts look normal. Justin On 10/31/07, Gabriel Landini <[hidden email]> wrote: > On Wednesday 31 October 2007 14:02:05 Nicola B. wrote: > > Thanks, it work great!! > > A last thing.. > > > Does someone know any method to avoid run plugin every time by hand, and > > automate process when imageJ is lunched (as parameters I need > > I already said: > > > > I use the plugin below, run from the startupmacros.txt file. > > > But I forgot to point out that you could set it from > Edit>Options>Appearance>Menu_Font_Size. > > Record your setting and put it in the startupmacros.txt file > > G. > |
On Wednesday 31 October 2007 16:46:00 Justin McGrath wrote:
> Would it be possible to program ImageJ to check the DPI from the > X-server at startup and adjust the font size appropriately? Not sure, sorry. I think that Java does its own calculation, but I wonder how correct it is that. Over several version of the sdk the fonts in IJ get larger and smaller... Cheers, G. |
In reply to this post by Gabriel Landini
How does one interactively select an ROI in a Macro? I would like to select the
ROI in a loop, inside the macro. I see many ways to manipulate an ROI once it exists, but I have not found a simple way to specify the ROI by drawing with the mouse. It looks like I can use getCursorLoc (as in GetCursorLoc Demo Tool) and then make it, but I wonder if there is already a piece of a macro that does it, probably better than I will. This must already be somewhere in the examples and in the mailing list, but I just have not been able to find it. Thanks in advance --aryeh -- Aryeh Weiss School of Engineering Bar Ilan University Ramat Gan 52900 Israel Ph: 972-3-5317638 FAX: 972-3-7384050 |
Hi Aryeh,
you could use the "Wait_For_User" plugin: http://imagejdocu.tudor.lu/imagej-documentation-wiki/plugins/ wait_for_user Michael ________________________________________________________________ On 7 Jan 2008, at 06:56, Aryeh Weiss wrote: > How does one interactively select an ROI in a Macro? I would like > to select the ROI in a loop, inside the macro. I see many ways to > manipulate an ROI once it exists, but I have not found a simple way > to specify the ROI by drawing with the mouse. It looks like I can > use getCursorLoc (as in GetCursorLoc Demo Tool) and then make it, > but I wonder if there is already a piece of a macro that does it, > probably better than I will. > > This must already be somewhere in the examples and in the mailing > list, but I just have not been able to find it. > > Thanks in advance > --aryeh > -- > Aryeh Weiss > School of Engineering > Bar Ilan University > Ramat Gan 52900 Israel > > Ph: 972-3-5317638 > FAX: 972-3-7384050 |
Michael Schmid wrote:
> Hi Aryeh, > > you could use the "Wait_For_User" plugin: > > http://imagejdocu.tudor.lu/imagej-documentation-wiki/plugins/wait_for_user > > Michael > ________________________________________________________________ > > On 7 Jan 2008, at 06:56, Aryeh Weiss wrote: > >> How does one interactively select an ROI in a Macro? I would like to >> select the ROI in a loop, inside the macro. I see many ways to >> manipulate an ROI once it exists, but I have not found a simple way to >> specify the ROI by drawing with the mouse. It looks like I can use >> getCursorLoc (as in GetCursorLoc Demo Tool) and then make it, but I >> wonder if there is already a piece of a macro that does it, probably >> better than I will. >> Thank you Michael. That is much better than what I cobbled together. What you suggest is exactly right. Here is what I did: // adapted from Get CursorLocDemo function Draw_Box() { leftButton=16; x2=-1; y2=-1; z2=-1; flags2=-1; // wait until the left mouse button is pressed getCursorLoc(x, y, z, flags); while (flags&leftButton==0) {getCursorLoc(x, y, z, flags);} // draw and update the box as long as the left mouse button is pressed while (flags&leftButton!=0) { getCursorLoc(x2, y2, z2, flags); delta_x = x-x2; delta_y = y-y2; makeRectangle(minOf(x,x2), minOf(y,y2),abs(delta_x), abs(delta_y)); wait(10); } // the return of delta_x is a kludge to let the macro decide if the // rectangle is large enough return abs(delta_x); } Best regards, --aryeh -- Aryeh Weiss School of Engineering Bar Ilan University Ramat Gan 52900 Israel Ph: 972-3-5317638 FAX: 972-3-7384050 |
Free forum by Nabble | Edit this page |