[ome-devel] Reading group of files

Melissa Linkert melissa at glencoesoftware.com
Sun Jun 29 18:18:36 BST 2014


Hi Dimitri,

> I have been developing an application in Java for my lab which reads
> and converts microscopy files.
> Recently I have tried to convert a group of TIFF files. I was used
> to work with single file dataset, which works nicely. With multiple
> files dataset, it works too, except that files are not read in the
> correct order.
> 
> Is there a method or something to:
> 1) get the order used to read multiple files dataset?
> 2) change the order?

How the files are grouped depends a lot upon the internal metadata in
the files.  Would you be able to send a small dataset that illustrates
the problem?  Files can be uploaded to
http://qa.openmicroscopy.org.uk/qa/upload, and are visible only to OME
developers.

It's very possible that what you're seeing is something that needs to be
fixed in Bio-Formats, but we can better advise after looking at a
dataset.

Regards,
-Melissa

On Mon, Jun 30, 2014 at 06:12:19PM +0200, Dimitri Fabrèges wrote:
> Dear mailinglist,
> 
> This is my first post here, so please let me know if I'm not clear
> enough or if you need more informations.
> 
> I have been developing an application in Java for my lab which reads
> and converts microscopy files.
> Recently I have tried to convert a group of TIFF files. I was used
> to work with single file dataset, which works nicely. With multiple
> files dataset, it works too, except that files are not read in the
> correct order.
> 
> Is there a method or something to:
> 1) get the order used to read multiple files dataset?
> 2) change the order?
> 
> I'm doing this:
> 
> IFormatReader reader = new ImageReader();
> reader.setMetadataStore(MetadataTools.createOMEXMLMetadata());
> reader.setId (firstFile);
> 
> int c = reader.getSizeC();
> int t = reader.getSizeT();
> int z = reader.getSizeZ();
> 
> for (int series = 0; series < reader.getSeriesCount(); series++)
> {
>     reader.setSeries (series);
>     for (int timestep = 0; timestep < t; timestep ++)
>     {
>         for (int channel = 0; channel < c; channel ++)
>         {
>             for (int depth = 0; depth < z; depth ++)
>             {
>                int index   = reader.getIndex (depth, channel, timestep);
> byte[] data = reader.openBytes ();
>                [...]
>                // Do stuff and write files (one file per timestep
> and channel)
>             }
>         }
>     }
> }
> 
> Thank you very much in advance.
> 
> Best,
> Dimitri.
> _______________________________________________
> ome-devel mailing list
> ome-devel at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel


More information about the ome-devel mailing list