Opening of float32 TIFF in imagej and fiji ...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Opening of float32 TIFF in imagej and fiji ...

robert atwood
Hi,
I wrote a macro that opens a whole stack of 32bit-flaot-TIFF images and does some processing. ImageJ just opens the stack without problems, but Fiji throws a large exception for each frame. Then it opens the image anywyas.

So, this could be a tolerable warning message, but simply the messages themselves are a huge problem, there are hundreds of little windows all over my monitor and I either have to close each one individually , or else quit Fiji and restart , then load my macro again etc. etc.

How do I get rid of this behaviour? What's wrong with the TIFF images,  that is not a problem in ImageJ?

I want to use improved macro batch functions of Fiji but this is a real headache.


Right now I have 212 little windows each containing this, and no option to close them all.

I repeat, the imageas actually get opened correctly, so I don't quite see why I get invalid TIFF message, I'd expect then the image would NOT open??

So this is really 2 issues: Whats wrong with TIFF opening ? it works in ImageJ without trouble.
                                           Can the handling of such exceptions be improved to not open hundreds of little windows all over the place,  just put the messages to the log window instead?

The Tiffs are created by python tifffile.py library in this case.


Thanks in Advance,
Robert


(Fiji Is Just) ImageJ 2.0.0-rc-34/1.50a; Java 1.8.0_45 [64-bit]; Linux 2.6.32-504.16.2.el6.x86_64; 921MB of 10000MB (9%)
 
java.io.IOException: io.scif.img.ImgIOException: java.io.IOException: io.scif.FormatException: Invalid TIFF file
        at io.scif.services.DefaultDatasetIOService.open(DefaultDatasetIOService.java:134)
        at io.scif.services.DefaultDatasetIOService.open(DefaultDatasetIOService.java:109)
        at io.scif.io.DatasetIOPlugin.open(DatasetIOPlugin.java:75)
        at io.scif.io.DatasetIOPlugin.open(DatasetIOPlugin.java:50)
        at net.imagej.legacy.plugin.DefaultLegacyOpener.open(DefaultLegacyOpener.java:135)
        at net.imagej.legacy.DefaultLegacyHooks.interceptOpenImage(DefaultLegacyHooks.java:338)
        at ij.plugin.FolderOpener.run(FolderOpener.java:175)
        at ij.IJ.runPlugIn(IJ.java:182)
        at ij.Executer.runCommand(Executer.java:132)
        at ij.Executer.run(Executer.java:62)
        at ij.IJ.run(IJ.java:292)
        at ij.macro.Functions.doRun(Functions.java:600)
        at ij.macro.Functions.doFunction(Functions.java:95)
        at ij.macro.Interpreter.doStatement(Interpreter.java:227)
        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:129)
        at ij.IJ.runMacro(IJ.java:118)
        at net.imagej.legacy.IJ1Helper$3.call(IJ1Helper.java:909)
        at net.imagej.legacy.IJ1Helper$3.call(IJ1Helper.java:906)
        at net.imagej.legacy.IJ1Helper.runMacroFriendly(IJ1Helper.java:872)
        at net.imagej.legacy.IJ1Helper.runMacro(IJ1Helper.java:906)
        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:175)
        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)
Caused by: io.scif.img.ImgIOException: java.io.IOException: io.scif.FormatException: Invalid TIFF file
        at io.scif.img.ImgOpener.createReader(ImgOpener.java:556)
        at io.scif.img.ImgOpener.openImgs(ImgOpener.java:146)
        at io.scif.services.DefaultDatasetIOService.open(DefaultDatasetIOService.java:123)
        ... 35 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:547)
        ... 37 more
Caused by: io.scif.FormatException: Invalid TIFF file
        at io.scif.formats.MinimalTIFFFormat$Parser.typedParse(MinimalTIFFFormat.java:415)
        at io.scif.formats.TIFFFormat$BaseTIFFParser.typedParse(TIFFFormat.java:891)
        at io.scif.formats.TIFFFormat$BaseTIFFParser.typedParse(TIFFFormat.java:873)
        at io.scif.AbstractParser.parse(AbstractParser.java:253)
        at io.scif.AbstractParser.parse(AbstractParser.java:336)
        at io.scif.AbstractParser.parse(AbstractParser.java:52)
        at io.scif.AbstractReader.setSource(AbstractReader.java:270)
        ... 39 more

--
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Opening of float32 TIFF in imagej and fiji ...

Krs5
Dear Robert,

Sounds like ImageJ2 is selected. Try disabling the "Use SCIFIO when opening files" option under Edit > Options > ImageJ2... Hopefully it will solve the problem

Best wishes

Kees

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Robert Atwood
Sent: 07 August 2015 12:16
To: [hidden email]
Subject: Opening of float32 TIFF in imagej and fiji ...

Hi,
I wrote a macro that opens a whole stack of 32bit-flaot-TIFF images and does some processing. ImageJ just opens the stack without problems, but Fiji throws a large exception for each frame. Then it opens the image anywyas.

So, this could be a tolerable warning message, but simply the messages themselves are a huge problem, there are hundreds of little windows all over my monitor and I either have to close each one individually , or else quit Fiji and restart , then load my macro again etc. etc.

How do I get rid of this behaviour? What's wrong with the TIFF images,  that is not a problem in ImageJ?

I want to use improved macro batch functions of Fiji but this is a real headache.


Right now I have 212 little windows each containing this, and no option to close them all.

I repeat, the imageas actually get opened correctly, so I don't quite see why I get invalid TIFF message, I'd expect then the image would NOT open??

So this is really 2 issues: Whats wrong with TIFF opening ? it works in ImageJ without trouble.
                                           Can the handling of such exceptions be improved to not open hundreds of little windows all over the place,  just put the messages to the log window instead?

The Tiffs are created by python tifffile.py library in this case.


Thanks in Advance,
Robert


(Fiji Is Just) ImageJ 2.0.0-rc-34/1.50a; Java 1.8.0_45 [64-bit]; Linux 2.6.32-504.16.2.el6.x86_64; 921MB of 10000MB (9%)
 
java.io.IOException: io.scif.img.ImgIOException: java.io.IOException: io.scif.FormatException: Invalid TIFF file
        at io.scif.services.DefaultDatasetIOService.open(DefaultDatasetIOService.java:134)
        at io.scif.services.DefaultDatasetIOService.open(DefaultDatasetIOService.java:109)
        at io.scif.io.DatasetIOPlugin.open(DatasetIOPlugin.java:75)
        at io.scif.io.DatasetIOPlugin.open(DatasetIOPlugin.java:50)
        at net.imagej.legacy.plugin.DefaultLegacyOpener.open(DefaultLegacyOpener.java:135)
        at net.imagej.legacy.DefaultLegacyHooks.interceptOpenImage(DefaultLegacyHooks.java:338)
        at ij.plugin.FolderOpener.run(FolderOpener.java:175)
        at ij.IJ.runPlugIn(IJ.java:182)
        at ij.Executer.runCommand(Executer.java:132)
        at ij.Executer.run(Executer.java:62)
        at ij.IJ.run(IJ.java:292)
        at ij.macro.Functions.doRun(Functions.java:600)
        at ij.macro.Functions.doFunction(Functions.java:95)
        at ij.macro.Interpreter.doStatement(Interpreter.java:227)
        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:129)
        at ij.IJ.runMacro(IJ.java:118)
        at net.imagej.legacy.IJ1Helper$3.call(IJ1Helper.java:909)
        at net.imagej.legacy.IJ1Helper$3.call(IJ1Helper.java:906)
        at net.imagej.legacy.IJ1Helper.runMacroFriendly(IJ1Helper.java:872)
        at net.imagej.legacy.IJ1Helper.runMacro(IJ1Helper.java:906)
        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:175)
        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)
Caused by: io.scif.img.ImgIOException: java.io.IOException: io.scif.FormatException: Invalid TIFF file
        at io.scif.img.ImgOpener.createReader(ImgOpener.java:556)
        at io.scif.img.ImgOpener.openImgs(ImgOpener.java:146)
        at io.scif.services.DefaultDatasetIOService.open(DefaultDatasetIOService.java:123)
        ... 35 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:547)
        ... 37 more
Caused by: io.scif.FormatException: Invalid TIFF file
        at io.scif.formats.MinimalTIFFFormat$Parser.typedParse(MinimalTIFFFormat.java:415)
        at io.scif.formats.TIFFFormat$BaseTIFFParser.typedParse(TIFFFormat.java:891)
        at io.scif.formats.TIFFFormat$BaseTIFFParser.typedParse(TIFFFormat.java:873)
        at io.scif.AbstractParser.parse(AbstractParser.java:253)
        at io.scif.AbstractParser.parse(AbstractParser.java:336)
        at io.scif.AbstractParser.parse(AbstractParser.java:52)
        at io.scif.AbstractReader.setSource(AbstractReader.java:270)
        ... 39 more

--
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Opening of float32 TIFF in imagej and fiji ...

robert atwood
Thanks Kees! That stops it for now.

I think that's a work-around rather than a solution, though.


I have a vague recollection of requiring this option for some other images, not sure which ones ..






> -----Original Message-----
> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
> Straatman, Kees (Dr.)
> Sent: 07 August 2015 14:44
> To: [hidden email]
> Subject: Re: Opening of float32 TIFF in imagej and fiji ...
>
> Dear Robert,
>
> Sounds like ImageJ2 is selected. Try disabling the "Use SCIFIO when opening
> files" option under Edit > Options > ImageJ2... Hopefully it will solve the
> problem
>
> Best wishes
>
> Kees
>
> -----Original Message-----
> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
> Robert Atwood
> Sent: 07 August 2015 12:16
> To: [hidden email]
> Subject: Opening of float32 TIFF in imagej and fiji ...
>
> Hi,
> I wrote a macro that opens a whole stack of 32bit-flaot-TIFF images and does
> some processing. ImageJ just opens the stack without problems, but Fiji throws
> a large exception for each frame. Then it opens the image anywyas.
>
> So, this could be a tolerable warning message, but simply the messages
> themselves are a huge problem, there are hundreds of little windows all over
> my monitor and I either have to close each one individually , or else quit Fiji
> and restart , then load my macro again etc. etc.
>
> How do I get rid of this behaviour? What's wrong with the TIFF images,  that is
> not a problem in ImageJ?
>
> I want to use improved macro batch functions of Fiji but this is a real
> headache.
>
>
> Right now I have 212 little windows each containing this, and no option to
> close them all.
>
> I repeat, the imageas actually get opened correctly, so I don't quite see why I
> get invalid TIFF message, I'd expect then the image would NOT open??
>
> So this is really 2 issues: Whats wrong with TIFF opening ? it works in ImageJ
> without trouble.
>                                            Can the handling of such exceptions be improved to
> not open hundreds of little windows all over the place,  just put the messages
> to the log window instead?
>
> The Tiffs are created by python tifffile.py library in this case.
>
>
> Thanks in Advance,
> Robert
>
>
> (Fiji Is Just) ImageJ 2.0.0-rc-34/1.50a; Java 1.8.0_45 [64-bit]; Linux 2.6.32-
> 504.16.2.el6.x86_64; 921MB of 10000MB (9%)
>
> java.io.IOException: io.scif.img.ImgIOException: java.io.IOException:
> io.scif.FormatException: Invalid TIFF file
> at
> io.scif.services.DefaultDatasetIOService.open(DefaultDatasetIOService.java:13
> 4)
> at
> io.scif.services.DefaultDatasetIOService.open(DefaultDatasetIOService.java:10
> 9)
> at io.scif.io.DatasetIOPlugin.open(DatasetIOPlugin.java:75)
> at io.scif.io.DatasetIOPlugin.open(DatasetIOPlugin.java:50)
> at
> net.imagej.legacy.plugin.DefaultLegacyOpener.open(DefaultLegacyOpener.jav
> a:135)
> at
> net.imagej.legacy.DefaultLegacyHooks.interceptOpenImage(DefaultLegacyHo
> oks.java:338)
> at ij.plugin.FolderOpener.run(FolderOpener.java:175)
> at ij.IJ.runPlugIn(IJ.java:182)
> at ij.Executer.runCommand(Executer.java:132)
> at ij.Executer.run(Executer.java:62)
> at ij.IJ.run(IJ.java:292)
> at ij.macro.Functions.doRun(Functions.java:600)
> at ij.macro.Functions.doFunction(Functions.java:95)
> at ij.macro.Interpreter.doStatement(Interpreter.java:227)
> 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:129)
> at ij.IJ.runMacro(IJ.java:118)
> at net.imagej.legacy.IJ1Helper$3.call(IJ1Helper.java:909)
> at net.imagej.legacy.IJ1Helper$3.call(IJ1Helper.java:906)
> at net.imagej.legacy.IJ1Helper.runMacroFriendly(IJ1Helper.java:872)
> at net.imagej.legacy.IJ1Helper.runMacro(IJ1Helper.java:906)
> 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:175)
> 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.jav
> a:617)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: io.scif.img.ImgIOException: java.io.IOException:
> io.scif.FormatException: Invalid TIFF file
> at io.scif.img.ImgOpener.createReader(ImgOpener.java:556)
> at io.scif.img.ImgOpener.openImgs(ImgOpener.java:146)
> at
> io.scif.services.DefaultDatasetIOService.open(DefaultDatasetIOService.java:12
> 3)
> ... 35 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:547)
> ... 37 more
> Caused by: io.scif.FormatException: Invalid TIFF file
> at
> io.scif.formats.MinimalTIFFFormat$Parser.typedParse(MinimalTIFFFormat.java:
> 415)
> at
> io.scif.formats.TIFFFormat$BaseTIFFParser.typedParse(TIFFFormat.java:891)
> at
> io.scif.formats.TIFFFormat$BaseTIFFParser.typedParse(TIFFFormat.java:873)
> at io.scif.AbstractParser.parse(AbstractParser.java:253)
> at io.scif.AbstractParser.parse(AbstractParser.java:336)
> at io.scif.AbstractParser.parse(AbstractParser.java:52)
> at io.scif.AbstractReader.setSource(AbstractReader.java:270)
> ... 39 more
>
> --
> This e-mail and any attachments may contain confidential, copyright and or
> privileged material, and are for the use of the intended addressee only. If you
> are not the intended addressee or an authorised recipient of the addressee
> please notify us of receipt by returning the e-mail and do not use, copy,
> retain, distribute or disclose the information in or attached to the e-mail.
> Any opinions expressed within this e-mail are those of the individual and not
> necessarily of Diamond Light Source Ltd.
> Diamond Light Source Ltd. cannot guarantee that this e-mail or any
> attachments are free from viruses and we cannot accept liability for any
> damage which you may sustain as a result of software viruses which may be
> transmitted in or with the message.
> Diamond Light Source Limited (company no. 4375679). Registered in England
> and Wales with its registered office at Diamond House, Harwell Science and
> Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html