[ome-devel] Problem extracting videos of a lif project larger than 4GB
David Gault (Staff)
d.gault at dundee.ac.uk
Fri Apr 20 11:12:54 BST 2018
Hi,
Looking at the sample code provided I believe the cause of the issue is likely the line
writer.saveBytes(0, reader.openBytes(image));
which should be using the image index as below:
writer.saveBytes(image, reader.openBytes(image));
I would also recommend removing the setup and teardown of the reader and writer from within the loop, I have modified the sample code you provided to show how this might look at https://github.com/dgault/bio-formats-examples/blob/MailingListConvertExample/src/main/java/ReadWriteExample.java.
With Thanks,
David Gault
On 19 Apr 2018, at 17:16, dalsim at eresmas.com<mailto:dalsim at eresmas.com> wrote:
Hi,
I am developing a tool in Java using loci-tools.jar 5.8.1. Here you can see an extract of the code: https://shrib.com/#RjFIQ2X6UyqkAvv-eyCl
The idea of the code is to extract the videos from the .lif project, which only have black and white 16bit videos. I extract all the tiffs from all the videos and then I join them with ffmpeg. So at the end, if a video has 300 frames, I will have 300 tiffs images, 1 image per frame. If the .lif project is <4GB everything works. If the .lif project, for example, is 10 or 17 GB, the extraction runs but the images are wrong. Here you can see an example: http://i68.tinypic.com/63ujgw.png On your left, frame 1 series 0. On your rigth, frame 2 series 0. Time between images is 40ms so I suspect the tiny white particle on top of frame 1 is the same as the one down in frame 2. Videos inside both cases (4GB and 10GB) weight around 600 MB. If I remove the last videos of the 10 or 17 GB .lif project so I save it in a new .lif project that weitgths less than 4 GB, the conversion is done without problems. Btw, ffmpeg is giving me an error of "Error in tiff header" with those "wrong images" but I can open them with ImageJ and the result is what you saw in the previous images.
What is the problem here?
_______________________________________________
ome-devel mailing list
ome-devel at lists.openmicroscopy.org.uk<mailto:ome-devel at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
The University of Dundee is a registered Scottish Charity, No: SC015096
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20180420/33c7ddb0/attachment.html>
More information about the ome-devel
mailing list