We're Hiring!

Reading from / Writing to data planes in OME storages

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

Reading from / Writing to data planes in OME storages

Postby yuriy_alexandrov » Wed May 28, 2014 2:32 pm

Dear All,

As we further work with OPT data, several questions were raised on the possibility to access Image data cube in arbitrary fashion.

That concerns both reading and writing, but one can limit the question by considering examples of getting (reading) the pixel data from either disk OME-tiff file or from Omero.

in Bioformats, the access procedure used by the OME-tiff reader, is "openBytes"

public byte[] openBytes(int no,
byte[] buf,
int x,
int y,
int w,
int h)
...
Parameters:
no - the image index within the file.
buf - a pre-allocated buffer.
x - X coordinate of the upper-left corner of the sub-image
y - Y coordinate of the upper-left corner of the sub-image
w - width of the sub-image
h - height of the sub-image

In Omero, the analogous procedure is "getPlane"

classmethod getPlane(z, c, t)
Parameters:
z (int) – offset across the Z-axis of the pixel store.
c (int) – offset across the C-axis of the pixel store.
t (int) – offset across the T-axis of the pixel store.

Our main interest is the possibility to read/write the data planes that aren't XY-planes. For example, for the raw OPT data storage with theta-angle set along Z axis, the efficient access to ZX-planes (as efficient as XY-plane reading) will allow constructing Sinograms without loading the whole data-cube into processing computer's memory; the data are large, so otherwise one can hit RAM limit.

As it looks like there are no such tools at the moment, the question is if it is possible and how long would it take to develop them?

Best wishes,
Y.
...
yuriy_alexandrov
 
Posts: 126
Joined: Thu Oct 25, 2012 2:06 pm

Re: Reading from / Writing to data planes in OME storages

Postby yuriy_alexandrov » Wed May 28, 2014 3:16 pm

... as I investigate it further, the Omero "getHypercube" method looks promising
classmethod getHypercube(offset, size, step)
Parameters:
offset (omero.sys.IntList) –
size (omero.sys.IntList) – of each dimension (dependent on dimension).
step (omero.sys.IntList) – needed of each dimension (dependent on dimension).
start – offset for each dimension within pixel store.
Return type:
Ice.ByteSeq
Returns:
buffer containing the data.
Retrieves a n-dimensional block from this pixel store.

does it really solve the problem?
(although there is no "setHypercube" unfortunately..)

..still can't find analogous tool for disk OME-tiffs.

Y.
...
yuriy_alexandrov
 
Posts: 126
Joined: Thu Oct 25, 2012 2:06 pm

Re: Reading from / Writing to data planes in OME storages

Postby jburel » Fri May 30, 2014 1:38 pm

Discussed today. A presentation is scheduled on 17/06, the presentation will be soon available under http://downloads.openmicroscopy.org/presentations/

Jmarie
User avatar
jburel
Team Member
 
Posts: 348
Joined: Thu May 21, 2009 6:38 pm
Location: dundee


Return to Developer Discussion

Who is online

Users browsing this forum: No registered users and 1 guest