[ome-devel] Channel data from Matlab

Jean-Marie Burel j.burel at dundee.ac.uk
Fri Feb 3 17:43:19 GMT 2012


Hi Dan

First thing, we are going to remove the method
session.createGateway().
Please have a look at https://trac.openmicroscopy.org.uk/ome/wiki/OmeroMatlab to see how to load images, read data etc.

To load the channel information
You will have to do the following (pseudo –code) I will that example to the page.
svc = session.getPixelsService() /
Pixels pixels = svc.retrievePixDescription(pixelsID)
Pixels.copyChannels() will return  the channels loaded.

Jmarie



From: Dan Withey <DWithey at csir.co.za<mailto:DWithey at csir.co.za>>
Date: Fri, 3 Feb 2012 18:43:20 +0200
To: <ome-devel at lists.openmicroscopy.org.uk<mailto:ome-devel at lists.openmicroscopy.org.uk>>
Subject: [ome-devel] Channel data from Matlab

Hello,

Is there a way to access image channel data using Matlab? When attempting this, the following error is reported:

Error using omero.model.PixelsI/getChannel
Java exception occurred:
omero.UnloadedCollectionException: Error updating collection:channelsSeq
Collection is currently null. This can be seen
by testing "channelsSeqLoaded". This implies
that this collection was unloaded. Please refresh this object
in order to update this collection.

Here's the code:

client = loadOmero(url);

session = client.createSession(user, password);
gateway = session.createGateway();
timer = omeroKeepAlive(client); % Creates and starts a 60 second timer.
userId = session.getAdminService().getEventContext().userId;

ContainerProxy = session.getContainerService();

params = omero.sys.ParametersI();
params.leaves();%indicate to load the images
params.exp(omero.rtypes.rlong(userId));

projectsList = ContainerProxy.loadContainerHierarchy(char('omero.model.Project'), [], params);
p = projectsList.get(0);

datasetsList = p.linkedDatasetList;
d = datasetsList.get(0);

imageList = d.linkedImageList;
image = imageList.get(0);

pixelsList = image.copyPixels();
pixels = pixelsList.get(0);

pixels.getChannel(0);

Thanks!
Dan

--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner<http://www.mailscanner.info/>,
and is believed to be clean.

_______________________________________________ ome-devel mailing list ome-devel at lists.openmicroscopy.org.uk<mailto:ome-devel at lists.openmicroscopy.org.uk> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
The University of Dundee is a registered Scottish Charity, No: SC015096
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20120203/d225650a/attachment.html>


More information about the ome-devel mailing list