We're Hiring!

Ordering and OMERO

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

Re: Ordering and OMERO

Postby jburel » Tue Dec 21, 2010 11:57 am

Hi BK,
Apologies for not answering your post earlier, I was off last week.
bhcho wrote:Currently, I'm not sure if we can generate a temporary dataset with only image file IDs, instead of duplicating images themselves (Could you tell me if it's possible with current OMERO version 4.2.1?).

You can create a tmp dataset (e.g. result1) and link the images to it.
You can then browse the tmp dataset.
You may not want to the actual rating, but use a double annotation with a specific namespace.
If the user does not want to keep the image, he/she can right click and select cut.
The link between the dataset and the image will be deleted.
Then the user can easily renamed the tmp dataset e.g. result1 -> good images.
You won't need to create another dataset.

From what I understand the "rating" annotation will be linked to the images.
You will probably need to have an annotation directly linked to the dataset and filter that way
The renaming, deleting links will work the same way

Jmarie
User avatar
jburel
Team Member
 
Posts: 348
Joined: Thu May 21, 2009 6:38 pm
Location: dundee

Re: Ordering and OMERO

Postby bhcho » Tue Dec 21, 2010 12:33 pm

HI Jmarie,

Thanks for the reply.

But we are still not able to display those images by the order of the "rating" from the 4.2.1 version. Right?

Anyway, could you show me the snippet that creates another dataset with existing image IDs? (python is preferred) and I also need the code that makes a double annotation to each image.

Thanks,
BK
bhcho
 
Posts: 236
Joined: Mon Apr 05, 2010 2:15 pm

Re: Ordering and OMERO

Postby jburel » Tue Dec 21, 2010 12:53 pm

Hi BK
That's correct
in 4.2.x, we only order images by name or date.

Jmarie
User avatar
jburel
Team Member
 
Posts: 348
Joined: Thu May 21, 2009 6:38 pm
Location: dundee

Re: Ordering and OMERO

Postby jburel » Fri Dec 24, 2010 8:15 am

Hi BK
To link the existing image to the new dataset:
follow some pseudo code
Code: Select all
#new dataset
dataset = omero.model.DatasetI();
dataset.setName(omero.rtypes.rstring("results"));

#The image was retrieved using another call.
# use unloaded object to avoid update conflicts
image = image.__class__(image.id.val, False)     
l = omero.model.DatasetImageLinkI();
l.setParent(dataset);
l.setChild(image);
# update
updateService.saveAndReturnObject(l);


To link the annotation to the image
Code: Select all
annotation = omero.model.DoubleAnnotationI();
annotation.setDoubleValue(omero.rtypes.rdouble(0.5));
#link the annotation and the image
# use unloaded object to avoid update conflicts
image = image.__class__(image.id.val, False)     
l = omero.model.ImageAnnotationLinkI();
l.setParent(image);
l.setChild(annotation);
# update
updateService.saveAndReturnObject(l);
User avatar
jburel
Team Member
 
Posts: 348
Joined: Thu May 21, 2009 6:38 pm
Location: dundee

Previous

Return to Developer Discussion

Who is online

Users browsing this forum: Google [Bot] and 0 guests