[ome-users] matlab accessing shared data

Jean-Marie Burel j.burel at dundee.ac.uk
Mon Jan 16 09:24:23 GMT 2012


Hi Alex

You will find examples on how to retrieve data on
https://trac.openmicroscopy.org.uk/ome/wiki/OmeroMatlab

For example to retrieve Project/Dataset owned by another member of a
collaborative group.

proxy = session.getContainerService();
%Set the options
param = omero.sys.ParametersI();
param.leaves();%indicate to load the images
%param.noLeaves(); %no images loaded, this is the default value.

%%% INDICATES the id of the user.
userId = session.getAdminService().getEventContext().userId; %id of the
user.
param.exp(omero.rtypes.rlong(userId));
projectsList = proxy.loadContainerHierarchy(omero.model.Project.class, [],
param);
for j = 0:projectsList.size()-1,
    p = projectsList.get(j);
    datasetsList = p.linkedDatasetList;
    for i = 0:datasetsList.size()-1,
        d = datasetsList.get(i);
        % Do something with the dataset
        dName = d.getName().getValue();
        % If the flag is set to true, you can access the images within the
dataset
        % imageList = d.linkedImageList;
        % for k = 0:imageList.size()-1,
           % image = imageList.get(k);
        % end
    end
end



Regards

Jmarie


The University of Dundee is a registered Scottish Charity, No: SC015096




More information about the ome-users mailing list