[ome-devel] CLI import, exception when trying to add annotation link
Niko Ehrenfeuchter
nikolaus.ehrenfeuchter at unibas.ch
Mon Jun 8 13:59:25 BST 2015
Hi Sebastien,
I had a chance to look at the suggested code now, but parsing out the
image ID from the logfile seems to be a pretty large overhead to me,
especially as all the infrastructure needs to be in place (writing
temporary logfiles at a proper location, parsing them in a robust way,
etc.).
This is certainly reasonable from within a shell script, but my use case
is from within a Python script - I basically only gave the CLI commands
as a simple way to reproduce my problem (for importing images via Python
I have to use the CLI class anyway).
Personally, I'd love to see the ID of an imported image being returned
by the cli.invoke() call for example. Does that sound reasonable to you?
Until then, I'll still have a closer look if I can use your
parsing-suggestion in our scenario.
Thanks a lot!
~Niko
On 04.06.2015 23:02, Sebastien Besson (Staff) wrote:
> Hi Niko,
>
> looking at the source code, are you linking the image to a comment
> annotation or a different
> type of annotation?
> At the moment, the `—annotation_link` option in the importer code can
> only handle comment
> annotations (and we may have suggested the opposite during the meeting,
> apologies if that
> was the case) - see
> https://github.com/openmicroscopy/openmicroscopy/blob/v5.1.2/components/blitz/src/ome/formats/importer/cli/CommandLineImporter.java#L843
>
> If you want to create a link to a different type of annotation, your
> best current solution using the
> current state might be to do the following post-import:
> 1- parse the output of bin/omero import to retrieve the image id - see
> for instance
> https://github.com/sbesson/openmicroscopy/blob/v5.1.2/examples/Training/training_setup.sh#L52
> 2- call bin/omero obj in a separate command to link the image to the
> know annotation e.g.
> $ bin/omero obj new ImageAnnotationLink parent=Image:iid
> child=FileAnnotation:fid
>
> Best,
> Sebastien
>
>> On 4 Jun 2015, at 21:40, Niko Ehrenfeuchter
>> <nikolaus.ehrenfeuchter at unibas.ch
>> <mailto:nikolaus.ehrenfeuchter at unibas.ch>> wrote:
>>
>>
>>
>>
>>>>
>>>> Am I doing something wrong?
>>>
>>> A quick guess from the road: is the annotation in another group?
>>
>> I don't think so, as another image in this dataset has the very same
>> annotation - set via the webclient. At least if I remember correctly.
>>
>> I'll double check tomorrow, iirc the webclient shows all those
>> properties when hovering with the mouse over an annotation, right?
>>
>> Cheers
>> Niko
>> _______________________________________________
>> 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
>
>
> _______________________________________________
> ome-devel mailing list
> ome-devel at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
>
--
Niko Ehrenfeuchter | Image Analysis Specialist | Biozentrum, University
of Basel | Klingelbergstr. 50/70 | CH-4056 Basel
Phone: +41 (61) 26 72673 | nikolaus.ehrenfeuchter at unibas.ch |
www.biozentrum.unibas.ch | www.microscopynetwork.unibas.ch
More information about the ome-devel
mailing list