# Medical Labeling Editor

Ango Hub provides a medical labeling editor, in which annotators can label medical files in the NRRD and NIFTI formats.

{% hint style="info" %}
DICOM files are annotated in the [DICOM labeling editor](https://docs.imerit.net/labeling/labeling-editor-interface/dicom-labeling-editor).
{% endhint %}

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FB3N2mz5mH978dS2UMWV5%2Fimage.png?alt=media&#x26;token=761c59b8-06e2-4183-94ac-361a6a40b55d" alt=""><figcaption></figcaption></figure>

## Overview

### Supported File Types

The 3D Medical labeling editor supports NRRD and NIFTI assets with the following file extensions:&#x20;

* .nrrd
* .nii
* .nii.gz

### Supported Labeling Tools

The 3D Medical labeling editor supports following labeling tools:&#x20;

**Tools**

* Bounding Box
* Polyline
* Point
* Voxel Brush
* Angle

**Classifications**

* Radio
* Checkbox
* Single-Select Dropdown
* Multi-Select Dropdown
* Single-Select Tree
* Multi-Select Tree
* Text

**Relations**

* Single Relation
* Group Relation

<div data-full-width="true"><figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FWWHNyBlI1DVkAW6oSC6D%2Fimage.png?alt=media&#x26;token=fe214814-5f54-49a0-aa2f-8939f32fb1e7" alt=""><figcaption></figcaption></figure></div>

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.

### **Tool/Class List**

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FrN4zlWFZ6qtBYTVuC04y%2Fimage.png?alt=media&#x26;token=8cc8842c-d9d1-4867-a2c7-2ae2de17baee" alt=""><figcaption></figcaption></figure>

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.

If the <img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FIeVTKOKmUrBAr5ws7eCI%2Fimage.png?alt=media&#x26;token=17752d39-ef0f-463e-a6de-2269ea4ae4be" alt="" data-size="line"> icon is filled in, this means that there are voxels in the current asset which have been painted with the related class.

By clicking on the <img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FFS4Kq6C14D6sLnsZUbfr%2Fimage.png?alt=media&#x26;token=7d99b19d-b579-426c-9dbf-757328dc55bf" alt="" data-size="line"> eye icon next to a class name, you can hide brush traces belonging to the class. Clicking on the three dots and then on the <img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FuDvplteVKjjwEiMy9GSa%2Fimage.png?alt=media&#x26;token=3d1f238c-7814-4d95-bed1-67b1445b8dad" alt="" data-size="line"> trash can will delete all segmentations from the class.

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*.

#### Jumping to a class's largest segmentation in all views

Click on the three dots next to the class name and then on Jump. All visible views will jump to the slice containing the highest amount of voxels painted with the class you specified.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2Fb1mtuhS15wOik0hpTah8%2Fimage.png?alt=media&#x26;token=a5b01110-7f69-41d4-a4b2-1f77d7a141ab" alt="" width="330"><figcaption></figcaption></figure>

#### Voxel Brush Tool Attributes

{% hint style="info" %}
Voxel brush attributes will not appear until at least a voxel has been painted with the voxel brush tool in question. This is to prevent attributes from being set when no object is present.
{% endhint %}

If you have added nested classifications (aka "attributes") to a Voxel Brush class in the project settings, the class will have a downward arrow, and can be expanded:

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FNd0teEcK2ALUVcevDnOn%2Fimage.png?alt=media&#x26;token=1e69e12e-a728-404d-976b-921d800f5ebc" alt="" width="375"><figcaption></figcaption></figure>

From this section, you are able to set attributes for the class in this asset.

### **Function Bar**

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FSqfzc9mP1PIVo9TS25iA%2Fimage.png?alt=media&#x26;token=a52747c1-520e-443a-89c0-bd2e2835cadb" alt=""><figcaption></figcaption></figure>

By default:

* <img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FaxvZSIXvJuSiXldp803T%2Fimage.png?alt=media&#x26;token=20ab741c-e440-4f60-b7b0-e4811a7ec873" alt="" data-size="line"> **Crosshair Toggle**: toggles the crosshair on or off.\
  Read more about the crosshair [here](#multi-planar-translation-and-crosshair).
* <img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FzDBSNI1iP9hufbabLTfS%2Fimage.png?alt=media&#x26;token=62d7df95-6174-440a-bd7e-2d3152444f1f" alt="" data-size="line"> **Window Options**: Change the window width and level.\
  Read more about window options [here](#windowing-options).
* <img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FoUnRYJlnJgifYT3yMfow%2Fimage.png?alt=media&#x26;token=1b5cec39-0206-4d9d-b1f1-4e46983745c4" alt="" data-size="line"> **Smoothing**: Opens the *Smoothing* tool, allowing you to smooth out your annotations.\
  Read more about smoothing [here](#smoothing).
* <img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FbV52fbXOkV2Ukfe8xQ8l%2Fimage.png?alt=media&#x26;token=c66a4115-adae-41cc-91c2-a75201d4fc72" alt="" data-size="line"> **Island Tools**: Tools related to deleting and changing categories of islands.\
  Read more about island tools [here](#island-tools).
* <img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FwcEbY1kuQ4AtBsFaUOaV%2Fimage.png?alt=media&#x26;token=c2098ec1-f2df-4fa9-8f8a-ac9d5934d23e" alt="" data-size="line"> **Threshold Tool**: Paint all pixels with values falling between two values you specify.\
  Read more about threshold [here](#threshold).
* <img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FNN5NMxRxQj8M10j2HfWg%2Fimage.png?alt=media&#x26;token=6197174b-b557-484a-8c46-064c653ba80c" alt="" data-size="line"> **Logical Operators**: Perform logical operation on labeling classes, like invert, subtract, add, copy, and more.\
  Read more about logical operators [here](#logical-operators).
* **Fill Between Slices**: read more about this function [here](https://docs.imerit.net/labeling/labeling-editor-interface/medical-labeling-editor/fill-between-slices).
* **Level Tracing**: When toggled on, hovering on a voxel will display a trace of the voxels at the same level of the hovered voxel. Clicking confirms the selection.
* <img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FuuoiU418f8JrAXD0cBvi%2Fimage.png?alt=media&#x26;token=b50fbb92-2d30-4a71-938a-f6d23f3ce3d7" alt="" data-size="line"> **Grow**: When toggled on, click and drag on the asset to perform a "grow" motion. You may alter the sensitivity of this tool from the settings on the left-hand side of the screen. If you wish to limit the effect of the grow tool to a specific Hounsfield unit range, also activate the Threshold function and select your range.
* <img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FP0yLciUHGpt8a7XoohmO%2Fimage.png?alt=media&#x26;token=9c67faea-9e10-44d4-8e5e-3d43dbc830d6" alt="" data-size="line"> **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.
* <img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2Fqx7copFkR1DmGWRIAkja%2Fimage.png?alt=media&#x26;token=0978ecc0-36b4-45e1-a23d-539df041c1ec" alt="" data-size="line"> **Keypoints**: When enabled, clicking anyhere on the view creates a new keypoint.\
  Read more about keypoints [here](#keypoints).
* <img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FbvCj6mHQrVQDlUkpMP7q%2Fimage.png?alt=media&#x26;token=a1e5b4dc-6e72-4f94-b4bd-c38720025620" alt="" data-size="line"> **3D Bounding Box**: When enabled, clicking and dragging on the asset will create a 3D bounding box. Read more about 3D bounding boxes [here](https://docs.imerit.net/labeling/labeling-editor-interface/medical-labeling-editor/3d-bounding-box).
* <img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FCSLQCAYwxUfIS0Sod7Gz%2Fimage.png?alt=media&#x26;token=c0446f1e-43e9-4d14-9d8e-4378bc7003d6" alt="" data-size="line"> **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](https://docs.imerit.net/data/importing-assets/importing-reference-medical-data-during-asset-import), whether the currently-viewed volume is a main or a reference one.

Additionally, when a tool is selected:

* <img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2Fn2YTDdd4D5Bd4vglyQDB%2Fimage.png?alt=media&#x26;token=6dd33f71-441b-463e-b19c-0530b68d4aa5" alt="" data-size="line"> **Brush Tool**: Create a segmentation by painting.
* <img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FGDmhrNfg7ejocXytNY2s%2Fimage.png?alt=media&#x26;token=35523651-3f32-4857-8984-98cef76712b8" alt="" data-size="line"> **Pen Tool**: Create a segmentation by drawing a closed loop.
* <img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FwVkpXE9IRWB3WXBEgtN1%2Fimage.png?alt=media&#x26;token=d7b36f15-525a-4ca1-ae60-9bc77eea6d6a" alt="" data-size="line"> **Adaptive Brush**: When active, the shape of the brush will act as a "bucket" tool. You may change the sensitivity of this tool from the left-hand side of the screen.

### 3D Viewer

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

Note that the view does not get updated in real time. You will need to click on the refresh <img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FdfRrMrqK3Rd8pFbDQrPI%2Fimage.png?alt=media&#x26;token=05c542ac-83f2-42d8-816c-333e5e11af04" alt="" data-size="line"> button in the top left of the 3D view to update the view with the latest changes.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FbtAh3089P513qOfdqKHs%2FOct-12-2023%2009-57-08.gif?alt=media&#x26;token=73e7c41a-9b88-4b86-af6b-3a480a6cf42c" alt=""><figcaption></figcaption></figure>

By default, the 3D viewer will display axis indicators and a 3D cube around your segmentations. You may turn each off from the 3D viewer's three-line menu.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2F8AtZSgTZLdgclyaYXbn8%2Fimage.png?alt=media&#x26;token=9333cdc1-a77e-4da2-947e-037b76e951d9" alt=""><figcaption></figcaption></figure>

### Data Probe

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FBAbvo7EaHPXRl387a4bB%2Fimage.png?alt=media&#x26;token=75539bd1-adaf-4310-89a1-e5e2b17b8c21" alt="" width="563"><figcaption></figcaption></figure>

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.

### View Options

Each of the three main views has a three-line menu at the top from which you can access options related to that view.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2Fu32HdUjPI1TJlbBl091H%2Fimage.png?alt=media&#x26;token=82213de6-d146-42d5-924c-0b256c8cae3a" alt=""><figcaption></figcaption></figure>

#### **Display Options**

* **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](https://docs.imerit.net/data/importing-assets/importing-reference-medical-data-during-asset-import).

{% hint style="info" %}
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.
{% endhint %}

#### Brush Trace Options

* **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:<br>

  <figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2F9P5lBIZR80humnahCIqW%2Fimage.png?alt=media&#x26;token=31b91f96-0fb2-4767-bb21-1eff49101f64" alt="" width="563"><figcaption></figcaption></figure>

  Indicate the frames to where you'd like the traces to be cloned and click on *Clone*.

### Quick Settings

You may access a number of quick settings by clicking on the following button on the bottom-right corner of the screen:

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2Fj9MFiaWTldHaBWfdCl2S%2Fimage.png?alt=media&#x26;token=f531944b-c50d-4f1d-8384-7ed7e73e8db2" alt="" width="563"><figcaption></figcaption></figure>

## Functions

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:

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FB152S4pDGODYM3D9I4TR%2FKapture%202024-09-26%20at%2015.48.44.gif?alt=media&#x26;token=007975f7-e808-4c0a-b86b-61a7f0a2ab01" alt="" width="319"><figcaption></figcaption></figure>

### Windowing Options

Clicking on the "Window" icon in the function bar will enable window keyboard shortcuts, detailed in the [Keyboard Shortcuts](#keyboard-shortcuts) section below.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2F4lr7GwlQMBvDWXHqHaGq%2Fimage.png?alt=media&#x26;token=e05ebcfc-a00c-4fd0-8f87-eac2f9d38591" alt=""><figcaption></figcaption></figure>

**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.

### Multi-planar Translation & Crosshair

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*:

<p align="center"><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FFYz78sUgv43DAiAKHhrB%2Fimage.png?alt=media&#x26;token=8a0ad484-cea2-4148-bacf-3dc123144be5" alt=""></p>

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:

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2Fzl76TJpQlbbbSSUGqymo%2Fcrosshair.gif?alt=media&#x26;token=5bba5460-7463-4709-ba73-e4ecc575fd4b" alt=""><figcaption></figcaption></figure>

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 Tool

After selecting a class, activate the Brush tool by clicking on its icon: <img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2Fqy5oUCqgYf7sXmhWIgah%2Fimage.png?alt=media&#x26;token=8e227868-ede5-4ac3-b502-50e01897358d" alt="" data-size="line">.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2Fq3LVejikHyQJCKKE3X7Q%2Fimage.png?alt=media&#x26;token=a58574a9-849c-4e12-b1b4-55df3764ed6b" alt="" width="375"><figcaption></figcaption></figure>

**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.

#### Brush in Threshold Range

You may choose to limit where you can paint with the brush to a threshold range you specify.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2Fjo8puQDOUDnhoGHaa1qF%2Fbrush-threshold.gif?alt=media&#x26;token=0af3433e-028d-4401-b8fb-ec9d34b7b877" alt=""><figcaption></figcaption></figure>

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.

#### Sphere Brush

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.

{% hint style="info" %}
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.
{% endhint %}

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FW6ohmONARVWp8m3zG9ZC%2Fsphere-brush.gif?alt=media&#x26;token=d80daa20-a1e4-4a8f-a319-67cb45fe21b5" alt=""><figcaption></figcaption></figure>

### Threshold

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 a pulsing light pink the pixels that would be painted with the values currently selected:

{% embed url="<https://angohub-docs-assets.s3.eu-central-1.amazonaws.com/4.7/threshold-pulse.gif>" %}

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.

#### Threshold Area

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:

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2Fdr3bZc8JUCUnibK3PreH%2Fimage.png?alt=media&#x26;token=4a7c2012-f0b4-4903-8a3f-77384f98dcdf" alt=""><figcaption></figcaption></figure>

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.

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 (<img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2F7x0laT4RGJM5AzZ6BWYM%2Fimage.png?alt=media&#x26;token=6fbdccf2-637c-4baa-88b7-bda43cd3e183" alt="" data-size="line">). 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.

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.

### Pen

The Pen tool allows you to draw a region of pixels to paint, similar to the [Segmentation](https://docs.imerit.net/labeling/labeling-tools/tools/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.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FnI6DWcfkXW3E1ND26nyC%2Fimage.png?alt=media&#x26;token=13cdf3f7-c70d-48ac-aa62-f44b919b2b26" alt=""><figcaption></figcaption></figure>

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.

### Smoothing

-> See the [Smoothing](https://docs.imerit.net/labeling/labeling-editor-interface/medical-labeling-editor/smoothing) docs page.

### Logical Operators

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).

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 (<img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FgjhZJWRR1pMohJZE4ZkW%2Fimage.png?alt=media&#x26;token=1d15b05d-d4e9-4b3c-b785-4ca29c99ccb4" alt="" data-size="line">) and select an operation. If required by the operation, select the target tool. Then click on *Apply*.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FgEItSAGcmCuu1GCjvctB%2Fimage.png?alt=media&#x26;token=721d2a86-70e0-4984-80cd-f03ea56b24a0" alt=""><figcaption></figcaption></figure>

#### Logical Operations

**Copy.** Removes all existing segmentations of the selected class, and creates new ones copying, and overlapping, the target class.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FX47aNjzTLPvKTObiWQkM%2Fcopy.gif?alt=media&#x26;token=dc47c113-ecbb-426c-ad9e-49724b7de944" alt=""><figcaption></figcaption></figure>

**Add.** Creates new brush traces belonging to selected class, copying and overlapping the brush traces of target class.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FJxPJpXKA8YRGUJrxgL0l%2Fadd.gif?alt=media&#x26;token=6a645898-090b-4b55-98a4-caff84794e76" alt=""><figcaption></figcaption></figure>

**Subtract.** Wherever traces from selected and target class overlap, segmentations from the target class are subtracted from segmentations of the selected class.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FYb5zWB5bN3rGuJWuWgCG%2Fsubtract.gif?alt=media&#x26;token=00574b3f-3768-47b9-b1e9-8445a68444b9" alt=""><figcaption></figcaption></figure>

**Intersect.** Deletes all traces of selected class, except where they overlap with target class.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FkhDR6W9qnMm4Czx3GAfj%2Fintersect.gif?alt=media&#x26;token=a543feee-e34c-445e-a6dd-f81673095282" alt=""><figcaption></figcaption></figure>

**Invert.** Inverts traces from selected class.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FFAVpAEoctzjjEjDkenB4%2Finvert.gif?alt=media&#x26;token=de6051c3-c8d5-4887-a2a8-46f81373f439" alt=""><figcaption></figcaption></figure>

**Clear.** Deletes all traces belonging to the selected class.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2F0iqB44iQlCqAmiDvHrGS%2Fclear.gif?alt=media&#x26;token=7d11796d-5bcc-43bb-b23e-f1be976bf82c" alt=""><figcaption></figcaption></figure>

**Fill.** Paints all voxels of the asset with the selected brush, overlapping existing segmentations.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FFAr01vGtwuTsOnqQj3QF%2Ffill.gif?alt=media&#x26;token=a6b006bb-029d-4725-84db-e0ab019f784c" alt=""><figcaption></figcaption></figure>

### Keypoints

Click on the <img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FWMtEaNs7cVrHm7qiVUw1%2Fimage.png?alt=media&#x26;token=0717a052-c309-4119-bda6-46f21a96fb84" alt="" data-size="line"> button to enable placing keypoints on the asset. Clicking anywhere on the asset will place a keypoint with three-dimensional coordinates:

{% @arcade/embed flowId="45V5yqbQlVYd6EXs69bE" url="<https://app.arcade.software/share/45V5yqbQlVYd6EXs69bE>" %}

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.

### Island Tools

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](https://docs.imerit.net/labeling/labeling-editor-interface/medical-labeling-editor/island-tools).

## Importing NRRD Segmentations

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](https://docs.imerit.net/data/importing-and-exporting-annotations/importing-annotations/importing-nrrd-annotations).

## Keyboard Shortcuts

<table><thead><tr><th width="208">Condition</th><th width="198">Shortcut</th><th width="167.33333333333331">Action</th><th>Description</th></tr></thead><tbody><tr><td>Always</td><td>Space + Drag Cursor</td><td>Pan</td><td>Pans the view.</td></tr><tr><td>Always</td><td>Ctrl + Mouse Wheel</td><td>Zoom</td><td>Zooms the view being currently hovered by the mouse cursor.</td></tr><tr><td>Always</td><td>Shift + Move Cursor</td><td>Multiplanar Translation</td><td>Navigates between slices in all other views to show the pixel you are hovering over in all views.</td></tr><tr><td>Always</td><td>Ctrl + Z</td><td>Undo</td><td>Undo the last action.</td></tr><tr><td>Always</td><td>Ctrl + Shift + Z</td><td>Redo</td><td>Redo the last undone action.</td></tr><tr><td>Always</td><td>Mouse Wheel</td><td>Navigate Slices</td><td>Move up and down between slices.</td></tr><tr><td>Always</td><td>Middle Mouse Button</td><td>Pan</td><td>Pans the view.</td></tr><tr><td>When no labeling tools are selected</td><td>Click and Drag</td><td>Pan</td><td>Pans the view.</td></tr><tr><td>When no labeling tools are selected</td><td>Double Click</td><td>Full Screen</td><td>Switch between four-view and single-view modes.</td></tr><tr><td>When a labeling tool is selected</td><td>Shift + Mouse Wheel</td><td>Change Tool Size</td><td>Changes the size of the tool.</td></tr><tr><td>When a labeling tool is selected</td><td>W and Q</td><td>Change Tool</td><td>Move up and down in the tool list, changing the currently active tool.</td></tr><tr><td>When the "Window" icon is selected</td><td>Drag cursor up/down</td><td>Change Brightness</td><td>Dragging the cursor downwards will increase the brightness, dragging it upwards will decrease it.</td></tr><tr><td>When the "Window" icon is selected</td><td>Drag cursor left/right</td><td>Change Contrast</td><td>Moving the cursor to the left while holding Ctrl will increase contrast, moving it to the right will decrease it.</td></tr><tr><td>When the "Pen" tool is selected</td><td>N</td><td>Close Pen Trace</td><td>Closes the loop drawn with the pen and paints the pixels found inside it.</td></tr></tbody></table>

## NRRD Exports

Exports obtained from the NRRD editor work differently from exports obtained with our other editors.

While you can obtain the export [the same way](https://docs.imerit.net/data/importing-and-exporting-annotations/exporting-annotations), 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:

```json
[{
  "asset": "https://asset.url/asset.nrrd",
  "externalId": "RegLib_C01_1.nrrd",
  "metadata": {},
  "labeledAt": "2023-02-01T10:14:35.584Z",
  "status": "Labeled",
  "labelDuration": 8152266,
  "consensus": "",
  "tasks": [
    {
      "completedBy": "NAME SURNAME",
      "completedAt": "2023-02-01T10:14:35.584Z",
      "duration": 8152266,
      "isSkipped": false,
      "review": {
        "status": "Todo",
        "completedBy": [],
        "completedAt": null,
        "duration": 0,
        "isSkipped": false
      },
      "status": "Completed",
      "updatedBy": "NAME SURNAME",
      "updatedAt": "2023-02-01T10:14:40.947Z",
      "isBenchmark": false,
      "benchmark": "",
      "issues": [],
      "taskId": "63d0e32ad8157d000eace053",
      "medicalBrushDataUrl": "https://angohub-public-assets.s3.eu-central-1.amazonaws.com/63d0e32ad8157d000eace053.zip",
      "objects": [],
      "classifications": [],
      "relations": []
    }
  ],
  "batches": []
}]
```

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:

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FyPrNBSWSPJw9JVQnUdEU%2Fimage.png?alt=media&#x26;token=fb59bb94-4b70-407d-8de6-5ac0022bc403" alt=""><figcaption></figcaption></figure>
