Medical Labeling Editor
Last updated
Last updated
Ango Hub provides a medical labeling editor, in which annotators can label medical files in the NRRD and NIFTI formats.
DICOM files are annotated in the DICOM labeling editor.
The medical editor will be opened when the user clicks on a labeling task linked to an asset ending with the .nrrd .nii .nii.gz
file extensions.
Only the Medical Brush labeling tool can be used in the medical editor.
By default, the Axial view will be shown in the top left, the Coronal view in the bottom left, and the Sagittal view in the bottom right. At the moment, this layout cannot be changed.
A 3D reconstruction of the annotations created so far is shown in the top-right view, the 3D Viewer, when the toggle in its top left is active.
You select your class (tool) from the ones created in the project settings in the tool list. Only one class can be selected at a time. The selected class is highlighted in blue.
Once a class is selected, you can annotate on the asset using its functions – brush, pen, threshold, and more, by clicking on the function from the Function Bar.
By default:
Additionally, when a tool is selected:
By enabling the 3D toggle, you'll be able to see a 3D reconstruction of the annotations completed so far in the top-right view.
Rotate the view by dragging with the mouse cursor
Zoom in and out with the scroll wheel
Pan with Ctrl + Left Mouse Button
When hovering over a voxel in a view with the mouse cursor, the Data Probe, at the bottom left of the screen, will display information about the voxel being hovered on.
Voxel Location refers to the location of the voxel, in voxels, assuming voxel 0, 0, 0 is the left-most, front-most, bottom-most voxel in the Coronal view.
Voxel Category (if any) refers to the class the voxel belongs to.
Patient Coordinates refers to the real world coordinates of the voxel from the indicated plane. For example, R 6.35 signifies that the voxel is 6.35 millimeters from the R (Right) plane. The different planes are L (Left), R (Right), A (Anterior), P (Posterior), I (Inferior), S (Superior).
Hounsfield Value refers to the Hounsfield density value of the pixel being hovered.
Each of the three main views has a three-line menu at the top from which you can access options related to that view.
Fit to View will make the entire currently visible volume fit in the current view.
Pin enlarges the view to cover the entire screen. This can also be accomplished by double-clicking on the view. Double-click again to return to the previous stage.
Set as Main (on reference volumes only). Sets the current reference volume as the main volume to be annotated. This will erase all annotations in the current task.
Select view allows you to change the view for the volume you are currently viewing in the view.
Select volume allows you to switch between your main volume and a reference volume, or to another reference volume. The project manager must have imported references volumes for this feature to work. See the following page for more: Importing Reference Medical Volumes on Asset Import.
Only the main volume can be annotated. Reference volumes are for reference purposes only.
You may set a reference volume to be the main volume using the Set as Main button. This will switch the position of the current reference volume with that of the main volume. This, however, will also permanently delete all annotations in the current task.
Clone [class name] traces... appears when a class has been selected. This option allows you to clone traces in the current view and in the current slice, belonging to the selected class, to other slices in the same view. For example, if you have some Lung traces in slice number 50 in the axial view you'd like to copy to all slices between 25 and 75, navigate to that slice and from the view options menu, select Clone Lung traces... – the following dialog will appear:
Indicate the frames to where you'd like the traces to be cloned and click on Clone.
Whenever you enable a function by clicking on one from the Function Bar, its options will appear in the Active Functions List, located in the bottom left of the screen. This section covers all functions and their options.
For any function, you may collapse its dialog using the chevron on the left:
Clicking on the "Window" icon in the function bar will enable window keyboard shortcuts, detailed in the Keyboard Shortcuts section below.
Window Width and Level: Move the slider, or type in a value to change the window's width and level.
Preset: Ango Hub has a variety of width/level presets, ideal for quickly setting a W/L pair allowing you to highlight certain elements of the view. For example, selecting the Lung preset will set W/L in such a way that lungs are highlighted, and so on for all other presets.
The crosshair allows you to gather your bearings in 3D space and to understand where your cursor is positioned relative to all views.
It also allows you to synchronize all views in such a way that they all show the same pixel you are selecting with the crosshair. This is also known as multiplanar translation.
To toggle the crosshair, click on the Crosshair Toggle:
Move your cursor over a view while holding Shift. You will see that all views will navigate between slices in such a way as to always show the pixel you are hovering over with the crosshair:
To hide the crosshair, click on the Crosshair Toggle again.
You can still perform multi-planar translation even with the crosshair turned off, just by doing Shift + Move Cursor.
Brush Size: Slider to adjust the size of the brush tool.
Brush Mode: Selector to pick whether the brush/pen should add (Paint) or whether it should erase (Eraser.)
Brush Type: Pick between 2D (flat) and 3D (spherical) brush.
Overwrite Toggle: When active, when you paint with the brush/pen over pre-existing traces, the traces that have been covered will be deleted and overwritten with the new traces.
Overlap Toggle: When active, your brush traces will overlap pre-existing traces, without overwriting (deleting) them. This way, you can segment the same voxel with multiple classes.
To use the Medical Brush tool, simply click with the left mouse button where you'd like to place the annotation. You can click and drag if necessary, and you may use either the slider mentioned above or the keyboard shortcuts mentioned below to change the size of the brush and other settings.
You may choose to limit where you can paint with the brush to a threshold range you specify.
To do so, while the Brush tool is active, click on the "Threshold" icon and pick a range. As long as the threshold tool is active, the brush will only paint within the specified threshold range. To allow the brush to paint anywhere, close the Threshold tool by clicking on its icon again.
In the brush settings, switching the brush type to 3D will make the brush a sphere. Clicking anywhere on the asset will create a sphere, with the center on the cursor and with a diameter equal to the brush size.
Visually, the sphere might not always look spherical. This is because often, voxels have different sizes in the different dimensions.
For example, if the voxels in the asset are taller than they are larger, the sphere will look oblong (e.g. taller) than a normal sphere.
This is normal, expected, and intended.
The Threshold tool allows you to paint pixels with a value falling between a range you specify.
To activate the threshold tool, first select a Medical Brush tool from the toolbar on the left, then click on the Threshold button. From the dialog that pops up, specify two values using the slider. The view will update and show in green the pixels that would be painted with the values currently selected.
From the Editable Area dropdown select Everywhere, then, when you wish to finalize the threshold annotation, click on Apply. The highlighted pixels will be painted over with the tool previously selected.
You may have threshold only apply to an area where you have already created brush traces.
For example, if we were to have painted an area like so with the 'Green' brush:
We may have Hub only run threshold, with another tool, inside of the green area. This can be useful if, for example, we wished to annotate the bones in the selected area.
Ensure the 'Overwrite' or 'Overlap' toggle is on for the brush to run the threshold with, then click on Apply. Threshold will be applied in the area.
The Pen tool allows you to draw a region of pixels to paint, similar to the Segmentation tool for images.
The pen tool is a subset of the Medical Brush tool. To activate the pen tool, first select a Medical Brush tool from the toolbar on the left, then click on the Pen button.
With the pen tool selected, draw over the image surrounding the pixels you'd like to paint. When you are done, press N to close the loop. All pixels found inside the loop will be painted.
-> See the Smoothing docs page.
Logical operators allow you to perform logical operations (e.g. add, subtract, invert) on brush traces.
Some operations (e.g. invert) operate on a single brush class: the one you selected. Others (e.g. copy, subtract) operate between two classes of brush traces: the selected class (the one you clicked on in the Tools list which is highlighted in blue) and the target class (the one you select in the Logical Operators panel).
Copy. Removes all existing segmentations of the selected class, and creates new ones copying, and overlapping, the target class.
Add. Creates new brush traces belonging to selected class, copying and overlapping the brush traces of target class.
Subtract. Wherever traces from selected and target class overlap, segmentations from the target class are subtracted from segmentations of the selected class.
Intersect. Deletes all traces of selected class, except where they overlap with target class.
Invert. Inverts traces from selected class.
Clear. Deletes all traces belonging to the selected class.
Fill. Paints all voxels of the asset with the selected brush, overlapping existing segmentations.
As shown in the video, you may double-click on the keypoint's listing under the "Objects" panel to change its name. You may change its coordinates manually by single-clicking on the listing.
Islands are groups of contiguous voxels.
Island tools are a group of utilities which allow you to remove or change the categories of specific islands in your asset. For example, you may have Hub automatically delete all islands smaller than 1000 voxels.
Read how to use Hub's island tools in the Island Tools docs page.
Ango Hub allows you to import existing NRRD segmentations as pre-labels.
To do so, follow the steps outlined in the page Importing NRRD Annotations.
Always
Space + Drag Cursor
Pan
Pans the view.
Always
Ctrl + Mouse Wheel
Zoom
Zooms the view being currently hovered by the mouse cursor.
Always
Shift + Move Cursor
Multiplanar Translation
Navigates between slices in all other views to show the pixel you are hovering over in all views.
Always
Ctrl + Z
Undo
Undo the last action.
Always
Ctrl + Shift + Z
Redo
Redo the last undone action.
Always
Mouse Wheel
Navigate Slices
Move up and down between slices.
Always
Middle Mouse Button
Pan
Pans the view.
When no labeling tools are selected
Click and Drag
Pan
Pans the view.
When no labeling tools are selected
Double Click
Full Screen
Switch between four-view and single-view modes.
When a labeling tool is selected
Shift + Mouse Wheel
Change Tool Size
Changes the size of the tool.
When a labeling tool is selected
W and Q
Change Tool
Move up and down in the tool list, changing the currently active tool.
When the "Window" icon is selected
Drag cursor up/down
Change Brightness
Dragging the cursor downwards will increase the brightness, dragging it upwards will decrease it.
When the "Window" icon is selected
Drag cursor left/right
Change Contrast
Moving the cursor to the left while holding Ctrl will increase contrast, moving it to the right will decrease it.
When the "Pen" tool is selected
N
Close Pen Trace
Closes the loop drawn with the pen and paints the pixels found inside it.
Exports obtained from the NRRD editor work differently from exports obtained with our other editors.
While you can obtain the export the same way, the brush data is not contained directly within the text export itself, instead, the text export contains a link to a NRRD file containing your annotations.
A sample NRRD export looks like this:
The brush data is contained in the URL linked to in the medicalBrushDataUrl
property. Once you enter the URL, download the .zip and unzip it, you will receive a .nrrd file containing your annotations. For example, this is what the open NRRD would look like, with simple circular annotations:
By clicking on the eye icon next to a class name, you can hide brush traces belonging to the class. The trash can will delete all segmentations from the class.
Crosshair Toggle: toggles the crosshair on or off. Read more about the crosshair here.
Window Options: Change the window width and level. Read more about window options here.
Smoothing: Opens the Smoothing tool, allowing you to smooth out your annotations. Read more about smoothing here.
Island Tools: Tools related to deleting and changing categories of islands. Read more about island tools here.
Threshold Tool: Paint all pixels with values falling between two values you specify. Read more about threshold here.
Logical Operators: Perform logical operation on labeling classes, like invert, subtract, add, copy, and more. Read more about logical operators here.
Borders: Toggle whether the brush traces shown should be filled in or not. The change is merely cosmetic and has no bearing on the export.
Keypoints: When enabled, clicking anyhere on the view creates a new keypoint. Read more about keypoints here.
3D Bounding Box: When enabled, clicking and dragging on the asset will create a 3D bounding box. Read more about 3D bounding boxes here.
Slice Navigator: Slider allowing you to move between slices in the view. Drag the slider up and down to move between slices, or click on the up and down arrows on the top left of the view. Additionally containing the name of the current view, current slice/total number of slices, and in assets with reference volumes, whether the currently-viewed volume is a main or a reference one.
Brush Tool: Create a segmentation by painting.
Pen Tool: Create a segmentation by drawing a closed loop.
Note that the view does not get updated in real time. You will need to click on the refresh button in the top left of the 3D view to update the view with the latest changes.
After selecting a class, activate the Brush tool by clicking on its icon: .
To do so, after you have painted the area where you'd like to run threshold, select a different brush, then click on the 'Threshold' icon (). From the dialog that appears on the left side of the screen, select the threshold range. Then, from the Editable Area dropdown, select the brush you have used to draw the initial area.
To activate logical operators, click on a class in the Tools list – this will be your selected class. Then, click on the Logical Operators icon in the Function Bar () and select an operation. If required by the operation, select the target tool. Then click on Apply.
Click on the button to enable placing keypoints on the asset. Clicking anywhere on the asset will place a keypoint with three-dimensional coordinates: