User Tools

Site Tools


working_with_annotations

This is an old revision of the document!


Working with annotations

Annotation types

PMA.core supports two main types of annotations PMA.core annotations and 3rd party annotations but also some native annotations for the 3dHistech MRXS and Hamamatsu NDPI formats.

PMA.core annotations uses it's own internal format based on WKT(Well-known text) and it supports the following shapes Polygon, Linestring, Point and Multipoint. You can also change the color, fill color and line thickness for these annotations. PMA.core also supports the some associated information for every annotation like the classification and free text notes.

3rd party annotations supported are from the vendors Visiopharm, Indica Labs and Aperio. Each of this format is supported via parsing the respective vendor specific file, for Visiopharm that is .mld, for Indica Labs is .annotations and for Aperio is .xml

Creating and saving

PMA.core annotations

For reading the PMA.core annotations for a slide you can use the API call GetAnnotations, that returns all PMA.core annotation in json format.

All other PMA.core annotations functionality is provided via the SaveAnnotations API call. This call can create new, update and delete many annotations in one API call. PMA.core also provided the functionality to get the length and/or the surface area for already saved annotations via the GetAnnotationDistance and GetAnnotationSurfaceArea API calls.

3rd Party annotations

PMA.core can leverage the use of 3rd party annotations via the External Files interface and the appropriate API calls. This calls associates a number of files containing any known 3rd party annotations with a slide (for known formats and extensions see the previous paragraph). To associate external files with a slide you have to use the API call 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 GetExternalAnnotationFiles API call, which returns the array of Name/PathItalic Text tuples for each file associated with any slide

Exporting and format conversion

PMA.core provides a very powerful API to export and convert all known annotations formats to each other, either it is a PMA.core annotations, 3rd party annotation or native annotations. The API call ExportAnnotations can convert any known source of annotations, PMA.core annotations, Native annotations , Visiopharm , IndicaLabs , Aperio, to each of the 3rd party formats, Visiopharm IndicaLabs Aperio, but also two more usefull formats for use outside of PMA.core i.e. the CSV and WKT(Well-Known text) formats. PMA.core will try to convert each format as flawlessly as possible but some shapes in each format are compatible to each other. If the source and destination formats are the same PMA.core will not perform any conversion and will output the original file.

working_with_annotations.1646743010.txt.gz · Last modified: 2022/03/08 15:36 by antreas