[ome-users] big data processing with bfopen

Sebastien Besson (Staff) s.besson at dundee.ac.uk
Fri Nov 4 17:15:52 GMT 2016


Dear Yuanyuan,

the bfopen function is designed to initialize a reader from a given file and open
all the pixel data stored in this image. As you mentioned, the limit of 2GB per plane
makes this function not adapted to whole-slide imaging.

if you are using MATLAB, you should be able to use the low-level functions and
especially one of the signatures of bfGetPlane [1] allowing to retrieve a tile instead
of the full plane. Under the hood, this method effectively uses openBytes [2]
to retrieve a XY subset of the plane.

For instance, the following code should return the first 512x512 tile of the first
plane in your Hamamatsu file:

>> bfCheckJavaPath();
>> r= bfGetReader(‘/path/to/your/image.his’);
>> I = bfGetPlane(r, 1m 1, 1, 512, 512);

Best,
Sebastien

[1] https://github.com/openmicroscopy/bioformats/blob/v5.2.4/components/formats-gpl/matlab/bfGetPlane.m#L10
[2] http://downloads.openmicroscopy.org/bio-formats/5.2.4/api/loci/formats/FormatReader.html#openBytes(int,%20byte[],%20int,%20int,%20int,%20int)<http://downloads.openmicroscopy.org/bio-formats/5.2.4/api/loci/formats/FormatReader.html#openBytes(int,%20byte%5B%5D,%20int,%20int,%20int,%20int)>

On 3 Nov 2016, at 15:54, Yuanyuan Jiang <Yuanyuan.jiang at tuebingen.mpg.de<mailto:Yuanyuan.jiang at tuebingen.mpg.de>> wrote:

Dear All,

I have a big stream data from the Hamamatsu sCMOS camera. The file size is more than 10GB and the format can be .BTF(big tiff) or the .HIS format (Hamamatsu format). I tried to use the bioformats library (bfopen) to load in the MATLAB or the ImageJ, in both cases, the latest jar files are added to the path of the software.

However, for the HIS format, it only read portion of the data.  That is probably due to the memory restriction of the bioformats only read 2 GB
    error(['Image plane too large. Only 2GB of data can be extracted '...
        'at one time. You can workaround the problem by opening '...
        'the plane in tiles.']);
One suggest from the link http://www.openmicroscopy.org/site/support/bio-formats5.2/about/bug-reporting.html
But I do not find any examples to use it : openBytes(int, int,int, int, int)
 If I use the big tiff format, the bio-formats can read the small dataset, but the larger dataset (>4GB), there is error to ask the Java advanced Imaging, which I have no clue to install or include.

Error using bfGetReader (line 84)
Java exception occurred:
loci.formats.MissingLibraryException: Java Advanced Imaging
(JAI) is required to read some TIFF files. Please install JAI
from https://jai.dev.java.net/


Can someone help me to find a solution. Really thanks a lot.


Best regards,

Yuanyuan
_______________________________________________
ome-users mailing list
ome-users at lists.openmicroscopy.org.uk<mailto:ome-users at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users


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-users/attachments/20161104/28c91cc0/attachment.html>


More information about the ome-users mailing list