[ome-users] matlab accessing shared data
Josh Moore
josh at glencoesoftware.com
Mon Jan 16 08:28:53 GMT 2012
On Jan 13, 2012, at 3:17 PM, Alexander Tournier wrote:
> Hi there,
Hi Alexander,
> I'm using matlab to access/analyse and store processed images.
> I can now access my own data but can't access the data shared in the same (which I can access in OMERO.insight).
>
> - is there a way to specify in matlab which group one wants to access (currently have to go into OMERO.Insight and change it there, this seems to carry across to what matlab can see)
There are several options.
* In your ice.config file you can set omero.group to the group id that you want to be logged into.
* You can pass omero.group in to loadOmero:
>> p = java.util.Properties();
>> p.setProperty('omero.group','your-group');
>> p.setProperty('omero.host','localhost');
>> p.setProperty('omero.user','root');
>> p.setProperty('omero.pass','SECRET');
>> [c,s] = loadOmero(p);
>> s.getAdminService().getEventContext().groupName
ans =
default
* You can call session.setSecurityContext after logging in:
>> import omero.model.ExperimenterGroupI
>> s.setSecurityContext(omero.model.ExperimenterGroupI(0, false));
>> s.getAdminService().getEventContext().groupName
ans =
system
* Or you can use s.getAdminService().setDefaultGroup(experimenterObj, groupObj);
which will change persistently which group you log-in as if no "omero.group" value is passed, just as if you had made the change in, say, WebAdmin. However, that shouldn't be done overly frequently, so it's probably best done in one of the UIs.
> - how can I access from within matlab data from collaborators (shared data) in the same group as myself.
Once you are logged into a group that is collaborative, service methods will begin returning shared data as well as your own, unless the JavaDocs specifically state that it's a method which returns only your own data.
> Many thanks,
> Alex
Cheers,
~Josh.
More information about the ome-users
mailing list