End of life DIH software from Slidepath (Leica) recovery to Omero

I have an archive of 6000 slides that were curated, with circa 400 that have been annotated by a group of retired colleagues. This archive is in a Digital Image Hub from Slidepath (Leica). They decided to discontinue their software (which runs using Flash). My task is to transfer this huge database to OMERO. Slides are in the .ndpi (Hamamatsu) and scn(Leica) formats and I am confident they will be transferred. However, I also need to transfer the annotations, and respective ROIs.
My question is if there is anyone that has done this before and can provide me some mapping information. How does OMERO organises the data for ROIs? I am aware of the manual task ahead but any help would be appreciated. If anyone has the same problem regarding recovering data and transferring to OMERO I would also like to learn to share information.
Joao Miguel

1 Like

Hi @Joao_Miguel. This sounds like it could be a longer discussion, so I’m going to start out with some smaller questions:

I’m not sure I follow. Is it how to import the ROIs with the images together? If you don’t have OME-TIFFs then this won’t work. A Python script can add ROIs after the fact. (We have several examples.)

What other annotations do you have? Text per image?


Thank you for the interest Josh, really appreciated.

  1. OMERO organisation of the data: I didn’t expect to have an easy ride. What I meant is how annotated ROIs (arrows, boxes, etc) are entered onto the database (x,y,z references, rotation, size, etc). I will then use this information to map from Slidepath database (which is mysql) onto OMERO. This will be by far the most complex migration but I intend to make as easy and automated as possible by planning the transfer.
  2. Transfer the annotation: Yes, you are correct, it was confusing. I am talking about metadata such as text (mostly) and searching keywords. I have also documents (.doc, pdf and jpeg images) related to the archived slides but I could have fields to link to them.

@Joao_Miguel: would example Python scripts be a good place to start (preferred), or are you more envisaging inserting directly into the DB (few caveats that can likely be worked around)? ~J

I am not a programmer so Python would be a steep learning curve. I have worked with sql databases before and I am hoping changes are over field names as well as minor variations on the references for location of ROIs (example, upper left of a rectangle to upper right with correction of the x,y tags)… Either way I will need to compare how these databases store their content.

@Joao_Miguel: understood. This isn’t something we’ve done before, so this might end up being … interesting. If you’ve got a running OMERO that you can experiment with, I’d such running:

bin/omero login

followed by:

touch a.fake
IMAGE_ID=$(bin/omero import a.fake)

This will create a row in the image table and return the primary key (id) on stdout. It’s often this key that you want to attach your other annotations. For example, to attach a file:

date >> foo.txt
FILE_ID=$(bin/omero upload foo.txt)
ANN_ID=$(bin/omero obj new FileAnnotation file=$FILE_ID)
bin/omero obj new ImageAnnotationLink parent=$IMAGE_ID child=$ANN_ID

(Note: there are helpers to do this in Python, or you can do the same in the GUI)

At this point, you’ve created entires in the tables:

  • image
  • imageannotationlink
  • annotation
  • originalfile

which you can investigate.

ROIs are attached to a sub-object of image: pixels:

shape.roi --> roi.id
roi.pixels --> pixels.id
pixels.image --> image.id

I’m going to bet, though, that now that you have an image in your OMERO, the easiest next step will be to open up the image in the viewer, and draw a few of the ROIs that you know you’re going to need.

Hope that gets you started.

I will work on that next week, thanks Josh. On a slight different note, do you have any idea on how I simplify images in OMERO? Scn files from Leica have an overview and the proper high resolution and they are linked when imported. I have no interest on the overview for storage as the slide data will be on the metadata. Also, should I do any conversion onto an OMERO type of file (I have seen loads of comments on OMERO.tiff)? I just don’t want to start importing metadata and discover later than I need to do further conversions

Ah, good idea. It’s not necessary to convert the files, but if there’s no need to keep the original proprietary format, converting them into pyramidal OME-TIFFs is certainly an option. You could then additionally add a number of annotations directly to the XML. (File annotations would still need to be handled after the fact.) ~J

At Glencoe Software we have been asked a couple times to assist with migrating from Slidepath to OMERO. This has included migrating annotations from the Slidepath relational database.

Unfortunately we don’t have a great sample size for developing any sort of open source tooling for this nor is the schema publicly available. The structure of the annotations themselves, as I’m sure they are for you, are also often very proprietary and thus cannot be shared.

Do get in touch if you want to discuss, @Joao_Miguel. We can do so here publicly or you can contact us privately:

Dear Chris-allan,
Sorry about the delay but I have been quite busy with my teaching. I would be more than happy to support the creation of an open source tooling. As you may be aware, the sql database from Slidepath DIH can be easily copied from the server. I am quite happy to share the data and help with the process. It is actually our intention to , when our archive of images is transferred, make all the content and annotations freely available to other institution (with the appropriate acknowledging of the source). I contacted Glencoe Software using your link. All the best
Joao Miguel