Introduction
This is a written step-by-step guide based on trainings given to pathologists on how to use and work with annotation tools in the CP Portal. For a more detailed description on how to use individual annotation tools, please see the relevant Manual pages.
Open a project
Download and extract zip files. You will find basic development structure like this.
- Navigate to the CP Portal
- Use Project drop-down, at the top-left
- Select or search for a project, titled "Pathologist Training"
Find slides
Metadata table functions
Main metadata table supports the following operations.
- To increase the size of any column, click and drag a separator in the column header, to the right
- To decrease the size of any column, click and drag a separator in the column header, to the left
- To show or hide any of the columns
- Open the columns menu from the right hand side
- De-select all
- Select only the columns you wish to have displayed
- Alternatively to scrolling the list, you can use the quick-filter to find the columns you want to select
- To move columns around, simply click and drag the column header to the place where you wish the column to be shown
Find slides using global filter
- To filter the main metadata table and find only the relevant slides, type in your search in the global search box at top-left
- Example: Find all IF slides
- In the global search box, enter: IF
- Example: Find a single slide, with filename 'b648487_1'
- Copy the text: b648487_1
- In the global search box, enter: b648487_1
Find slides using column filter
- To filter the main metadata table and find only the relevant slides, click on the column hamburger menu,
- Click on the filter icon
- Using column-dedicated filters, find relevant slides
- Example: Find all IF slides
- Click on the hamburger menu in the header of the 'Method' column
- Click on the filter icon
- De-select all, by unselecting the '(Select All)' option
- Select only the 'IF' option
- Example: Find all IF slides (alternative method)
- Click on the Filters menu on the right-hand side
- Expand the 'Method' filter
- De-select all, by unselecting the '(Select All)' option
- Select only the 'IF' option
Sort slides
- To sort the main metadata table click on the header of the column you wish to sort by
- You can click on the header multiple times. Each click will perform a different action
- First click will sort the table in an ascending order
- Second click will sort the table in a descending order
- Third click will reset the sorting to default
Group your search results
- To group slides by specific metadata columns
- Simply drag a column header into the first row, where it's written "Drag here to set row groups"
- You can drag multiple column headers one after another, to group by several criteria
- Expand a group in table by clicking on the arrow before the entry
- Click on the 'X' in the grouping category to remove the grouping of the entries
Edit a metadata table entry
- Double click in the field you wish to change, and either select the entry from the drop-down options, or enter the text you wish to add
- Alternatively, you can use copy-and-paste feature to copy and paste values from and into fields you wish to edit
- Alternatively, you can drag the bottom-right square of a field up or down to edit those cells with the value of the field which is being dragged
- Example: Enter a comment
- Double-click on the 'Comment' field of a slide you wish to edit
- Type a comment, e.g. 'Training image'
Task
How many slides in the project 'Pathologist Training' have indication 'Breast Cancer'?
There are 3 slides with the indication 'Breast Cancer' in the 'Pathologist Training' project.
Browse slides
Find the admin and ask for access
You can search through and browse all slides available in the CP Portal
- Open the Browse screen, by clicking on the 'Browse' button on the top-right
- Use column filters, or filters on the right hand side to find slides you are interested in
Find the admin and ask for access
- In the Project list (when the list is grouped by project), click on the user symbol next to the project name
- Note the e-mail address of the Admin user. You can write them to get access to that project
View slides
Open slide
To view the full image in the image viewer
- Double-click on the thumbnail of a slide. This will open the image in the image viewer
- Zoom in and out of the image using your mouse wheel
- Alternatively, you can control the zoom level by clicking on the magnifications at the bottom-right of the image viewer (e.g. 20X, 40X)
- Rotate the slide using SHIFT+ALT on your keyboard and the mouse pointer
- Pan the image by clicking the left mouse button and moving around
- To quickly navigate to different parts of the image
- Click on the double-left arrow in the top-right of the image viewer
- Drag the red rectangle to where you want to jump on the image
Pixelization (pixel-smoothing) setting
- To turn pixel-smoothing (pixel view) on or off
- Click on the pixelize button at the bottom bar in the image viewer to turn pixel-view on (pixel-smoothing off).
- Click on the pixelize button again at the bottom bar in the image viewer to turn pixel-view off (pixel-smoothing on).
- Note: Changing the pixelization view will be persisted between the sessions
Multiview
- While viewing an image in the image viewer click on the 'Show slide list' button
- Right-click on an another image
- Click on the 'Open slide in new tab' menu option
- You can rearrange the images around by dragging the image header and move it around
- You can also arrange the slide-by-slide view by draggingb the lower image around
- Close one viewer window by clicking on the X in the image header
- Note: You can open multiple images (more than 2) side-by-side in the image viewer. There is hard limit on how many images you can open. However, the limit is practical based on your internet and laptop hardware
View IF slides
- From the slide list or from the main metadata table, open the slide where assay info starts with 'DAPI'
- Open the split channel view by clicking on 'Split channel' button
- Toggle color on by clicking on 'Toggle color' button
- Leave the split channel view by clicking on the 'Combine channels' button
Equilization settings
- Open the Equalization panel by clicking on it at the bottom right of the image viewer
- Select and unselect individual channels to only display channels you wish to visualize
- Change the color of a channel by clicking on the color box in front of it
- Change the value of the sliders for a channel
- Example: To remove the background stain, enter the value of 50 to the left limit for a channel
- Click on the drop-down arrow next to the 'Save this slide for me' button
- Click on the 'Save this slide for me' button
- Note: This will store the equalization panel settings for the current slide only for yourself
Annotation set
Create annotation set
To work with annotations you will need an annotation set selected.
- In the left-hand side panel, click on 'Annotations' tab
- Click on the 3 dots above annotation set drop-down field
- Click on the 'New...' option
- Enter a name for the annotation set
- Click on the 'Save' button
Rename annotation set
- In the left-hand side panel, click on 'Annotations' tab
- From the Annotation set drop-down field, select an existing annotation set
- Click on the 3 dots above annotation set drop-down field
- Click on the 'Rename...' option
- Enter a new name for the annotation set
- Click on the 'Save' button
Region annotations
Create region annotation
- Click on the polygon tool
- The 'Tumor area' class is preselected
- Draw an annotation by clicking and dragging left mouse button on the image
- Click on the 'Tumor area' floating panel at the bottom of the image viewer
- Select a new class by clicking on the class name from the annotation class selection panel
- Draw another annotation by clicking and dragging left mouse button on the image
Correct region annotation
- Hover over the annotation border
- Click and drag the border with a left mouse button to correct the annotation
Line annotation
- Start drawing a region annotation by click and dragging left mouse button on the image, without letting the button go
- Press the 'Shift' key on your keybaord
- Draw the line annotation
- Release the left mouse button
- Release the 'Shift' key
Magnet tool
- While the polygon (region annotation) tool is still active, click on the magnet tool
- Draw a polygon that is touching the polygon you have previously drawn
- Un-select the magnet tool when you are done drawing
Create FOV: Square
- Click on the FOV tool (square icon)
- Select the square
- Enter a desired value in the side length field, e.g. 100
- Pan around to find a good area with a few marker-positive cells
- Click on th eimage to place your FOV at the desired location
Create FOV: Square
- Click on the FOV tool (square icon)
- Select the circle
- Enter a desired value in the side length field, e.g. 100
- Pan around to find a good area with a few marker-positive cells
- Click on th eimage to place your FOV at the desired location
Transform region annotations
- Make sure all drawing tools are de-selected
- Click on the transform tool
- Select any existing region annotation on the image
- Grab the annotation and move it to a new location
- Make it bigger or rotate it
Re-classify region annotation
- Make sure all drawing tools are de-selected
- Click on the transform tool
- Select any existing region annotation on the image
- Grab the annotation and move it to a new location
- Make the annotation bigger by clicking and dragging on one of the edge-squares
- Rotate the annotation by clicking and dragging on the two sided edge-arrow
Delete annotation
- Delete an annotation using Annotations panel
- In the Annotations panel to the left, select annotations you wish to delete
- Click on the three dots
- Click on "Delete Annotations" option
- Make sure the selection tool is active
- Delete an annotation using keyboard keys
- Make sure the selection tool is active
- Select any cell annotation
- Press the "Delete" key on your PC or the combination of keys "FN + Backspace" on your Mac
Cell marker annotation
Create CMA: Rating
To work with annotations you will need an annotation set selected.
- Click on the cell marker annotations (CMA) tool (circular icon that looks like a target) in the Image viewer
- Click on the drop-down arrow at the gray top line of the CMA panel
- Click on the 'Rating' option
- Select a rating you wish to place: + (positive), - (negative), or ? (ambiguous)
- Select a the class you wish to place from the class list
- Click on the image in the Image viewer where you want to place a CMA with the selected class+rating
Create CMA: Intensity score
- Click on the cell marker annotations (CMA) tool (circular icon that looks like a target) in the Image viewer
- Click on the drop-down arrow at the gray top line of the CMA panel
- Click on the 'Intensity score' option
- Select a rating you wish to place: 0, 1+, 2+, or 3+
- Select a the class you wish to place from the class list
- Click on the image in the Image viewer where you want to place a CMA with the selected class+score
Add CMA class
- Click on the cell marker annotations (CMA) tool (circular icon that looks like a target) in the Image viewer
- Click on the "Add Class" button at the bottom of the CMA panel
- Click on the class you wish to add, e.g. Tumor
Add multiple CMAs
- Click on the cell marker annotations (CMA) tool (circular icon that looks like a target) in the Image viewer
- Click on the "Add Class" button at the bottom of the CMA panel
- Add at least two classes, e.g. Tumor and the slide's assay marker
- Select the Tumor class from the list
- Select the positive rating
- Click somewhere on the image to place a CMA
- Select the marker class (which marker is available depends on the value from the Assay info of that slide)
- Select the 1+ intensity score
- Click on top fo the existing CMA.
- Note: This will create one CMA with two scores: Tumor positive and Marker 1+
Delete CMA
- Select the same class of the CMA which is to be deleted
- Select any rating or intensity score
- Click on the CMA you wish to delete
- Note: A CMA can be deleted by using the same class of the CMA. Which rating or intensity score is selected is not relevant when deleting a CMA
Other annotation tools
Distance measurement
Distance measurements (ruler tool) work both with and without an annotation set selected.
- Select the ruler tool (ruler icon) in the image viewer
- Click somewhere on the slide where you want to start the distance measurement from
- Click somewhere on the slide where you want to end the distance measurement to
- Note: After placing a distance measurement you can click and drag one of the measurement points to adjust the distance measurement
Hide labels
- Clicking on the hide labels button (the T icon) at the bottom of the Image viewer will hide all labels from the Image viewer
- Clicking on the hide labels button for the second time will show all labels in the Image viewer
- Note: The state of the hide labels button is stored per session, when navigating between the slides
Hide all annotations
- Clicking on the hide annotations button (the eye icon) at the bottom of the Image viewer will hide all annotations from the Image viewer
- Clicking on the hide annotations button for the second time will show all annotations in the Image viewer
Move annotations
- Make sure that all annotation tools are unselected
- Click on the Move annotations tool (the double-sided arrow icon) at the bottom of the Image viewer
- Click on the Move annotations tool (the double-sided arrow icon) at the bottom of the Image viewer
- Click on an annotation in the Image viewer
- Click-and-drag an annotation to move it around in the Image viewer
Undo and redo
- To undo a change you made click on the Undo button (the back arrow icon) in the Image viewer
- To redo a change you undid before, click on the Redo button (the forward arrow icon) in the Image viewer
Annotation sets overview
Annotation sets overview page
- In the left-hand side panel, click on 'Annotations Sets' page
- Note: All annotation sets with the associated annotations will be shown for each slide
Sorting entries
Entries can be sorted only by slide information, and not by annotation counts.
- Clicking the first time on the header will sort the table in an ascending order
- Clicking the second time on the header will sort the table in a descending order
- Clicking the third time on the header will revert the table to its original state
Grouping entries
Entries can be grouped only by slide information, and not by annotation counts.
- Drag one fo the slide-related headers to the row above, where it says "Drag here to set row groups". This will group all table entries according to the selected column. By default, the table is grouped by the 'Filename' column
- You can drag multiple headers, one after the other. This will group all entries according to the selected columns in the correct order
- Clicking on the 'X' button next to the group name will ungroup the table by that column
Download slides and annotations
Setup PyPortal: API Key
- In the CP Portal at the top-right, click on your username
- Click on the 'Generate key' button
- Copy the key from the input box above the button
- Open Notepad app on Windows
- Paste the key you copied from the CP Portal
- Save the file as ".portal_key" in your user folder. The path should be "C:\Users\<your windows user>\.portal_key", e.g. "C:\Users\Alex\.portal_key"
- Note: The filename must be exactly .portal_key. It cannot have extension, such as .txt in the filename
- Note: The file must be stored in your user-base folder, e.g. C:\Users\Alex\
Setup PyPortal: Download executable
PyPortal executable only works on Windows operating system. MacOS is currently not supported.
- Download PyPortal executable, from here
- Open the command line, by clicking on the 'Start' button, and then the 'Command Prompt' app
- Navigate to the folder where you download PyPortal to, by typing
cd "C:\Users\Alex\Downloads"
- Run PyPortal by typing
pyportal.exe -h
Download slides: PyPortal
- Navigate to the folder where you downloaded PyPortal to
- Open the project in the CP Portal
- Copy the project ID from the URL. It's the text in-between the "portal.img.astrazeneca.com/project/" text and the next "/" character
- Download all slides from the project by typing
pyportal.exe ds -p <portal-project-id> -o <path-to-store-slides>
- Note: Replace <portal-project-id> with the project ID you copied in previous steps
- Replace <path-to-store-slides> with the folder where you want to download slides to. E.g. typing a . will download all slides to the folder where PyPortal is located
Download annotations: PyPortal
- Navigate to the folder where you downloaded PyPortal to
- Open the project in the CP Portal
- Copy the project ID from the URL. It's the text in-between the "portal.img.astrazeneca.com/project/" text and the next "/" character
- Download all annotations from the project by typing
pyportal.exe da -p <portal-project-id> -o <path-to-store-xmls>
- Note: Replace <portal-project-id> with the project ID you copied in previous steps
- Replace <path-to-store-xmls> with the folder where you want to download annotations to. E.g. typing a . will download all annotations to the folder where PyPortal is located
Transfer slides: Transpath UK
This option is available only to the Transpath UK user group. All opther users will not have access to this option.
- Open the project in the CP Portal
- Filter the slides list to show only the slides you wish to transfer. Only the visible slides will be transfered
- In the main metadata table click on the 'Export' button
- From the drop-down click on the 'Transfer slides' option
- In the Transfer slides wizard select the network location where you wish to transfer slides to
- Click on the 'Start transfer' button
- Click on the 'Finish' button
- Note: This will start the transfer process. The process may take some time to complete. You can keep track of its status through the Jobs panel
Transfer annotations: Transpath UK
This option is available only to the Transpath UK user group. All opther users will not have access to this option.
- Open the project in the CP Portal
- In the Annotation sets overview page click on the 'Export' button
- From the drop-down click on the 'Transfer annotations' option
- In the Transfer annotations wizard select the network location where you wish to transfer annotations to
- Click on the 'Start transfer' button
- Click on the 'Finish' button
- Note: This will start the transfer process. The process may take some time to complete. You can keep track of its status through the Jobs panel