|
Bugzilla – Bug 1268 |
fiji macro won't open zstack images with certain filenames |
Last modified: 2016-05-11 05:28:06 CDT |
| ⚠ |
NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug. The Fiji project now uses GitHub Issues for issue tracking. Please file all new issues there. |
| fiji macro won't open zstack images with certain filenames | |
|
|
|
||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
I use a macro in fiji to process my images from the confocal microscope. These images are typically zstack images with multiple colours, and I use the macro to condense the zstacks, and then save each colour componant as well as a merged RGB image. The problem occurs when the macro tries to open a file whos name begins in any latter from J-Z, whereupon I get an error message saying "there are no images open" and the exception below[1]. If the file begins with a 1-9 or the letters a-i, it will be openned and processed fine. If I rename the file with an "a" in front, it will also be openned fine. For example the file "Untransfected" will not open, but renaming the exact same file to "aUntransfected" will open fine. This only occurs with zstack images. If I try and open a non-zstack 3 colour image it also opens fine no matter what it is called. I usualyl use .lif image files that open using the Bio-Formats plugin in fiji. However .lif files that are not z-stacks open fine, as well as zstacks renamed to begin with a letter between a-i, so it it is not the file type itself that is the problem. I have pasted a sample macro that I use below [2] [1] (Fiji Is Just) ImageJ 2.0.0-rc-43/1.51a; Java 1.8.0_51 [64-bit]; Mac OS X 10.10.5; 394MB of 6164MB (6%) loci.formats.UnknownFormatException: Unknown file format: /Users/philipdusart/Google Drive/PhilWorkShared/confocal/160509/160429/test/Icon at loci.formats.ImageReader.getReader(ImageReader.java:190) at loci.plugins.in.ImportProcess.createBaseReader(ImportProcess.java:630) at loci.plugins.in.ImportProcess.initializeReader(ImportProcess.java:486) at loci.plugins.in.ImportProcess.execute(ImportProcess.java:139) at loci.plugins.BF.openImagePlus(BF.java:92) at loci.plugins.macro.LociFunctions.openImagePlus(LociFunctions.java:216) at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at loci.plugins.macro.MacroFunctions.handleExtension(MacroFunctions.java:82) at ij.macro.ExtensionDescriptor.dispatch(ExtensionDescriptor.java:288) at ij.macro.Functions.doExt(Functions.java:4490) at ij.macro.Functions.getStringFunction(Functions.java:274) at ij.macro.Interpreter.getStringTerm(Interpreter.java:1293) at ij.macro.Interpreter.getString(Interpreter.java:1272) at ij.macro.Interpreter.doStatement(Interpreter.java:281) at ij.macro.Interpreter.doBlock(Interpreter.java:608) at ij.macro.Interpreter.runUserFunction(Interpreter.java:311) at ij.macro.Interpreter.doStatement(Interpreter.java:233) at ij.macro.Interpreter.doFor(Interpreter.java:530) at ij.macro.Interpreter.doStatement(Interpreter.java:254) at ij.macro.Interpreter.doStatements(Interpreter.java:218) at ij.macro.Interpreter.run(Interpreter.java:115) at ij.macro.Interpreter.run(Interpreter.java:85) at ij.macro.Interpreter.run(Interpreter.java:96) at ij.plugin.Macro_Runner.runMacro(Macro_Runner.java:155) at ij.IJ.runMacro(IJ.java:133) at ij.IJ.runMacro(IJ.java:122) at net.imagej.legacy.IJ1Helper$3.call(IJ1Helper.java:936) at net.imagej.legacy.IJ1Helper$3.call(IJ1Helper.java:933) at net.imagej.legacy.IJ1Helper.runMacroFriendly(IJ1Helper.java:899) at net.imagej.legacy.IJ1Helper.runMacro(IJ1Helper.java:933) at net.imagej.legacy.plugin.IJ1MacroEngine.eval(IJ1MacroEngine.java:116) at net.imagej.legacy.plugin.IJ1MacroEngine.eval(IJ1MacroEngine.java:163) at org.scijava.script.ScriptModule.run(ScriptModule.java:174) at org.scijava.module.ModuleRunner.run(ModuleRunner.java:167) at org.scijava.module.ModuleRunner.call(ModuleRunner.java:126) at org.scijava.module.ModuleRunner.call(ModuleRunner.java:65) at org.scijava.thread.DefaultThreadService$2.call(DefaultThreadService.java:191) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) [2] function action(input, output1, output2, output3, output4, filename) { run("Bio-Formats Macro Extensions"); Ext.openImagePlus(input + filename) run("Z Project...", "projection=[Max Intensity]"); rename("A"); run("Split Channels"); selectWindow("C3-A"); setMinAndMax(1, 75); run("Apply LUT"); selectWindow("C2-A"); setMinAndMax(1, 72); run("Apply LUT"); run("Merge Channels...", "c1=[C2-A] c2=[C3-A] c3=[C1-A] keep"); selectWindow("RGB"); saveAs("Tiff", output1 + filename); close(); run("Merge Channels...", "c2=[C3-A] c3=[C1-A] keep"); selectWindow("RGB"); saveAs("Jpeg", output3 + filename); selectWindow("C3-A"); saveAs("Jpeg", output2 + filename); selectWindow("C2-A"); saveAs("Jpeg", output4 + filename); close(); close(); close(); close(); close(); } input = "/Users/philipdusart/Google Drive/PhilWorkShared/confocal/160509/160429/STATIC/"; output1 = "/Users/philipdusart/Google Drive/Other data/Confocal/1Processed/160509/160429/STATIC/RGB/"; output2 = "/Users/philipdusart/Google Drive/Other data/Confocal/1Processed/160509/160429/STATIC/green/"; output3 = "/Users/philipdusart/Google Drive/Other data/Confocal/1Processed/160509/160429/STATIC/G+B/"; output4 = "/Users/philipdusart/Google Drive/Other data/Confocal/1Processed/160509/160429/STATIC/red/"; list = getFileList(input); for (i = 0; i < list.length; i++) action(input, output1, output2, output3, output4, list[i]); setBatchMode(false); Information about your version of Java: os.arch => x86_64 os.name => Mac OS X os.version => 10.10.5 java.version => 1.8.0_51 java.vendor => Oracle Corporation java.runtime.name => Java(TM) SE Runtime Environment java.runtime.version => 1.8.0_51-b16 java.vm.name => Java HotSpot(TM) 64-Bit Server VM java.vm.version => 25.51-b03 java.vm.vendor => Oracle Corporation java.vm.info => mixed mode java.awt.graphicsenv => sun.awt.CGraphicsEnvironment java.specification.name => Java Platform API Specification java.specification.version => 1.8 sun.cpu.endian => little sun.desktop => null file.separator => / The up-to-date check says: UP_TO_DATE Information relevant to JAVA_HOME related problems: JAVA_HOME is set to: /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/ imagej.dir => /Applications/Fiji.app Information about the version of each plugin: Activated update sites: ImageJ: http://update.imagej.net/ (last check:20160504203521) Fiji: http://update.fiji.sc/ (last check:20160509100721)