Performing Annotation ===================== This is reference material for annotating images. For setting up images for annotation, see :doc:`annotationworklistreference`. The Annotation Interface ++++++++++++++++++++++++ Worklist -------- The worklist shows all of the images you have to annotate, along with their status. The buttons next to the WORKLIST label allow you to sort the remaining images into Patient folders, by date added, or alphabetically. The “Show Completed” switch toggles whether to show images that you have already annotated and marked as done. You can click on an image to switch to it. On the left, an empty circle shows that no work has been done; a half-full circle shows that you have annotated the image, but not marked it as done yet; and a checkmark shows that the image has been marked as done and submitted. .. figure:: media/worklist.png :alt: The Worklist section The Worklist section Viewing Bar ----------- The viewing bar provides tools to view the image more easily, or to gain more information. Show Annotation Timeline ~~~~~~~~~~~~~~~~~~~~~~~~ This button will display a timeline, showing how different frames are classified. The button does not appear on single-frame images or 3D scans. .. figure:: media/timelinetool.png :alt: Timeline Tool Timeline Tool Set Window ~~~~~~~~~~ Pressing this button turns your mouse into a crosshair. Bring it over an image and left-click-drag to change contrast and brightness. Moving left and right increases and decreased contrast respectively; moving up and down increases and decreases brightness. .. figure:: media/contrast.png :alt: Contrast Tool Contrast Tool Set Segmentation Transparency ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This button opens a slider which lets you set the transparency of segmentations. It defaults to 50%. .. figure:: media/segtransparency.gif :alt: Segmentation Demonstration Segmentation Demonstration Zoom Mode ~~~~~~~~~ Click to toggle between Fit and Fill. Fit will match the image’s largest size to your screen (ensuring you can see the whole image), while Fill will match the smallest size (not wasting any screen space). For most images and most screen dimensions, both should be quite similar. .. figure:: media/zoom.png :alt: Zoom Mode Zoom Mode .. image:: media/imagetools.png Measurement Tools ~~~~~~~~~~~~~~~~~ .. image:: media/MeasurementTools.png These tools allow you to measure parts of the image. This can be useful for deciding how to annotate. Distance ^^^^^^^^ This tool measures the distance between two points. To use it, click on one end of the area you want to measure, followed by the other end. .. image:: media/DistanceUse.gif Bidirectional ^^^^^^^^^^^^^ This tool creates two Distance lines, which are perpendicular to each other. The lines can then be adjusted. .. image:: media/BidirectionalUse.gif Angle ^^^^^ This tool allows you to measure angles. Click at the end of one leg of the angle, click again to the point of the angle, and then move out again for the other leg. .. image:: media/AngleUse.gif Elliptical Region of Interest ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This tool provides you information on an elliptical region. To use it, click at the centre, and then move the mouse out and click again at the corner of an imaginary rectangle bounding the ellipse. The area will be given in square centimetres. You are also given information on the brighness of pixels in the region: max, min, mean, and standard deviation. 0 is a completely dark pixel, and 255 is a white one. .. image:: media/EllipticalROIUse.gif Freehand Region of Interest ^^^^^^^^^^^^^^^^^^^^^^^^^^^ This tool works the same way as the Elliptical ROI tool, except that you draw a contour by clicking and dragging. .. image:: media/FreehandROIUse.gif Saving and Submitting --------------------- These buttons allow you to save your work or submit it. .. figure:: media/savetools.png The Save button will save your work on the current frame to the server. It will be teal if there is work to save, and greyed out if there has been no change to the annotations since you last saved. When the Autosave box is ticked, the annotationns will automatically save when you change images or frames. If it it not ticked, annotations will still be preserved when you change frames, but only on your computer -- these annotations will be lost if you exit without saving. Since saving can take some time, especially with large files, you may wish to disable the autosave if it's slowing your work down. Just make sure to save when you switch images, or your work won't be preserved. The Done button will submit your annotations to the investigator, and mark the image as complete. You can still go back and edit it if you made a mistake. The Skip button moves you to the next image without submitting your annotations, allowing you to do other work and return to the current image later. **If autosave is off, pressing Skip will not save your work!** Annotation Tools +++++++++++++++++ Classifications --------------- Classifications are answers to true-or-false or multiple-choice questions about the data. Often, classifications apply to the whole image. In multi-frame images (like videos, or slices of a 3D scan), there can also be classifications that apply to individual frames. The questions themselves are set up by your principal investigator. Image Classifications ~~~~~~~~~~~~~~~~~~~~~ These classifications apply to the whole image. If the image only has one frame (such as an x-ray), they are the only type of classification available. Checkboxes ^^^^^^^^^^ The simplest form of classification is a checkbox. Click the checkbox to mark an image as belonging to a given category (for example, showing a diseased organ). .. image:: media/CheckboxUse.gif Dropdowns ^^^^^^^^^ A dropdown menu allows you to classify an image into several different categories (for example, the quality of the scan). Click the box, and then click the correct classification. In order to remove your answer, click the box again and select the current classification. .. image:: media/DropdownUse.gif Frame Classifications ~~~~~~~~~~~~~~~~~~~~~ These classifications apply to individual frames, and can only be used in multi-frame images. They work exactly the same as the image classifications, but only apply to the frame you’re currently on. Frame classifications cannot be applied to 3D images. The Timeline Tool ^^^^^^^^^^^^^^^^^ The timeline tool allows you to classify multiple frames at once. To access it, click the Timeline button next to the classification you want to use. A timeline will appear at the bottom. You can click on the timeline to move between frames. .. image:: media/TimelineOpening.gif With the Timeline tool active, any classification will apply to both current frame and to all subsequent frames. If you change an existing classification, you will only change the section of subsequent frames with the same current classification. Similarly, if you remove the classification by re-selecting the same option, it will delete all subsequent frames until the frame classification changes. You can use the Reset button to reset a given classification. .. image:: media/TimelineUse.gif Segmentation Tools ------------------ Segmentation tools “colour” the image, categorizing individual pixels into belonging to a region or not. Generally, when using segmentation tools, you should highlight the entire region you are indicating. Drawing-based tools ~~~~~~~~~~~~~~~~~~~ These tools paint individual pixels, editing the segmentation directly. Brush ^^^^^^^^^^^^^^ Click and drag to draw a segment on the image. Use the Set Pencil Size button to change the brush size. .. image:: media/BrushUse.gif Eraser ^^^^^^^^^^^^^^^^ Click and drag to remove part of a segment. Use the Set Pencil Size button to change the eraser size. .. image:: media/EraserUse.gif Circle ^^^^^^^^^^^^^^^^^ Left-click where you want the centre of the circle to be, then move the mouse out. Click again when the circle is at the desired size. .. image:: media/CircleUse.gif Rectangle ^^^^^^^^^^^^^^^^^^^^ Left-click where you want one corner of the rectangle to be, then left-click where you want the diagonally opposite corner to be. Spline Tools ~~~~~~~~~~~~ These tools allow you to draw a boundary by creating a set of points (called vertices). This boundary is then automatically filled in. Splines can allow you to create complex shapes more precisely than using the drawing tools alone. All splines can be edited by clicking and dragging their vertices with a spline tool selected, or moved by dragging their edges with a spline tool selected. .. image:: media/SplineEditing.gif When a spline is created intersecting with another spline, it instead edits the existing spline. Starting inside the existing spline will expand it; starting outside will remove the selected part. .. image:: media/SplineMerging.gif Linear Spline ^^^^^^^^^^^^^^^^^^^^^^^^ This tool creates a spline with straight edges. Left-click where you want the first vertex to be, then continue left-clicking at each subsequent vertex. To finish, click the first corner, or double-click. If you place a vertex incorrectly, press the Delete or Backspace key to remove it. .. image:: media/LinearUse.gif Polygon Spline ^^^^^^^^^^^^^^^^^^^^^^^^ This tool creates a curved spline, with the boundary curving around the outside of the vertices. Left-click where you want the first vertex to be, then continue left-clicking at each subsequent vertex. To finish, click the first corner, or double-click. If you place a vertex incorrectly, press the Delete or Backspace key to remove it. .. image:: media/PolygonUse.gif Vector Spline ^^^^^^^^^^^^^^^^^^^^^^^ This tool creates a curved spline, with the boundary curving within the inside of the vertices. Left-click where you want the first vertex to be, then continue left-clicking at each subsequent vertex. To finish, click the first corner, or double-click. If you place a vertex incorrectly, press the Delete or Backspace key to remove it. .. image:: media/VectorUse.gif Contour/Sculpt Tools ~~~~~~~~~~~~~~~~~~~~ These tools allow you to create a region by drawing its outline, and then to carefully edit the region. Freehand Contour ^^^^^^^^^^^^^^^^^^^^^^^^^^ Left-click and drag around the boundary you want to segment. Sculptor ^^^^^^^^^^^^^^^^^^^ This tool lets you edit the contour by “pushing” the boundary inwards or outwards. Begin inside the contour to push it out, or outside to push it in. To push, left-click and drag through the boundary. Bringing the mouse closer to the boundary before you click will make the tool smaller and more precise. If you use this tool to cut the boundary in half, the larger half will be preserved. If you push a line out and then loop back, the central area will be filled in. Shapes and Regions ------------------ These tools are used to highlight specific parts of the image or frame. Unlike with Segmentations, which allow anything to be drawn, a given shape/region will consist of a single geometric object. This can make them more useful for certain types of AI training. [LINK TO EXPLANATION DOC?] Line ^^^^^^^^^^^^^^ A line is defined by the location of its two ends. Left-click on one, then on the other. Note that as with all shapes and regions, drawing a second line will delete the first one. (If your project requires you to draw several lines, they will all have different names.) .. image:: media/LineUse.gif Region ^^^^^^^^^^^^^^^^^ Similar to the Freehand Contour and Sculpt tools, this pair of tools allows you to draw and edit a boundary. To draw the boundary, left-click and drag, tracing it out. Make sure to bring your mouse back to where you started. To edit the boundary, use the sculpting tool to “push” the boundary in or out by left-clicking and dragging. Bringing the mouse closer to the boundary before left-clicking will cause the tool to shrink, allowing for more precise edits. Point ^^^^^^^^^^^^^^^ Denotes a single point on the image. Although it is identified with a small circle, the computer only sees the location of the exact centre of the circle. .. image:: media/PointUse.gif .. _circle-1: Circle ^^^^^^^^^^^^^^^^^ Left-click where you want the centre of the circle to be, then move the mouse out. Click again when the circle is at the desired size. .. image:: media/CircleShapeUse.gif .. _rectangle-1: Rectangle ^^^^^^^^^^^^^^^^^^^^ Left-click where you want one corner of the rectangle to be, then left-click where you want the diagonally opposite corner to be. .. image:: media/RectangleShapeUse.gif Spline ^^^^^^^^^^^^^^^^^ The Spline tool creates a line which curves around a set of points called vertices. To create a spline, left-click to create a vertex at the mouse location. Vertices will be connected in the order in which they are created. Click the first vertex to close the spline (making it a loop), or double-click to finish the spline while leaving it open (a line with a beginning and an end). .. image:: media/SplineShapeUse.gif