[ome-devel] smart way to open a time series of one pixel?

Melissa Linkert melissa at glencoesoftware.com
Fri Feb 6 20:42:38 GMT 2015


Hi Heinrich,

> I have huge movies (20k to 60k frames) in file formats from various camera suppliers that can all be opened using bioformats. I would like to access the time series of indivindual pixels. At the moment, I do this in matlab by using
> r = bfGetReader
> and then using the loci.formats.ChannelSeparator's function to call
> r.openBytes<http://downloads.openmicroscopy.org/bio-formats/5.0.6/api/loci/formats/ChannelSeparator.html#openBytes%28int,%20int,%20int,%20int,%20int%29>(int no, int x, int y, int w, int h) with w=h=1 and looping through all the planes. This takes ages. I was wondering whether there might be a smarter way to access the data I am interested in?

I would suggest starting by allocating a single buffer, and then calling
openBytes(int, byte[], int, int, int, int) repeatedly instead of
openBytes(int, int, int, int, int).  The latter will allocate a new byte
array to contain the pixel(s) each time it is called; I would expect
this to have a noticeable performance impact when called thousands of
times.

If reusing a single buffer doesn't help noticeably, it would be helpful
to know more about exactly which formats you are working with, as well
as roughly how long (in minutes) it takes to open all of the pixels.

Regards,
-Melissa

On Fri, Feb 06, 2015 at 08:05:15PM +0000, Grabmayr, Heinrich wrote:
> Hi,
> 
> I have huge movies (20k to 60k frames) in file formats from various camera suppliers that can all be opened using bioformats. I would like to access the time series of indivindual pixels. At the moment, I do this in matlab by using
> r = bfGetReader
> and then using the loci.formats.ChannelSeparator's function to call
> r.openBytes<http://downloads.openmicroscopy.org/bio-formats/5.0.6/api/loci/formats/ChannelSeparator.html#openBytes%28int,%20int,%20int,%20int,%20int%29>(int no, int x, int y, int w, int h) with w=h=1 and looping through all the planes. This takes ages. I was wondering whether there might be a smarter way to access the data I am interested in?
> 
> Thanks very much
>    Heinrich

> _______________________________________________
> 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