An open API service indexing awesome lists of open source software.

https://github.com/digitalslidearchive/annotation-tracker

A Girder plugin for annotation tracking in HistomicsUI
https://github.com/digitalslidearchive/annotation-tracker

Last synced: about 1 year ago
JSON representation

A Girder plugin for annotation tracking in HistomicsUI

Awesome Lists containing this project

README

          

annotation-tracker
==================

A Girder plugin for annotation activity tracking in HistomicsTK

Build Instructions
------------------

1. Prepare and activate a virtual environment:
``virtualenv --python python3 venv && source ./venv/bin/activate``.
2. Install the package in editable mode: ``pip install -e .``.
3. Build the client: ``girder build``.
4. Launch a Mongo server: ``mongod``.
5. Run the client: ``girder serve``.
6. Visit http://localhost:8080.

Demo JSON
---------

1. ``examples/experiment.json`` contains a demo JSON file
2. Add the JSON data onto the metadata for a Folder with the key value
of ``experiments``

Logging
-------

User actions and events are logged. They are accessible via the
``GET /annotation_tracker`` endpoint. A user is assigned an arbitrary
session ID when they first open HistomicsUI and a new ID whenever they
start a session via the user interface.

Image change, session, and tab action activities
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

On all WSI image position changes (zoom, pan, window size change,
rotate), an event is logged with a ``pan`` activity. Additionally, when
sessions are started or ended a ``startSession`` or ``stopSession``
activity is logged. When the browser tab gains or loses focus, the
``focus`` or ``blur`` activity is logged. When the browser window is
hidden or becomes visible, a ``visibilityState`` activity is logged.

::

{
session: ,
sequenceId: ,
epochms: ,
activity: ,
currentImage: ,
userId: ,
hasFocus: ,
visibilityState: ,
visableArea: { // this is the part of the image visible in the window in WSI coordinates
tl: { x: , y: },
tr: { x: , y: },
bl: { x: , y: },
br: { x: , y: }
},
imagePosition: {
width: ,
height: ,
top: ,
left:
},
rotation: ,
zoom: ,
panels: [ // a list of panels that cover part of the image view
{
title: ,
width: ,
height: ,
top: ,
left: ,
coveredArea: { // this is the area of the image covered by the panel in WSI coordinates
tl: { x: , y: },
tr: { x: , y: },
bl: { x: , y: },
br: { x: , y: }
}
},
... // more panels
]
}

General browser activities
~~~~~~~~~~~~~~~~~~~~~~~~~~

Activities are logged on every ``mousemove``, ``mousedown``,
``mouseup``, ``keydown``, ``keyup``, ``click``. These are only logged
**if** a session is started.

::

{
session: ,
sequenceId: ,
epochms: ,
activity: ,
target: ,
mouse: {
x: ,
y:
}
}

Events can also log ``altKey``, ``ctrlKey``, ``metaKey``, ``shiftKey``,
``button``, ``buttons``, ``char``, ``charCode``, ``key``, ``keyCode``,
``which`` values from the native web event.

Task activities
~~~~~~~~~~~~~~~

Tasks generate ``task`` activity logs. This includes:

::

{
session: ,
sequenceId: ,
epochms: ,
activity: 'task',
taskAction:
experiment: ,
running: ,
task: { // data from the current task including any user input
name: ,
description: ,
userInput: [
...
],
}
}

Annotation activities
~~~~~~~~~~~~~~~~~~~~~

When annotations are edited or deleted, the ``annotation`` activity is
logged. This includes:

::

{
session: ,
sequenceId: ,
epochms: ,
activity: 'annotation',
annotationAction:
annotation: ,
annotationVersion:
}