{"id":18736696,"url":"https://github.com/digitalslidearchive/annotation-tracker","last_synced_at":"2025-04-10T11:41:45.219Z","repository":{"id":45293810,"uuid":"297776758","full_name":"DigitalSlideArchive/annotation-tracker","owner":"DigitalSlideArchive","description":"A Girder plugin for annotation tracking in HistomicsUI","archived":false,"fork":false,"pushed_at":"2024-02-15T17:24:24.000Z","size":131,"stargazers_count":4,"open_issues_count":4,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T10:37:47.982Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DigitalSlideArchive.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-09-22T21:29:50.000Z","updated_at":"2024-11-18T22:11:37.000Z","dependencies_parsed_at":"2024-02-14T17:51:05.683Z","dependency_job_id":null,"html_url":"https://github.com/DigitalSlideArchive/annotation-tracker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DigitalSlideArchive%2Fannotation-tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DigitalSlideArchive%2Fannotation-tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DigitalSlideArchive%2Fannotation-tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DigitalSlideArchive%2Fannotation-tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DigitalSlideArchive","download_url":"https://codeload.github.com/DigitalSlideArchive/annotation-tracker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248211199,"owners_count":21065692,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T15:22:10.460Z","updated_at":"2025-04-10T11:41:45.197Z","avatar_url":"https://github.com/DigitalSlideArchive.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"annotation-tracker\n==================\n\nA Girder plugin for annotation activity tracking in HistomicsTK\n\nBuild Instructions\n------------------\n\n1. Prepare and activate a virtual environment:\n   ``virtualenv --python python3 venv \u0026\u0026 source ./venv/bin/activate``.\n2. Install the package in editable mode: ``pip install -e .``.\n3. Build the client: ``girder build``.\n4. Launch a Mongo server: ``mongod``.\n5. Run the client: ``girder serve``.\n6. Visit http://localhost:8080.\n\nDemo JSON\n---------\n\n1. ``examples/experiment.json`` contains a demo JSON file\n2. Add the JSON data onto the metadata for a Folder with the key value\n   of ``experiments``\n\nLogging\n-------\n\nUser actions and events are logged. They are accessible via the\n``GET /annotation_tracker`` endpoint. A user is assigned an arbitrary\nsession ID when they first open HistomicsUI and a new ID whenever they\nstart a session via the user interface.\n\nImage change, session, and tab action activities\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nOn all WSI image position changes (zoom, pan, window size change,\nrotate), an event is logged with a ``pan`` activity. Additionally, when\nsessions are started or ended a ``startSession`` or ``stopSession``\nactivity is logged. When the browser tab gains or loses focus, the\n``focus`` or ``blur`` activity is logged. When the browser window is\nhidden or becomes visible, a ``visibilityState`` activity is logged.\n\n::\n\n    {\n        session: \u003cstring: session id\u003e,\n        sequenceId: \u003cinteger: a monotonically increasing number for logged events in the current\n                     session\u003e,\n        epochms: \u003cinteger: the current time in linux epoch milliseconds\u003e,\n        activity: \u003cstring: one of the events listed above\u003e,\n        currentImage: \u003cstring: girder image id\u003e,\n        userId: \u003cstring: girder user id, if a user is logged in\u003e,\n        hasFocus: \u003cboolean: true if the browser tab has the focus\u003e,\n        visibilityState: \u003cboolean: true if the browser tab is visible\u003e,\n        visableArea: {    // this is the part of the image visible in the window in WSI coordinates\n          tl: { x: \u003cnumber\u003e, y: \u003cnumber\u003e },\n          tr: { x: \u003cnumber\u003e, y: \u003cnumber\u003e },\n          bl: { x: \u003cnumber\u003e, y: \u003cnumber\u003e },\n          br: { x: \u003cnumber\u003e, y: \u003cnumber\u003e }\n        },\n        imagePosition: {\n          width: \u003cinteger: width of the image display in screen pixels\u003e,\n          height: \u003cinteger: height of the image display in screen pixels\u003e,\n          top: \u003cinteger: position of the image display from the top of the browser tab's area in\n                screen pixels\u003e,\n          left: \u003cinteger: position of the image display from the left of the browser tab's area in\n                 screen pixels\u003e\n        },\n        rotation: \u003cnumber: rotation in radians of the image\u003e,\n        zoom: \u003cnumber: zoom level of the image: 0 is fully zoomed out, value is in powers of two\u003e,\n        panels: [    // a list of panels that cover part of the image view\n          {\n            title: \u003cstring: title of the panel\u003e,\n            width: \u003cinteger: width of the panel in screen pixels\u003e,\n            height: \u003cinteger: height of the panel in screen pixels\u003e,\n            top: \u003cinteger: position of the panel from the top of the browser tab's area in screen\n                  pixels\u003e,\n            left: \u003cinteger: position of the panel from the left of the browser tab's area in screen\n                   pixels\u003e,\n            coveredArea: {    // this is the area of the image covered by the panel in WSI coordinates\n              tl: { x: \u003cnumber\u003e, y: \u003cnumber\u003e },\n              tr: { x: \u003cnumber\u003e, y: \u003cnumber\u003e },\n              bl: { x: \u003cnumber\u003e, y: \u003cnumber\u003e },\n              br: { x: \u003cnumber\u003e, y: \u003cnumber\u003e }\n            }\n          },\n          ...    // more panels\n       ]\n    }\n\nGeneral browser activities\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nActivities are logged on every ``mousemove``, ``mousedown``,\n``mouseup``, ``keydown``, ``keyup``, ``click``. These are only logged\n**if** a session is started.\n\n::\n\n    {\n        session: \u003cstring: session id\u003e,\n        sequenceId: \u003cinteger: a monotonically increasing number for logged events in the current\n                     session\u003e,\n        epochms: \u003cinteger: the current time in linux epoch milliseconds\u003e,\n        activity: \u003cstring: the activity being logged.  This is the web event (as listed above)\u003e,\n        target: \u003cstring: the css selector identifying where on the UI the mouse is currently located\u003e,\n        mouse: {\n          x: \u003cinteger: the position of the mouse in pixels in the browser window (left is 0),\n          y: \u003cinteger: the position of the mouse in pixels in the browser window (top is 0)\n        },\n        page: {\n          x: \u003cinteger: the position of the mouse in pixels in the browser window (left is 0),\n          y: \u003cinteger: the position of the mouse in pixels in the browser window (top is 0)\n        },\n        offset: {\n          x: \u003cinteger: the position of the mouse in pixels in the containing element (left is 0),\n          y: \u003cinteger: the position of the mouse in pixels in the containing element (top is 0)\n        },\n        image: {    // this is only present if the mouse is over the WSI\n          x: \u003cnumber: the position of the mouse in the whole slide image in image coordinates; the\n              range depends on the size of the WSI and can be off the image\u003e,\n          y: \u003cnumber: the position of the mouse in the whole slide image in image coordinates; the\n              range depends on the size of the WSI and can be off the image\u003e\n        }\n    }\n\nEvents can also log ``altKey``, ``ctrlKey``, ``metaKey``, ``shiftKey``,\n``button``, ``buttons``, ``char``, ``charCode``, ``key``, ``keyCode``,\n``which`` values from the native web event.\n\nTask activities\n~~~~~~~~~~~~~~~\n\nTasks generate ``task`` activity logs. This includes:\n\n::\n\n    {\n        session: \u003cstring: session id\u003e,\n        sequenceId: \u003cinteger: a monotonically increasing number for logged events in the current\n                     session\u003e,\n        epochms: \u003cinteger: the current time in linux epoch milliseconds\u003e,\n        activity: 'task',\n        taskAction: \u003cstring: one of 'switch', 'set', 'toggle', 'stop', 'userInput'\u003e\n        experiment: \u003cstring: current experiment title\u003e,\n        running: \u003cboolean: true if the experiment is running\u003e,\n        task: {    // data from the current task including any user input\n          name: \u003cstring\u003e,\n          description: \u003cstring\u003e,\n          userInput: [\n             ...\n          ],\n        }\n    }\n\nAnnotation activities\n~~~~~~~~~~~~~~~~~~~~~\n\nWhen annotations are edited or deleted, the ``annotation`` activity is\nlogged. This includes:\n\n::\n\n    {\n        session: \u003cstring: session id\u003e,\n        sequenceId: \u003cinteger: a monotonically increasing number for logged events in the current\n                     session\u003e,\n        epochms: \u003cinteger: the current time in linux epoch milliseconds\u003e,\n        activity: 'annotation',\n        annotationAction: \u003cstring: one of 'edit', 'stopedit', 'delete', 'update'\u003e\n        annotation: \u003cstring: girder annotation id\u003e,\n        annotationVersion: \u003cgirder annotation version\u003e\n    }\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalslidearchive%2Fannotation-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigitalslidearchive%2Fannotation-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalslidearchive%2Fannotation-tracker/lists"}