User Tools

Site Tools


pmann

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
pmann [2022/03/25 11:36]
yves created
pmann [2023/01/16 17:22] (current)
angelos [The Pathomation ANNotation interface]
Line 1: Line 1:
 ===== The Pathomation ANNotation interface ===== ===== The Pathomation ANNotation interface =====
  
-PMANN is a part of the [[https://​docs.pathomation.com/​pma.core/​doku.php?​id=interfacing_the_server_from_3rd_party_software|Pathomation back-end API]] that makes it easy to handle heterogeneous (external) [[working_with_annotations|annotations]].+PMANN is a part of the [[interfacing_the_server_from_3rd_party_software|Pathomation back-end API]] that makes it easy to handle heterogeneous (external) [[working_with_annotations|annotations]]. 
 + 
 +PMA.core can leverage the use of PMANN via the External Files interface and the associated API calls.  
 +These API calls associate a number of files containing any known 3rd party annotations with a slide. PMA.core supports 3rd party annotations from the following vendors Visiopharm, Indica Labs and Aperio. Each of these formats are supported via parsing the respective vendor specific file: 
 +  * Visiopharm .mld 
 +  * Indica Labs .annotations 
 +  * Aperio .xml 
 +  * Images (TIFF, PNG or even other whole slide images) 
 + 
 +To associate external files with a slide you have to use the API call [[https://​docs.pathomation.com/​pma.core.api/#/​Api/​Slide_SetExternalAnnotationFiles|SetExternalAnnotationFiles]]. This takes an array of tuples containing the //Name// and //Path// for each associated 3rd party annotations file. For //Name// you can use any text to differentiate from other annotations an the //Path// needs to be a //virtual path// to the file containing the annotations.  
 +You can get the previously set external annotations files for a slide via the [[https://​docs.pathomation.com/​pma.core.api/#/​Api/​Slide_GetExternalAnnotationFiles|GetExternalAnnotationFiles]] API call, which returns the array of //​Name/​Path//​ tuples for each file associated with any slide 
 + 
 +**Notes for image overlays:​** 
 + 
 +  * Image overlays should have transparency otherwise they will completely hide the whole slide image. Image formats that support alpha channel are PNG and certain TIFF configurations. 
 +  * When using an image as an annotation layer, PMA.core assumes that the aspect ratio of the overlay and the whole slide image are exactly the same. 
 + 
 +==== Example ==== 
 + 
 +Lets suppose we have a slide called //​Slide.mrxs//​ that we want to attach 2 separate annotation files from 3rd party sources, and the two files are in the virtual directory called //​Slides//​ 
 +  * Slide1.mld 
 +  * Slide1.xml 
 + 
 +The first file contains some cell counting information and the second file contains some regions of interest so we want to name them based on that to distinguish more easily, and keep in mind that the name of a external file is presented to the user on all viewer products of the Pathomation platform. ​  
 + 
 +So we call the [[https://​docs.pathomation.com/​pma.core.api/#/​Api/​Slide_SetExternalAnnotationFiles|SetExternalAnnotationFiles]] API with query string parameters 
 +    ''?​pathOrUid=Slides/​Slide1.mrxs&​sessionId={sessionId}''​ 
 +and with the following json data on the body 
 +    [ 
 +      { 
 +        "​Name":​ "Cell counting",​ 
 +        "​Path":​ "​Slides/​Slide1.mld"​ 
 +      }, 
 +      { 
 +        "​Name":​ "​Regions of interest",​ 
 +        "​Path":​ "​Slides/​Slide1.xmls"​ 
 +      } 
 +    ] 
 + 
 +To test that everything worked we can use the [[https://​docs.pathomation.com/​pma.core.api/#/​Api/​Slide_GetExternalAnnotationFiles|GetExternalAnnotationFiles]] that should return the same json as a result. 
 + 
 +We can now see the external annotation using any Pathomation Platform viewer like PMA.studio. We can also adjust the visibility and opacity for each layer independently 
 +{{ ::​pma.core_externaljpg.jpg?​600 |}}
  
  
pmann.1648197379.txt.gz · Last modified: 2022/03/25 11:36 by yves