<html>
<head>
<base href="http://fiji.sc/bugzilla/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - macro not able to open a sequence of 12-bit compressed Tifs which can be normally be opened in Fiji"
href="http://fiji.sc/bugzilla/show_bug.cgi?id=945">945</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>macro not able to open a sequence of 12-bit compressed Tifs which can be normally be opened in Fiji
</td>
</tr>
<tr>
<th>Product</th>
<td>Fiji
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P4
</td>
</tr>
<tr>
<th>Component</th>
<td>Plugins
</td>
</tr>
<tr>
<th>Assignee</th>
<td>imagej-bugs@imagej.net
</td>
</tr>
<tr>
<th>Reporter</th>
<td>adam.webb@lightsource.ca
</td>
</tr>
<tr>
<th>CC</th>
<td>adam.webb@lightsource.ca
</td>
</tr></table>
<p>
<div>
<pre>I have a problem running a macro that has been used for some time using
ImageJ. Here is a small part that does not work as expected.
macro"sum_dark"{
////////////////////////////////////////////////////////////Dark
Darkdir = getDirectory("Choose DarkField Directory ");
Darklist = getFileList(Darkdir);
setOption("display labels", true);
Darkpath = Darkdir+Darklist[0];
DarkOpenpath="open=["+Darkpath+"]";
DarkFileCount=lengthOf(Darklist);
run("Image Sequence...", "open = " + DarkOpenpath+" number="+DarkFileCount+"
starting=1 increment=1 scale=100 file=[] or=[] sort");
rename("Raw Dark Fields");
run("Z Project...", "start=1 stop="+DarkFileCount+" projection=[Average
Intensity]");
rename("Average Dark Field");
selectWindow("Raw Dark Fields");
close();
The macro fails to open tifs giving the messege: Open TIFF: ImageJ cannot open
12-bit LZW-compressed TIFFs
The exception is:
(Fiji Is Just) ImageJ 2.0.0-rc-15/1.49i; Java 1.6.0_24 [64-bit]; Windows NT
(unknown) 6.2; 36MB of 24000MB (<1%)
java.io.IOException: io.scif.img.ImgIOException: java.io.IOException:
io.scif.FormatException: Invalid TIFF file
at net.imagej.DefaultDatasetService.open(DefaultDatasetService.java:273)
at net.imagej.DefaultDatasetService.open(DefaultDatasetService.java:250)
at net.imagej.io.DatasetIOPlugin.open(DatasetIOPlugin.java:78)
at net.imagej.io.DatasetIOPlugin.open(DatasetIOPlugin.java:50)
at
net.imagej.legacy.plugin.DefaultLegacyOpener.open(DefaultLegacyOpener.java:134)
at
net.imagej.legacy.DefaultLegacyHooks.interceptOpenImage(DefaultLegacyHooks.java:336)
at ij.plugin.FolderOpener.run(FolderOpener.java:115)
at ij.IJ.runPlugIn(IJ.java:172)
at ij.Executer.runCommand(Executer.java:131)
at ij.Executer.run(Executer.java:64)
at ij.IJ.run(IJ.java:272)
at ij.macro.Functions.doRun(Functions.java:591)
at ij.macro.Functions.doFunction(Functions.java:89)
at ij.macro.Interpreter.doStatement(Interpreter.java:227)
at ij.macro.Interpreter.doBlock(Interpreter.java:599)
at ij.macro.Interpreter.runFirstMacro(Interpreter.java:698)
at ij.macro.Interpreter.doStatement(Interpreter.java:260)
at ij.macro.Interpreter.doStatements(Interpreter.java:215)
at ij.macro.Interpreter.run(Interpreter.java:112)
at ij.macro.Interpreter.run(Interpreter.java:82)
at ij.macro.Interpreter.run(Interpreter.java:93)
at ij.plugin.Macro_Runner.runMacro(Macro_Runner.java:153)
at ij.IJ.runMacro(IJ.java:119)
at ij.IJ.runMacro(IJ.java:108)
at net.imagej.legacy.IJ1Helper.runMacro(IJ1Helper.java:782)
at net.imagej.legacy.plugin.IJ1MacroEngine.eval(IJ1MacroEngine.java:116)
at net.imagej.legacy.plugin.IJ1MacroEngine.eval(IJ1MacroEngine.java:156)
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:164)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: io.scif.img.ImgIOException: java.io.IOException:
io.scif.FormatException: Invalid TIFF file
at io.scif.img.ImgOpener.createReader(ImgOpener.java:551)
at io.scif.img.ImgOpener.openImgs(ImgOpener.java:144)
at net.imagej.DefaultDatasetService.open(DefaultDatasetService.java:266)
... 36 more
Caused by: java.io.IOException: io.scif.FormatException: Invalid TIFF file
at io.scif.AbstractReader.setSource(AbstractReader.java:274)
at
io.scif.services.DefaultInitializeService.initializeReader(DefaultInitializeService.java:90)
at io.scif.img.ImgOpener.createReader(ImgOpener.java:542)
... 38 more
Caused by: io.scif.FormatException: Invalid TIFF file
at
io.scif.formats.MinimalTIFFFormat$Parser.typedParse(MinimalTIFFFormat.java:412)
at
io.scif.formats.TIFFFormat$BaseTIFFParser.typedParse(TIFFFormat.java:867)
at
io.scif.formats.TIFFFormat$BaseTIFFParser.typedParse(TIFFFormat.java:849)
at io.scif.AbstractParser.parse(AbstractParser.java:252)
at io.scif.AbstractParser.parse(AbstractParser.java:335)
at io.scif.AbstractParser.parse(AbstractParser.java:52)
at io.scif.AbstractReader.setSource(AbstractReader.java:270)
... 40 more
Note that using File -> Import -> image sequence does correctly open the
images. Later in the script it opens the images one at a time to apply the
corrections and this part works.
Information about your version of Java:
os.arch => amd64
os.name => Windows NT (unknown)
os.version => 6.2
java.version => 1.6.0_24
java.vendor => Sun Microsystems Inc.
java.runtime.name => Java(TM) SE Runtime Environment
java.runtime.version => 1.6.0_24-b07
java.vm.name => Java HotSpot(TM) 64-Bit Server VM
java.vm.version => 19.1-b02
java.vm.vendor => Sun Microsystems Inc.
java.vm.info => mixed mode
java.awt.graphicsenv => sun.awt.Win32GraphicsEnvironment
java.specification.name => Java Platform API Specification
java.specification.version => 1.6
sun.cpu.endian => little
sun.desktop => windows
file.separator => \
The up-to-date check says: REMIND_LATER
Information relevant to JAVA_HOME related problems:
JAVA_HOME is set to: C:\PORTAB~1\Fiji.app/java/win64/jdk1.6.0_24//jre
imagej.dir => C:\PORTAB~1\Fiji.app
Information about the version of each plugin:
Activated update sites:
ImageJ: <a href="http://update.imagej.net/">http://update.imagej.net/</a> (last check:20141015111008)
Fiji: <a href="http://fiji.sc/update/">http://fiji.sc/update/</a> (last check:20141014035500)
Files not up-to-date:
5996920b (LOCAL_ONLY) 20140806103157 plugins/BMIT/KES_barium.ijm
7676da49 (LOCAL_ONLY) 20140719201650 plugins/BMIT/KES_iodine.ijm
1bc4fefb (LOCAL_ONLY) 20141009122730
plugins/BMIT/Micro-CT-Processing_V2.2.ijm
cd71f0a5 (LOCAL_ONLY) 20140319113354 plugins/BMIT/Vertical_Scan.ijm
d3447486 (LOCAL_ONLY) 20140629143622 plugins/BMIT/normalize_one.ijm
76b3e9ee (LOCAL_ONLY) 20141015154722 plugins/BMIT/sum_dark.ijm</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>