[ome-devel] Write (append) access to images after initial creation
Christian Carsten Sachs
c.sachs at fz-juelich.de
Thu Nov 6 16:12:19 GMT 2014
Hello,
I am working on a custom image acquisition setup using Micro Manager for
microscope control, and one aim is to directly deposit the images into
OMERO, while the experiment runs.
As time lapse sequences are being acquired, it would be necessary to
dynamically append planes to existing images.
I tried the obvious way, first creating an image normally; then loading
the associated pixels object, changing the sizeT parameter, saving it;
then trying to push pixels to the 'newly created' plane, but it fails
with an ome.conditions.ApiUsageException [message = "Write-method not
permitted."].
Checking the OMERO source shows me that the RomioPixelBuffer created has
an internal writable-flag, which is set to false on re-creation from
on-disk data. The appropriate location would be line 587 in
PixelsService.java [
https://github.com/openmicroscopy/openmicroscopy/blob/3667342755fc8a42585ee6004ee55706772b5ea1/components/romio/src/ome/io/nio/PixelsService.java#L587
].
Changing the last false to true solves my problem, and I can add
additional planes - with as far as I can tell, no ill effects. [ I am
aware that changing other dimensions (C/Z) after creation would mangle
the file due to the on disk format ...]
Therefore I'd like to ask:
What would be the best way to integrate this feature? I guess that the
described use case is not totally off, and others might be interested in
a supported way of doing this as well.
I just started digging into the OMERO source, so I'm a bit wary in just
submitting PRs with my limited knowledge:
Would it be safe for - as of the time being - use OMERO with the
aforementioned false changed to true?
Are there any implications why it was set to false? I assume to protect
integrity of deposited data. Is user access control properly checked at
this point, or would I circumvent this by changing it to false?
If there is any 'easy' way to do this, and a developer would be able to
do it quickly, I'd love to see this implemented.
If it is more work, and you're generally interested in this feature,
I'll prepare a patch. I'm thinking about adding either another parameter
to setPixelsId or another function like setPixelsIdWritable to request a
writable PixelBuffer, if changing it on a global level [like discussed
above] would be undesirable ...
I'd be happy to hear your feedback.
Thanks, regards,
Christian Sachs
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
More information about the ome-devel
mailing list