![]() | ![]() |
![]() |
Previous Message |
Next Message Previous in Topic | Next in Topic Previous by Same Author | Next by Same Author Previous Page (August 2003) | Back to Main IMAGEJ Page | | ![]()
Reply
| Post a New Message |
Join or Leave IMAGEJ, or Change Options
|
Search | ![]()
Chronologically |
Most Recent First |
Wrap Text (Proportional Font) |
Don't Wrap Text (Non-proportional Font) | ![]() |
Importance: Normal Content-Type: text/plain; charset="us-ascii" Message-ID: <[log in to unmask]> Date: Sat, 23 Aug 2003 06:07:26 -0400 Reply-To: ImageJ Interest Group <[log in to unmask]> Sender: ImageJ Interest Group <[log in to unmask]> From: Ralf Weger <[log in to unmask]> Subject: running macros from command lineHi everybody, I am pretty new to ImageJ and cant figure out how to use it from command line. I tried ImageJ from within Matlab. But I run into memory issues with large images (most of the images I process are ~4000x4000 picel RGB). It would be better to independently use ImageJ from command line. All I would need is to open an Image, do basic processing steps such as math/threshold, run a Particle analyzer, and write the results to an asci file. I tried running Macros from command line using the example posted on ImageJ News at http://rsbweb.nih.gov/ij/notes.html it said that it can be done using java -cp C:\ImageJ\ij.jar ij.ImageJ c:\ImageJ\plugins\macro.txt but, I get Exception in thread "main" java.lang.NullPointerException at java.io.File.<init>(Unknown Source) at ij.Menus.getPlugins(Menus.java:401) at ij.Menus.installPlugins(Menus.java:321) at ij.Menus.addMenuBar(Menus.java:183) at ij.ImageJ.<init>(ImageJ.java:62) at ij.ImageJ.main(ImageJ.java:373) as an answer to the macro run("MRI Scan (48K)"); run("Threshold"); run("Analyze Particles...", "minimum=1 maximum=999999 bins=20 show=Nothing display clear"); the macro runs fine if executed from ImageJ by mouse, but fails if called from command line I also tried the analyze plugin programming example posted on ImageJ plugin website. It runs fine from within ImageJ, but command java -Dplugins.dir=C:\ImageJ -cp C:\ImageJ\ij.jar;. analyze test.tif > results.txt produces Exception in thread "main" java.lang.NullPointerException at java.io.File.<init>(Unknown Source) at ij.Menus.getPlugins(Menus.java:401) at ij.Menus.installPlugins(Menus.java:321) at ij.Menus.addMenuBar(Menus.java:183) at ij.IJ.init(IJ.java:285) at ij.IJ.run(IJ.java:264) at analyze.process(analyze.java:28) at analyze.main(analyze.java:52) pls help Ralf Weger ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ RSMAS / MGG (305) 361-4811 office University of Miami (305) 361-4794 lab 4600 Rickenbacker Causeway (305) 361-4732 fax Miami, FL 33149 USA [log in to unmask] http://mgg.rsmas.miami.edu/students/ralf ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
![]() |
![]() Center for Information Technology National Institutes of Health Bethesda, Maryland 20892 301 594 6248 (v) 301 496 8294 (TDD) Comments and Assistance Accessibility ![]() |