I'm writing a simple macro to take a 4D dataset, separate three channels,
project one, and merge two channels into a composite hyperstack, then save all of the results (5 files). The macro works fine for a while, but after 2-5 runs it stops saving the last file (the composite hyperstack). It also produces the following java error. java.lang.NullPointerException at ij.CompositeImage.getChannelLut(CompositeImage.java:456) at ij.io.FileSaver.saveDisplayRangesAndLuts(FileSaver.java:132) at ij.io.FileSaver.saveAsTiffStack(FileSaver.java:112) at ij.io.FileSaver.saveAsTiff(FileSaver.java:69) at ij.plugin.filter.Writer.run(Writer.java:20) at ij.plugin.filter.PlugInFilterRunner.processOneImage(PlugInFilterRunner.java:243) at ij.plugin.filter.PlugInFilterRunner.<init>(PlugInFilterRunner.java:102) at ij.IJ.runPlugIn(IJ.java:133) at ij.Executer.runCommand(Executer.java:104) at ij.Executer.run(Executer.java:58) at ij.IJ.run(IJ.java:247) at ij.IJ.saveAs(IJ.java:1196) at ij.macro.Functions.saveAs(Functions.java:2268) at ij.macro.Functions.doFunction(Functions.java:136) at ij.macro.Interpreter.doStatement(Interpreter.java:205) at ij.macro.Interpreter.doBlock(Interpreter.java:515) at ij.macro.Interpreter.runMacro(Interpreter.java:119) at ij.macro.MacroRunner.run(MacroRunner.java:105) at java.lang.Thread.run(Thread.java:619) Does anyone know what might cause a macro to behave differently at different times? Restarting ImageJ seems to solve the problem (for a few iterations). Thanks Adam |
This issue has been fixed in version 1.41a.
http://rsb.info.nih.gov/ij/notes.html Jerome On Mon, Apr 28, 2008 at 5:15 AM, Adam Cliffe <[hidden email]> wrote: > I'm writing a simple macro to take a 4D dataset, separate three channels, > project one, and merge two channels into a composite hyperstack, then save > all of the results (5 files). The macro works fine for a while, but after > 2-5 runs it stops saving the last file (the composite hyperstack). It also > produces the following java error. > > java.lang.NullPointerException > at ij.CompositeImage.getChannelLut(CompositeImage.java:456) > at ij.io.FileSaver.saveDisplayRangesAndLuts(FileSaver.java:132) > at ij.io.FileSaver.saveAsTiffStack(FileSaver.java:112) > at ij.io.FileSaver.saveAsTiff(FileSaver.java:69) > at ij.plugin.filter.Writer.run(Writer.java:20) > at > > ij.plugin.filter.PlugInFilterRunner.processOneImage(PlugInFilterRunner.java:243) > at > ij.plugin.filter.PlugInFilterRunner.<init>(PlugInFilterRunner.java:102) > at ij.IJ.runPlugIn(IJ.java:133) > at ij.Executer.runCommand(Executer.java:104) > at ij.Executer.run(Executer.java:58) > at ij.IJ.run(IJ.java:247) > at ij.IJ.saveAs(IJ.java:1196) > at ij.macro.Functions.saveAs(Functions.java:2268) > at ij.macro.Functions.doFunction(Functions.java:136) > at ij.macro.Interpreter.doStatement(Interpreter.java:205) > at ij.macro.Interpreter.doBlock(Interpreter.java:515) > at ij.macro.Interpreter.runMacro(Interpreter.java:119) > at ij.macro.MacroRunner.run(MacroRunner.java:105) > at java.lang.Thread.run(Thread.java:619) > > Does anyone know what might cause a macro to behave differently at > different > times? Restarting ImageJ seems to solve the problem (for a few > iterations). > > Thanks > > Adam > |
Nope, my problem still exists using 1.41a (I've tried most of the
versions from 1.39d-1.41a) It somehow seems to be affected by the length of the file name (or at least it seems to work ok sometimes with relatively short file names). ImageJ does manage to run the macro without problems some of the time, which makes it less obvious (to me) what is going wrong. adam On 28 Apr 2008, at 14:13, Jerome Mutterer wrote: > This issue has been fixed in version 1.41a. > http://rsb.info.nih.gov/ij/notes.html > > Jerome > > > On Mon, Apr 28, 2008 at 5:15 AM, Adam Cliffe <[hidden email]> > wrote: > >> I'm writing a simple macro to take a 4D dataset, separate three >> channels, >> project one, and merge two channels into a composite hyperstack, >> then save >> all of the results (5 files). The macro works fine for a while, >> but after >> 2-5 runs it stops saving the last file (the composite hyperstack). >> It also >> produces the following java error. >> >> java.lang.NullPointerException >> at ij.CompositeImage.getChannelLut(CompositeImage.java:456) >> at ij.io.FileSaver.saveDisplayRangesAndLuts(FileSaver.java: >> 132) >> at ij.io.FileSaver.saveAsTiffStack(FileSaver.java:112) >> at ij.io.FileSaver.saveAsTiff(FileSaver.java:69) >> at ij.plugin.filter.Writer.run(Writer.java:20) >> at >> >> ij.plugin.filter.PlugInFilterRunner.processOneImage >> (PlugInFilterRunner.java:243) >> at >> ij.plugin.filter.PlugInFilterRunner.<init>(PlugInFilterRunner.java: >> 102) >> at ij.IJ.runPlugIn(IJ.java:133) >> at ij.Executer.runCommand(Executer.java:104) >> at ij.Executer.run(Executer.java:58) >> at ij.IJ.run(IJ.java:247) >> at ij.IJ.saveAs(IJ.java:1196) >> at ij.macro.Functions.saveAs(Functions.java:2268) >> at ij.macro.Functions.doFunction(Functions.java:136) >> at ij.macro.Interpreter.doStatement(Interpreter.java:205) >> at ij.macro.Interpreter.doBlock(Interpreter.java:515) >> at ij.macro.Interpreter.runMacro(Interpreter.java:119) >> at ij.macro.MacroRunner.run(MacroRunner.java:105) >> at java.lang.Thread.run(Thread.java:619) >> >> Does anyone know what might cause a macro to behave differently at >> different >> times? Restarting ImageJ seems to solve the problem (for a few >> iterations). >> >> Thanks >> >> Adam >> Dr Adam Cliffe Research Fellow Rørth Lab Cell Migration Group Temasek Lifescience Laboratory 1 Research Link National University of Singapore Singapore 117604 tel: (65) 6872 8406 fax: (65) 6872 7007 |
In reply to this post by AdamC
This bug is fixed in ImageJ 1.41b. You can upgrade by running the
Plugins>Utilities>Update ImageJ command and selecting "daily build" from the drop down menu. -wayne On Apr 27, 2008, at 11:15 PM, Adam Cliffe wrote: > I'm writing a simple macro to take a 4D dataset, separate three > channels, > project one, and merge two channels into a composite hyperstack, then > save > all of the results (5 files). The macro works fine for a while, but > after > 2-5 runs it stops saving the last file (the composite hyperstack). It > also > produces the following java error. > > java.lang.NullPointerException > at ij.CompositeImage.getChannelLut(CompositeImage.java:456) > at ij.io.FileSaver.saveDisplayRangesAndLuts(FileSaver.java:132) > at ij.io.FileSaver.saveAsTiffStack(FileSaver.java:112) > at ij.io.FileSaver.saveAsTiff(FileSaver.java:69) > at ij.plugin.filter.Writer.run(Writer.java:20) > at > ij.plugin.filter.PlugInFilterRunner.processOneImage(PlugInFilterRunner. > java:243) > at > ij.plugin.filter.PlugInFilterRunner.<init>(PlugInFilterRunner.java: > 102) > at ij.IJ.runPlugIn(IJ.java:133) > at ij.Executer.runCommand(Executer.java:104) > at ij.Executer.run(Executer.java:58) > at ij.IJ.run(IJ.java:247) > at ij.IJ.saveAs(IJ.java:1196) > at ij.macro.Functions.saveAs(Functions.java:2268) > at ij.macro.Functions.doFunction(Functions.java:136) > at ij.macro.Interpreter.doStatement(Interpreter.java:205) > at ij.macro.Interpreter.doBlock(Interpreter.java:515) > at ij.macro.Interpreter.runMacro(Interpreter.java:119) > at ij.macro.MacroRunner.run(MacroRunner.java:105) > at java.lang.Thread.run(Thread.java:619) > > Does anyone know what might cause a macro to behave differently at > different > times? Restarting ImageJ seems to solve the problem (for a few > iterations). > > Thanks > > Adam > |
Free forum by Nabble | Edit this page |