Open joshmoore opened 6 years ago
If we were going for a v2 of this toolbox using the gateway
, an alternative would be to namespace the OMERO.matlab methods e.g. omero.matlab.getPlaneInfo(gateway,...)
and maintain the previous signatures in the legacy functions. This would have the advantage of reducing conflicts with other packages containing the same method/function names - see https://www.openmicroscopy.org/community/viewtopic.php?t=8593&p=20035#p20035 for an example.
Regardless of the introduction of gateway
, I can definitely see the benefit of namespacing (perhaps including a version number).
Hello,
I'm trying to extend writeMapAnnotation.m
ma = writeMapAnnotation(session, keys, values, varargin)
to accept gateway
as well instead of session
:
ma = writeMapAnnotation(gateway, keys, values, varargin)
I then realized that later in the function, when I need SecurityContext
as in
ctx = omero.gateway.SecurityContext(user.getGroupId());
,
I actually need user
to be passed to the function alongside with gateway
.
What syntax should we use then?
ma = writeMapAnnotation({gateway, user}, keys, values, varargin)
ma = writeMapAnnotation(gateway, keys, values, user, varargin)
ma = writeMapAnnotation(gateway, user, keys, values, varargin)
In the example below, I used the syntax of ma = writeMapAnnotation(gateway, keys, values, 'group', groupid)
. Can we use a default value for groupid
?
I've posted essentially the same topic to a forum below: http://www.openmicroscopy.org/community/viewtopic.php?f=6&t=8669&p=20496#p20496
cf. loadOmeroGateway works with a Bio-Formats MATLAB toolbox. Someone in the OME commented that this dependency is too much, so I haven't made a Pull Request yet.
Either as a breaking change or via:
all toolbox functions should be able to make use of the higher-level omero.gateway functionality.
cF. https://github.com/openmicroscopy/openmicroscopy/tree/develop/components/blitz/src/omero/gateway