<div dir="ltr"><div>Hi Michael,<br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">I can import the bfconvert output into Fiji with no problem.<br>
</blockquote><br></div>I just wanted to confirm, you're using "File > Import > Bio-Formats" or the Bio-Formats importer in Fiji, correct? It definitely didn't work for me when I tried yesterday. I can check next week to see if I was using an outdated Bio-Formats or something..<br>
<br>Thanks,<br>Mark<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, May 31, 2014 at 7:52 AM, Michael Meuli <span dir="ltr"><<a href="mailto:michael.meuli@gmail.com" target="_blank">michael.meuli@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Mark<br>
<br>
I can import the bfconvert output into Fiji with no problem.<br>
(If I do "./bfconvert /path/to/wt-dead-A.lif /path/to/output.ome.tiff" or<br>
"./bfconvert /path/to/wt-dead-A.lif /path/to/output_series_%s.ome.tiff"<br>
I can open the file(s) with Fiji.)<br>
If I open the .lif file with Fiji and export one series to ome.tiff I<br>
can read the output with ./SCIFIOTestDriver itkSCIFIOImageIOTest ...<br>
whereas I'm not able to read the output of bfconvert.<br>
<br>
Thanks a lot and best regards<br>
<span class="HOEnZb"><font color="#888888">Michael<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
On 30 May 2014 16:18, Mark Hiner <<a href="mailto:hinerm@gmail.com">hinerm@gmail.com</a>> wrote:<br>
> Hi Michael,<br>
><br>
>> "./SCIFIOTestDriver itkSCIFIOImageIOTest/path/to/output_series_0.ome.tiff<br>
>> /path/to/scifio-test.ome.tiff"<br>
><br>
> Just a reminder, since you're writing ome.tiff you should have a "-w" flag<br>
> at the end of this command. It sounds like you were using -w, just wanted to<br>
> clarify for anyone else reading this thread.<br>
><br>
>> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space<br>
><br>
> There are two problems here. First, it seems that in SCIFIOImageIO the use<br>
> of Bio-Formats is overly aggressive in pulling in all the series, thus the<br>
> OutOfMemoryError. If you physically isolate a single series (e.g. delete or<br>
> move to another directory series 1-19) the application will run, but we get<br>
> another exception (at least on my end):<br>
><br>
> ./SCIFIOTestDriver itkSCIFIOImageIOTest output_series_0.ome.tiff<br>
> scifio-test.ome.tiff -w<br>
><br>
> reader->GetUseStreaming(): 1<br>
> done checking streaming usage<br>
> ITK test driver caught an ITK exception:<br>
><br>
> itk::ExceptionObject (0x7ff8838b6ae8)<br>
> Location: "unknown"<br>
> File:<br>
> /Users/mhiner/loci/ITK/build/Modules/Remote/SCIFIO/src/itkSCIFIOImageIO.cxx<br>
> Line: 180<br>
> Description: itk::ERROR: SCIFIOImageIO(0x7ff8838b4f00): SCIFIOImageIO exited<br>
> abnormally. Creating new reader for output_series_0.ome.tiff<br>
><br>
> log4j:WARN No appenders could be found for logger<br>
> (loci.common.services.ServiceFactory).<br>
> log4j:WARN Please initialize the log4j system properly.<br>
> log4j:WARN See <a href="http://logging.apache.org/log4j/1.2/faq.html#noconfig" target="_blank">http://logging.apache.org/log4j/1.2/faq.html#noconfig</a> for<br>
> more info.<br>
> Exception in thread "main" loci.formats.FormatException: Unmatched UUID:<br>
> urn:uuid:b72fe97b-02c9-4029-a876-ca2bae46cbac<br>
> at loci.formats.in.OMETiffReader.initFile(OMETiffReader.java:456)<br>
><br>
> at loci.formats.FormatReader.setId(FormatReader.java:1244)<br>
> at loci.formats.ImageReader.setId(ImageReader.java:727)<br>
> at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:529)<br>
> at loci.formats.ChannelFiller.setId(ChannelFiller.java:263)<br>
> at<br>
> loci.scifio.itk.SCIFIOITKBridge.createReader(SCIFIOITKBridge.java:617)<br>
> at<br>
> loci.scifio.itk.SCIFIOITKBridge.readImageInfo(SCIFIOITKBridge.java:268)<br>
> at<br>
> loci.scifio.itk.SCIFIOITKBridge.executeCommand(SCIFIOITKBridge.java:133)<br>
><br>
> at<br>
> loci.scifio.itk.SCIFIOITKBridge.executeCommand(SCIFIOITKBridge.java:108)<br>
> at loci.scifio.itk.SCIFIOITKBridge.waitForInput(SCIFIOITKBridge.java:83)<br>
> at<br>
> loci.scifio.itk.SCIFIOITKBridge.executeCommand(SCIFIOITKBridge.java:163)<br>
> at loci.scifio.itk.SCIFIOITKBridge.main(SCIFIOITKBridge.java:688)<br>
><br>
> I also get this exception when importing with Bio-Formats into Fiji.<br>
><br>
> As a side note, there are flags for itkSCIFIOImageIOTest that, in theory,<br>
> should help the out of memory side:<br>
><br>
> "-s <n1, n2>" should limit the series read.<br>
> "-v <n>" should divide the data into divisions, which might mitigate the<br>
> risk of OutOfMemoryErrors.<br>
><br>
> But neither of these will help the UUID exception. Also, I still got<br>
> OutOfMemoryErrors with these, so it was still trying to initialize using all<br>
> the series. So I created a new issue in the SCIFIO-ImageIO tracker.<br>
><br>
> Anyway, try importing the bfconvert output into Fiji with Bio-Formats and<br>
> let me know if you don't get the UUID exception. If you do, then I think the<br>
> bfconvert output is just invalid..<br>
><br>
> Regards,<br>
> Mark<br>
><br>
><br>
> On Thu, May 29, 2014 at 12:17 PM, Michael Meuli <<a href="mailto:michael.meuli@gmail.com">michael.meuli@gmail.com</a>><br>
> wrote:<br>
>><br>
>> Hi Mark,<br>
>><br>
>> Thanks for the quick response. I can see I was using<br>
>> itkSCIFIOImageIOTest the wrong way and it doesn't make sense to use it<br>
>> like this.<br>
>> If I use the -w flag I get an error in all cases but at the moment I<br>
>> don't care as my aim now is to read ome.tiff files with itk.<br>
>> I've written a small program (mainly by copy paste from examples /<br>
>> <a href="https://github.com/michaelmeuli/bactelize" target="_blank">https://github.com/michaelmeuli/bactelize</a>) which so far reads the<br>
>> multi-channel-z-series.ome.tif file, does a maximum intensity<br>
>> projection of one channel and writes a 2D image and it seems to work<br>
>> with the multi-channel-z-series.ome.tif but not with the files<br>
>> converted with bfconvert.<br>
>><br>
>> Expressed with itkSCIFIOImageIOTest:<br>
>> "./SCIFIOTestDriver itkSCIFIOImageIOTest<br>
>> /path/to/multi-channel-z-series.ome.tif /path/to/scifio-test.ome.tiff"<br>
>> doesn't give an error and seems to produce a tiff file of the first<br>
>> z-plane, but<br>
>> "./SCIFIOTestDriver itkSCIFIOImageIOTest<br>
>> /path/to/output_series_0.ome.tiff /path/to/scifio-test.ome.tiff" gives<br>
>> an error:<br>
>><br>
>> reader->GetUseStreaming(): 1<br>
>> done checking streaming usage<br>
>> ITK test driver caught an ITK exception:<br>
>><br>
>> itk::ExceptionObject (0x2f87680)<br>
>> Location: "unknown"<br>
>> File:<br>
>> /home/michael/Colocalization/ITK-Release-build/Modules/Remote/SCIFIO/src/itkSCIFIOImageIO.cxx<br>
>> Line: 180<br>
>> Description: itk::ERROR: SCIFIOImageIO(0x2f78970): SCIFIOImageIO<br>
>> exited abnormally. Creating new reader for<br>
>><br>
>> /home/michael/bioimage/ome/data/wt-dead-A-ome-tiff/output_series_0.ome.tiff<br>
>> log4j:WARN No appenders could be found for logger<br>
>> (loci.common.services.ServiceFactory).<br>
>> log4j:WARN Please initialize the log4j system properly.<br>
>> log4j:WARN See <a href="http://logging.apache.org/log4j/1.2/faq.html#noconfig" target="_blank">http://logging.apache.org/log4j/1.2/faq.html#noconfig</a><br>
>> for more info.<br>
>> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space<br>
>> at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:39)<br>
>> at java.nio.ByteBuffer.allocate(ByteBuffer.java:312)<br>
>> at<br>
>> loci.common.NIOByteBufferProvider.allocateDirect(NIOByteBufferProvider.java:132)<br>
>> at<br>
>> loci.common.NIOByteBufferProvider.allocate(NIOByteBufferProvider.java:118)<br>
>> at loci.common.NIOFileHandle.buffer(NIOFileHandle.java:532)<br>
>> at loci.common.NIOFileHandle.seek(NIOFileHandle.java:254)<br>
>> at<br>
>> loci.common.RandomAccessInputStream.seek(RandomAccessInputStream.java:140)<br>
>> at loci.formats.tiff.TiffParser.getIFDOffsets(TiffParser.java:308)<br>
>> at loci.formats.tiff.TiffParser.getIFDs(TiffParser.java:226)<br>
>> at loci.formats.in.MinimalTiffReader.initFile(MinimalTiffReader.java:426)<br>
>> at loci.formats.FormatReader.setId(FormatReader.java:1244)<br>
>> at loci.formats.in.OMETiffReader.initFile(OMETiffReader.java:704)<br>
>> at loci.formats.FormatReader.setId(FormatReader.java:1244)<br>
>> at loci.formats.ImageReader.setId(ImageReader.java:727)<br>
>> at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:529)<br>
>> at loci.formats.ChannelFiller.setId(ChannelFiller.java:263)<br>
>> at loci.scifio.itk.SCIFIOITKBridge.createReader(SCIFIOITKBridge.java:622)<br>
>> at loci.scifio.itk.SCIFIOITKBridge.readImageInfo(SCIFIOITKBridge.java:266)<br>
>> at<br>
>> loci.scifio.itk.SCIFIOITKBridge.executeCommand(SCIFIOITKBridge.java:131)<br>
>> at<br>
>> loci.scifio.itk.SCIFIOITKBridge.executeCommand(SCIFIOITKBridge.java:108)<br>
>> at loci.scifio.itk.SCIFIOITKBridge.waitForInput(SCIFIOITKBridge.java:83)<br>
>> at<br>
>> loci.scifio.itk.SCIFIOITKBridge.executeCommand(SCIFIOITKBridge.java:161)<br>
>> at loci.scifio.itk.SCIFIOITKBridge.main(SCIFIOITKBridge.java:693)<br>
>><br>
>> Best regards<br>
>> Michael Meuli<br>
>><br>
>><br>
>><br>
>> On 29 May 2014 17:41, Mark Hiner <<a href="mailto:hiner@wisc.edu">hiner@wisc.edu</a>> wrote:<br>
>> > Hi Michael,<br>
>> ><br>
>> ><br>
>> >> The problem is that ./SCIFIOTestDriver itkSCIFIOImageIOTest<br>
>> >> /path/to/output_series_0.ome.tiff /path/to/scifiotest.ome.tiff<br>
>> >> (and my little program) throws an exception.<br>
>> > ...<br>
>> ><br>
>> >> How do I use bfconvert the correct way for my case?<br>
>> ><br>
>> > You used bfconvert correctly to convert your dataset. Just so it's<br>
>> > clear, if<br>
>> > your goal was to produce an OME-TIFF:<br>
>> ><br>
>> >> /SCIFIOTestDriver itkSCIFIOImageIOTest<br>
>> >> /path/to/output_series_0.ome.tiff<br>
>> >> /path/to/scifiotest.ome.tiff<br>
>> ><br>
>> > would be unnecessary, as you already have the OME-TIFF output from<br>
>> > bfconvert. The itkSCIFIOImageIOTest is an analogous tool to bfconvert<br>
>> > written in the Bio-Formats C++ framework. (although comparing the<br>
>> > outputs of<br>
>> > the itkSCIFIOImageIOTest conversion would be a good way to check for<br>
>> > errors<br>
>> > in the conversion process)<br>
>> ><br>
>> > That said, I believe your conversion failed because the output was<br>
>> > picked up<br>
>> > by the ITK TIFF ImageIO, which I believe only supports 3D data. The<br>
>> > itkSCIFIOImageIOTest utility does basically no automation - you have to<br>
>> > tell<br>
>> > it exactly how to run, and because the SCIFIOImageIO is an external<br>
>> > module<br>
>> > it is not prioritized by the ITK format detection framework over<br>
>> > internal<br>
>> > modules (I'm not sure it's part of the automatic detection framework at<br>
>> > all,<br>
>> > actually). So you need to force the use of the SCIFIOImageIO for<br>
>> > writing.<br>
>> ><br>
>> > If you run:<br>
>> ><br>
>> > /SCIFIOTestDriver itkSCIFIOImageIOTest<br>
>> ><br>
>> > with no arguments from the command line, it will print the usage +<br>
>> > available<br>
>> > flags. The flag you wanted here is "-w" to write with the SCIFIOImageIO<br>
>> > (which will use Bio-Formats, and thus the OME-TIFF writer).<br>
>> ><br>
>> > So the final syntax is:<br>
>> ><br>
>> > /SCIFIOTestDriver itkSCIFIOImageIOTest /path/to/output_series_0.ome.tiff<br>
>> > /path/to/scifiotest.ome.tiff -w<br>
>> ><br>
>> > which worked for me locally.<br>
>> ><br>
>> > Let me know if you have any other questions or issues!<br>
>> ><br>
>> > Regards,<br>
>> > Mark<br>
>> ><br>
>> > On Thu, May 29, 2014 at 4:40 AM, Michael Meuli <<a href="mailto:michael.meuli@gmail.com">michael.meuli@gmail.com</a>><br>
>> > wrote:<br>
>> >><br>
>> >> ./SCIFIOTestDriver itkSCIFIOImageIOTest<br>
>> >> /path/to/output_series_0.ome.tiff /path/to/scifiotest.ome.tiff<br>
>> ><br>
>> ><br>
>> ><br>
><br>
><br>
</div></div></blockquote></div><br></div>