[ome-devel] Reading group of files

Dimitri Fabrèges dimitri.fabreges at yahoo.fr
Wed Jul 2 16:06:06 BST 2014


Hi Melissa,

So I was double-checking the data and I realized two major issues in my 
case:
1) the first timestep is actually the last one;
2) if one or more files of the dataset is missing, the first timestep is 
used instead.

I'm uploading timesteps here: 
http://qa.openmicroscopy.org.uk/qa/feedback/9389/?token=2dfafb0cfd6001f2e6bd32dcf505653a

The whole dataset size is 7GB, so I may be able to upload only 20 timesteps.

Thanks,
Dimitri.

Le 29/06/2014 19:18, Melissa Linkert a écrit :
> 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