[ome-users] Bio-formats - Bug when recycling TiffDelegateReader

Stephane Dallongeville stephane.dallongeville at pasteur.fr
Tue Apr 11 16:57:17 BST 2017


Hi,

I observed a weird behavior when i try to re-use a reader, specifically 
the TiffDelegateReader here.
If i try to open the attached "rotated.tif" file with a brand new 
TiffDelegateReader it open correctly (metadata are properly populated, 
with correct number of Z plane) but if i "recycle" the reader to open 
it, the metadata are not correctly populated (Z planes are set in T 
dimension).

We can reproduce the issue with this code :

<<
ImageReader mainReader = new ImageReader();
mainReader.setAllowOpenFiles(true);

// get appropriate reader for first image (TiffDelegateReader normally)
IFormatReader reader = new mainReader.getReader("3dtestbigger.tif");

// prepare meta data store structure & open '3dtestbigger.tif' file
reader.setMetadataStore(new OMEXMLMetadataImpl());
reader.setId("3dtestbigger.tif");

// do whatever you need to
...

// close reader as we are done with '3dtestbigger.tif'
reader.close();

// prepare meta data store structure & open 'rotated.tif' file
reader.setMetadataStore(new OMEXMLMetadataImpl());
reader.setId("rotated.tif");

// metadata are not properly populated !
 >>

In Icy we try to avoid creating a new reader each time and recycle them 
when possible to speed up the loading processing so this issue can be 
problematic.

Best,

-- 
Stephane Dallongeville
Unité d'Analyse d'Images Biologiques
CNRS UMR 3691
Institut Pasteur
25 rue du Dr. Roux
75724 Paris cedex 15 (FRANCE)

Tel: +33 (0)1 45 68 87 01
Fax: +33 (0)1 40 61 33 30

http://www.bioimageanalysis.org/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: rotated.tif
Type: image/tif
Size: 765991 bytes
Desc: not available
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20170411/f0c05f04/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3dtestbigger.tif
Type: image/tif
Size: 6405093 bytes
Desc: not available
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20170411/f0c05f04/attachment-0003.bin>


More information about the ome-users mailing list