Page 1 of 1

duplicate an image on omero

PostPosted: Tue Nov 27, 2018 12:27 pm
by sameh
Hello everyone

On omero, is it possible to duplicate an image to avoid importing it twice.

We often need to share the same image for two different projects, in different groups so we often need to copy / duplicate the image.

thank you so much

Re: duplicate an image on omero

PostPosted: Tue Nov 27, 2018 1:04 pm
by jmoore
Hi Sameh,

are you looking to let the users duplicate an image from the client-side or is this something you are taking care of? In the latter case, in-place import would let you have the same files imported twice without duplicating storage.

~Josh

Re: duplicate an image on omero

PostPosted: Tue Nov 27, 2018 2:19 pm
by sameh
jmoore wrote:Hi Sameh,

are you looking to let the users duplicate an image from the client-side or is this something you are taking care of? In the latter case, in-place import would let you have the same files imported twice without duplicating storage.

~Josh


thank you for your help,

we are looking to let the users duplicate an image from the client-side.

Re: duplicate an image on omero

PostPosted: Tue Nov 27, 2018 2:29 pm
by jmoore
There's no button in the clients that the user can click on at the moment. I would assume that the quickest route to doing so would be to write an OMERO script. Roughly:

  • User navigates to an image
  • User goes to script mention and clicks on "Duplicate"
  • In the script, load the clicked image
  • Find the path to the files in /OMERO/ManagedRepository
  • Run `bin/omero import --transfer=ln_s ...` with that path
  • Output the new image ID to the user

This would be a great addition to https://github.com/ome/scripts/tree/develop/omero/import_scripts

~Josh