<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Alex,<div><br></div><div> Here's all the entries in the pixelsType table in OMERO:</div><div><br></div><div><div>omero=# select * from pixelsType</div><div>omero-# ;</div><div> id | bitsize | permissions | value | external_id </div><div>----+---------+-------------+----------------+-------------</div><div> 1 | 1 | -35 | bit | </div><div> 2 | 8 | -35 | int8 | </div><div> 5 | 8 | -35 | uint8 | </div><div> 3 | 16 | -35 | int16 | </div><div> 4 | 32 | -35 | int32 | </div><div> 6 | 32 | -35 | uint16 | </div><div> 7 | 32 | -35 | uint32 | </div><div> 8 | 32 | -35 | float | </div><div> 9 | 64 | -35 | double | </div><div> 10 | 64 | -35 | complex | </div><div> 11 | 128 | -35 | double-complex | </div><div>(11 rows)</div><div><br></div><div>Does that help?</div><div>You could also try and view the DB entry for a particular image, to see what the "real" value is</div><div><br></div><div>E.g. using psql:</div><div><br></div><div><div>omero=# select * from pixelsType where id = (select pixelsType from pixels where image = 12753);</div><div> id | bitsize | permissions | value | external_id </div><div>----+---------+-------------+-------+-------------</div><div> 5 | 8 | -35 | uint8 | </div><div>(1 row)</div></div><div><br></div><div> Hope that helps,</div><div><br></div><div> Will.</div><div><br></div><div><br></div><div><br></div><div><div>On 27 Jul 2011, at 10:26, Alexander Tournier wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"> <div bgcolor="#ffffff" text="#000000"> hi Will<br> <br> Great thanks, I can see how that works.<br> <br> second unrelated question:<br> <br> if I do:<br> <i>p = omero.sys.ParametersI();<br> p.add('type',rstring('double')); <br> q=['from PixelsType as p where p.value= :type'];<br> pixelsType = queryService.findByQuery(q,p);</i><br> <br> that gives me a 64bit pixelType<br> <br> if I do:<br> <i>pixels.getPixelsType().getBitSize().getValue()</i><br> from an image I took down from OMERO I get 32 bits<br> <br> Now the images are actually marked as 16bit (2 bytes) in OMERO.insight<br> <br> So question is;<br> - how do I create a 16bit pixelType (uint16)?<br> - any reason for the discrepancy between the 16bit in OMERO.insight and the 32bit I get when querying the database from matlab?<br> <br> <br> Many thanks for taking the time to answer my newbie questions!<br> Best,<br> Alex<br> <br> <br> <br> On 27/07/11 10:22, Will Moore wrote: <blockquote cite="mid:27DD089C-62E9-4CDB-A76F-C020E54E0964@lifesci.dundee.ac.uk" type="cite"> <pre wrap="">Hi Alex,
Here is some Python code that does what you want (also see comments
in the code)
import omero
from omero.rtypes import rstring
project = omero.model.ProjectI()
project.setName(rstring("New Project Name"))
project = updateService.saveAndReturnObject(project)
dataset = omero.model.DatasetI()
dataset.setName(rstring("New Dataset Name"))
dataset = updateService.saveAndReturnObject(dataset)
# link Project to Dataset
link = omero.model.ProjectDatasetLinkI()
link.parent = project # using 'loaded' object
link.child = omero.model.DatasetI(dataset.id.val, False) # using
'unloaded' object (safer)
updateService.saveObject(link)
# link Dataset to Image
link = omero.model.DatasetImageLinkI()
link.parent = omero.model.DatasetI(dataset.id.val, False)
link.child = omero.model.ImageI(image.id.val, False)
updateService.saveObject(link)
On 27 Jul 2011, at 09:56, Alexander Tournier wrote:
</pre> <blockquote type="cite"> <pre wrap="">Hi Will,
thanks for all that,
I've found the API page:
<a class="moz-txt-link-freetext" href="http://trac.openmicroscopy.org.uk/ome/wiki/OmeroApi">http://trac.openmicroscopy.org.uk/ome/wiki/OmeroApi</a>
which seems to answer a lot of my questions,
I have a quick one for you:
I can now see how I can load images back into OMERO, however there
doesn't seem to be any concept of Project or Dataset associated with
it. Could you point me in the right direction.
Thanks,
Best,
Alex
On 26/07/11 21:19, Will Moore wrote:
</pre> <blockquote type="cite"> <pre wrap="">Hi Alex,
So you managed to get up and running?
Documentation is one of the many things we'd like to improve - it's
just finding the time.
At the moment, the priority is to organise the docs we do have so
that
at least you can find what there is.
The docs on Matlab are definitely lacking, but did you at least
manage
to find your way through this trail of links?
<a class="moz-txt-link-freetext" href="http://trac.openmicroscopy.org.uk/ome">http://trac.openmicroscopy.org.uk/ome</a>
<a class="moz-txt-link-freetext" href="http://trac.openmicroscopy.org.uk/ome/wiki/OmeroHome">http://trac.openmicroscopy.org.uk/ome/wiki/OmeroHome</a>
<a class="moz-txt-link-freetext" href="http://trac.openmicroscopy.org.uk/ome/wiki/OmeroMatlab">http://trac.openmicroscopy.org.uk/ome/wiki/OmeroMatlab</a>
maybe <a class="moz-txt-link-freetext" href="http://trac.openmicroscopy.org.uk/ome/wiki/WorkingWithOmero">http://trac.openmicroscopy.org.uk/ome/wiki/WorkingWithOmero</a>
Will.
On 26 Jul 2011, at 18:11, Alexander Tournier wrote:
</pre> <blockquote type="cite"> <pre wrap="">Thanks Will,
it seems the 'gateway' and 'factory' object have a lot of overlap
but I don't know how to create a factory instance.
Could you let me know how to do that!?
Also I'm finding quite hard to find documentation about all this, is
there somewhere I should be looking?
Thanks,
Alex
On 26/07/11 15:33, Will Moore wrote:
</pre> <blockquote type="cite"> <pre wrap="">Hi Alex,
I think this forum discussion should have most of your answers,
including some matlab code that does what you want?
<a class="moz-txt-link-freetext" href="http://www.openmicroscopy.org.uk/community/viewtopic.php?f=6&t=694">http://www.openmicroscopy.org.uk/community/viewtopic.php?f=6&t=694</a>
Will.
On 26 Jul 2011, at 15:18, Alexander Tournier wrote:
</pre> <blockquote type="cite"> <pre wrap="">Hi there,
I'm using matlab to do some image analysis.
I'm able to get the data from the OMERO database to put through
the
analysis from within matlab.
However, I then want the results (images) to be uploaded back into
OMERO.
How can I do this from matlab?
I've checked the OMERO-matlab documentation I could find but
couldn't find anything on this topic.
Thanks,
Alex
NOTICE AND DISCLAIMER
This e-mail (including any attachments) is intended for the above-
named person(s). If you are not the intended recipient, notify the
sender immediately, delete this email from your system and do not
disclose or use for any purpose.
We may monitor all incoming and outgoing emails in line with
current
legislation. We have taken steps to ensure that this email and
attachments are free from any virus, but it remains your
responsibility to ensure that viruses do not adversely affect you.
Cancer Research UK
Registered in England and Wales
Company Registered Number: 4325234.
Registered Charity Number: 1089464 and Scotland SC041666
Registered Office Address: Angel Building, 407 St John Street,
London EC1V 4AD.
_______________________________________________
ome-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ome-users@lists.openmicroscopy.org.uk">ome-users@lists.openmicroscopy.org.uk</a>
<a class="moz-txt-link-freetext" href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users">http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users</a>
</pre> </blockquote> <pre wrap="">William Moore
Wellcome Trust Centre for Gene Regulation& Expression
College of Life Sciences
MSI/WTB/JBC Complex
University of Dundee
Dow Street
Dundee DD1 5EH
United Kingdom
Phone 01382 386364
<a class="moz-txt-link-freetext" href="http://openmicroscopy.org">http://openmicroscopy.org</a>
</pre> </blockquote> <pre wrap="">NOTICE AND DISCLAIMER
This e-mail (including any attachments) is intended for the above-
named person(s). If you are not the intended recipient, notify the
sender immediately, delete this email from your system and do not
disclose or use for any purpose.
We may monitor all incoming and outgoing emails in line with current
legislation. We have taken steps to ensure that this email and
attachments are free from any virus, but it remains your
responsibility to ensure that viruses do not adversely affect you.
Cancer Research UK
Registered in England and Wales
Company Registered Number: 4325234.
Registered Charity Number: 1089464 and Scotland SC041666
Registered Office Address: Angel Building, 407 St John Street,
London EC1V 4AD.
</pre> </blockquote> <pre wrap="">William Moore
Wellcome Trust Centre for Gene Regulation& Expression
College of Life Sciences
MSI/WTB/JBC Complex
University of Dundee
Dow Street
Dundee DD1 5EH
United Kingdom
Phone 01382 386364
<a class="moz-txt-link-freetext" href="http://openmicroscopy.org">http://openmicroscopy.org</a>
</pre> </blockquote> <pre wrap="">
NOTICE AND DISCLAIMER
This e-mail (including any attachments) is intended for the above-
named person(s). If you are not the intended recipient, notify the
sender immediately, delete this email from your system and do not
disclose or use for any purpose.
We may monitor all incoming and outgoing emails in line with current
legislation. We have taken steps to ensure that this email and
attachments are free from any virus, but it remains your
responsibility to ensure that viruses do not adversely affect you.
Cancer Research UK
Registered in England and Wales
Company Registered Number: 4325234.
Registered Charity Number: 1089464 and Scotland SC041666
Registered Office Address: Angel Building, 407 St John Street,
London EC1V 4AD.
</pre> </blockquote> <pre wrap="">William Moore
Wellcome Trust Centre for Gene Regulation & Expression
College of Life Sciences
MSI/WTB/JBC Complex
University of Dundee
Dow Street
Dundee DD1 5EH
United Kingdom
Phone 01382 386364
<a class="moz-txt-link-freetext" href="http://openmicroscopy.org">http://openmicroscopy.org</a>
</pre> </blockquote> <br> <br> NOTICE AND DISCLAIMER<br> This e-mail (including any attachments) is intended for the above-named person(s). If you are not the intended recipient, notify the sender immediately, delete this email from your system and do not disclose or use for any purpose. <br> <br> We may monitor all incoming and outgoing emails in line with current legislation. We have taken steps to ensure that this email and attachments are free from any virus, but it remains your responsibility to ensure that viruses do not adversely affect you. <br> Cancer Research UK<br> Registered in England and Wales<br> Company Registered Number: 4325234.<br> Registered Charity Number: 1089464 and Scotland SC041666<br> Registered Office Address: Angel Building, 407 St John Street, London EC1V 4AD.<br> </div> </blockquote></div><br><div apple-content-edited="true"> <div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>William Moore</div><div><div>Wellcome Trust Centre for Gene Regulation & Expression</div><div>College of Life Sciences</div><div>MSI/WTB/JBC Complex</div><div>University of Dundee</div><div>Dow Street</div><div>Dundee DD1 5EH</div><div>United Kingdom</div><div><br></div><div>Phone 01382 386364</div></div><div><a href="http://openmicroscopy.org">http://openmicroscopy.org</a></div></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"> </div><br></div></body></html>