<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 6.00.6000.17095" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV>Hello,</DIV>
<DIV> </DIV>
<DIV>Is there a way to access image channel data using Matlab? When attempting this, the following error is reported:</DIV>
<DIV> </DIV>
<DIV>Error using omero.model.PixelsI/getChannel<BR>Java exception occurred:<BR>omero.UnloadedCollectionException: Error updating collection:channelsSeq<BR>Collection is currently null. This can be seen<BR>by testing "channelsSeqLoaded". This implies<BR>that this collection was unloaded. Please refresh this object<BR>in order to update this collection.<BR></DIV>
<DIV> </DIV>
<DIV>Here's the code:</DIV>
<DIV> </DIV>
<DIV>client = loadOmero(url); </DIV>
<DIV> </DIV>
<DIV>session = client.createSession(user, password);<BR>gateway = session.createGateway();<BR>timer = omeroKeepAlive(client); % Creates and starts a 60 second timer.<BR>userId = session.getAdminService().getEventContext().userId;</DIV>
<DIV> </DIV>
<DIV>ContainerProxy = session.getContainerService();</DIV>
<DIV> </DIV>
<DIV>params = omero.sys.ParametersI();<BR>params.leaves();%indicate to load the images<BR>params.exp(omero.rtypes.rlong(userId));</DIV>
<DIV> </DIV>
<DIV>projectsList = ContainerProxy.loadContainerHierarchy(char('omero.model.Project'), [], params);<BR>p = projectsList.get(0);</DIV>
<DIV> </DIV>
<DIV>datasetsList = p.linkedDatasetList;<BR>d = datasetsList.get(0);</DIV>
<DIV> </DIV>
<DIV>imageList = d.linkedImageList;<BR>image = imageList.get(0);</DIV>
<DIV> </DIV>
<DIV>pixelsList = image.copyPixels();<BR>pixels = pixelsList.get(0);</DIV>
<DIV> </DIV>
<DIV>pixels.getChannel(0);<BR></DIV>
<DIV> </DIV>
<DIV>Thanks!</DIV>
<DIV>Dan</DIV><font face="Verdana,Arial,Helvetica,Trebuchet MS" size="1">
<br />--
<br />This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
<br />The full disclaimer details can be found at <a href="http://www.csir.co.za/disclaimer.html">http://www.csir.co.za/disclaimer.html</a>.
<p>
<br />This message has been scanned for viruses and dangerous content by <a href="http://www.mailscanner.info/"><b>MailScanner</b></a>,
<br />and is believed to be clean.
</font>
</BODY></HTML>