Skip to content

Commit

Permalink
Merge pull request #79 from finglis/view-tracker-v2
Browse files Browse the repository at this point in the history
View tracker v2
  • Loading branch information
petebankhead committed Sep 26, 2023
2 parents bff3d31 + 797138d commit e16da4e
Show file tree
Hide file tree
Showing 7 changed files with 136 additions and 43 deletions.
101 changes: 58 additions & 43 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"fieldlist",
"html_admonition",
"html_image",
# "linkify",
# "linkify",
"replacements",
"smartquotes",
"strikethrough",
Expand All @@ -108,66 +108,81 @@

myst_substitutions = {

"rectangle": '<img src="../images/icons/Rectangle.png" />',
"icon_rectangle": '<img src="../images/icons/Rectangle.png" class="inline-icon" />',
"rectangle": '<img src="../images/icons/Rectangle.png" />',
"icon_rectangle": '<img src="../images/icons/Rectangle.png" class="inline-icon" />',

"ellipse": '<img src="../images/icons/Ellipse.png" />',
"icon_ellipse": '<img src="../images/icons/Ellipse.png" class="inline-icon" />',
"ellipse": '<img src="../images/icons/Ellipse.png" />',
"icon_ellipse": '<img src="../images/icons/Ellipse.png" class="inline-icon" />',

"line": '<img src="../images/icons/Line.png" />',
"icon_line": '<img src="../images/icons/Line.png" class="inline-icon" />',
"line": '<img src="../images/icons/Line.png" />',
"icon_line": '<img src="../images/icons/Line.png" class="inline-icon" />',

"polygon": '<img src="../images/icons/Polygon.png" />',
"icon_polygon": '<img src="../images/icons/Polygon.png" class="inline-icon" />',
"polygon": '<img src="../images/icons/Polygon.png" />',
"icon_polygon": '<img src="../images/icons/Polygon.png" class="inline-icon" />',

"brush": '<img src="../images/icons/Brush.png" />',
"icon_brush": '<img src="../images/icons/Brush.png" class="inline-icon" />',
"brush": '<img src="../images/icons/Brush.png" />',
"icon_brush": '<img src="../images/icons/Brush.png" class="inline-icon" />',

"wand": '<img src="../images/icons/Wand.png" />',
"icon_wand": '<img src="../images/icons/Wand.png" class="inline-icon" />',
"wand": '<img src="../images/icons/Wand.png" />',
"icon_wand": '<img src="../images/icons/Wand.png" class="inline-icon" />',

"points": '<img src="../images/icons/Points.png" />',
"icon_points": '<img src="../images/icons/Points.png" class="inline-icon" />',
"points": '<img src="../images/icons/Points.png" />',
"icon_points": '<img src="../images/icons/Points.png" class="inline-icon" />',

"move": '<img src="../images/icons/Move.png" />',
"icon_move": '<img src="../images/icons/Move.png" class="inline-icon" />',
"move": '<img src="../images/icons/Move.png" />',
"icon_move": '<img src="../images/icons/Move.png" class="inline-icon" />',

"grid": '<img src="../images/icons/Grid.png" />',
"icon_grid": '<img src="../images/icons/Grid.png" class="inline-icon" />',
"grid": '<img src="../images/icons/Grid.png" />',
"icon_grid": '<img src="../images/icons/Grid.png" class="inline-icon" />',

"measure": '<img src="../images/icons/Measure.png" />',
"icon_measure": '<img src="../images/icons/Measure.png" class="inline-icon" />',
"measure": '<img src="../images/icons/Measure.png" />',
"icon_measure": '<img src="../images/icons/Measure.png" class="inline-icon" />',

"table": '<img src="../images/icons/Table.png" />',
"icon_table": '<img src="../images/icons/Table.png" class="inline-icon" />',
"table": '<img src="../images/icons/Table.png" />',
"icon_table": '<img src="../images/icons/Table.png" class="inline-icon" />',

"cog": '<img src="../images/icons/Cog.png" />',
"icon_cog": '<img src="../images/icons/Cog.png" class="inline-icon" />',
"cog": '<img src="../images/icons/Cog.png" />',
"icon_cog": '<img src="../images/icons/Cog.png" class="inline-icon" />',

"annotations": '<img src="../images/icons/Annotations.png" />',
"icon_annotations": '<img src="../images/icons/Annotations.png" class="inline-icon" />',
"annotations": '<img src="../images/icons/Annotations.png" />',
"icon_annotations": '<img src="../images/icons/Annotations.png" class="inline-icon" />',

"detections": '<img src="../images/icons/Detections.png" />',
"icon_detections": '<img src="../images/icons/Detections.png" class="inline-icon" />',
"detections": '<img src="../images/icons/Detections.png" />',
"icon_detections": '<img src="../images/icons/Detections.png" class="inline-icon" />',

"annotations_fill": '<img src="../images/icons/Annotations_fill.png" />',
"icon_annotations_fill": '<img src="../images/icons/Annotations_fill.png" class="inline-icon" />',
"annotations_fill": '<img src="../images/icons/Annotations_fill.png" />',
"icon_annotations_fill": '<img src="../images/icons/Annotations_fill.png" class="inline-icon" />',

"detections_fill": '<img src="../images/icons/Detections_fill.png" />',
"icon_detections_fill": '<img src="../images/icons/Detections_fill.png" class="inline-icon" />',
"detections_fill": '<img src="../images/icons/Detections_fill.png" />',
"icon_detections_fill": '<img src="../images/icons/Detections_fill.png" class="inline-icon" />',

"tma_grid": '<img src="../images/icons/TMA_grid.png" />',
"icon_tma_grid": '<img src="../images/icons/TMA_grid.png" class="inline-icon" />',
"tma_grid": '<img src="../images/icons/TMA_grid.png" />',
"icon_tma_grid": '<img src="../images/icons/TMA_grid.png" class="inline-icon" />',

"screenshot": '<img src="../images/icons/Screenshot.png" />',
"icon_screenshot": '<img src="../images/icons/Screenshot.png" class="inline-icon" />',
"screenshot": '<img src="../images/icons/Screenshot.png" />',
"icon_screenshot": '<img src="../images/icons/Screenshot.png" class="inline-icon" />',

"extract_image": '<img src="../images/icons/Extract_image.png" />',
"icon_extract_image": '<img src="../images/icons/Extract_image.png" class="inline-icon" />',
"extract_image": '<img src="../images/icons/Extract_image.png" />',
"icon_extract_image": '<img src="../images/icons/Extract_image.png" class="inline-icon" />',

"contrast": '<img src="../images/icons/Contrast.png" />',
"icon_contrast": '<img src="../images/icons/Contrast.png" class="inline-icon" />',
"contrast": '<img src="../images/icons/Contrast.png" />',
"icon_contrast": '<img src="../images/icons/Contrast.png" class="inline-icon" />',

# "polyline": '<img src="../images/icons/Polyline.png" />',
# "icon_polyline": '<img src="../images/icons/Polyline.png" class="inline-icon" />',
"play": '<img src="../images/icons/Play.png" />',
"icon_play": '<img src="../images/icons/Play.png" class="inline-icon" />',

"stop": '<img src="../images/icons/Stop.png" />',
"icon_stop": '<img src="../images/icons/Stop.png" class="inline-icon" />',

"record": '<img src="../images/icons/Record.png" />',
"icon_record": '<img src="../images/icons/Record.png" class="inline-icon" />',

# "polyline": '<img src="../images/icons/Polyline.png" />',
# "icon_polyline": '<img src="../images/icons/Polyline.png" class="inline-icon" />',

# "record_start": '<img src="../images/icons/Start_recording.png" />',
# "icon_record_start": '<img src="../images/icons/Start_recording.png" class="inline-icon" />',

# "record_stop": '<img src="../images/icons/Stop_recording.png" />',
# "icon_record_stop": '<img src="../images/icons/Stop_recording.png" class="inline-icon" />',
}
Binary file added docs/advanced/images/tracker_viewer.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/advanced/images/tracker_viewer_analysis.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/advanced/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ exporting_images
exporting_annotations
command_line
omero
view_tracker
```
76 changes: 76 additions & 0 deletions docs/advanced/view_tracker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# View tracker

The view tracker tool records the viewer as the user navigates over an image, similar to a screen recorder.

:::{note}
The view tracker currently requires the image being recorded to be within a [project](tutorials-projects) as the recordings are saved in the projects folder. When sharing, be sure to share the whole project folder.
:::

## How to use

It can be accessed via {menuselection}`View --> Show view tracker` and looks like this:

:::{figure} images/tracker_viewer_recording_example.png
:align: center
:class: shadow-image
:width: 40%

View tracker user interface including an example view record
:::

All the recordings of the currently opened image are listed here.

### Create a recording

To start a new recording of the viewer, simply click {{ icon_record }}. To stop
the recording, click {{ icon_stop }}. After stopping a recording, QuPath will
automatically save it as a TSV file within in the project folder.

:::{tip}
You can also add mouse and active tool tracking to the
recording by clicking the three dots icon.
:::

### Playback

You can replay any selected recording by selecting it and using the {{ icon_play }} button.

::: {warning}
A recording can only be made for one viewer at a time. I.e. You cannot
jump from one viewer to another during a recording, even in multi-view.
Doing so will simply stop the current recording.
:::

## Analyze

The Analysis pane gives the user an overview of the recording by showing where the viewer is looking at each time point and how long that area been looked at. To analyze a recording, select it and click {guilabel}`Analyze` or double-click on the recording. This will run the analysis pane, as shown:

:::{figure} images/tracker_viewer_analysis.png
:align: center
:class: shadow-image
:width: 40%

View tracker analysis pane
:::

Playbacks can be replayed by clicking the {{ icon_play }} button with a few additional options discussed below.

### Data overlay

This uses a heatmap overlay which the colors can be changed via the {guilabel}`colormap` option. It provides an insight into areas of focus during the recording and is determined by time spent looking at that region. To activate this option, select {guilabel}`Enable data overlay`. Each colored pixel of the overlay represents the amount of milliseconds spent on the corresponding pixel of the original image.

### Time range and downsample range
You can dynamically crop the recording to display only the data from a certain period of the recording by sliding the {guilabel}`Time range` slider (e.g. only the frames between 5 minutes and before 10 minutes).
Similarly, you can dynamically crop the recording to only display the data from the frames which were captured in a specified downsample range (e.g. only the frames where the image was viewed as full resolution).

::: {tip}
You can export the overlay to a `tif` file by right-clicking on the slide overview (after making sure that {guilabel}`Enable data overlay` is ticked), then {guilabel}`Export data as TIF`.
:::

### Recording table

As mentioned above, all recordings are automatically saved as a TSV file in the project folder. You can preview this table by clicking {guilabel}`Show frames` (and {guilabel}`Hide frames` to collapse them).

::: {note}
Selecting a recording from the previewed table will automatically change the position of the current viewer to match the frame selected.
:::
1 change: 1 addition & 0 deletions docs/tutorials/projects.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
(tutorials-projects)=
# Projects

QuPaths allows you to view and work with single images.
Expand Down

0 comments on commit e16da4e

Please sign in to comment.