# ROI-Tool ### [![image-1600462098461.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/scaled-1680-/image-1600462098461.png) The ROI-Tool](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/image-1600462098461.png) The term Region of Interest (ROI) is used throughout the tutorial as a synonym for a "Mask", "Binary Mask", "Segmentation" or "Volume of Interest". Technically, it is a binary 3D volumetric image matrix, which is quite similar to **3D image** apart from the fact that voxel values are binary (on or off). Thus, a ROI has also the same properties as image (like resolution and matrix size). ROIs can also be just 2D, however, one has to be remember that the 2D slice has also a position in 3D space, which can sometimes be confusing. ROIs are close to what is represented by DICOM SEG objects. To open the **ROI-tool** just go via the toolbox menu of the vertical iconbar or use the shortcut via the "pen" icon: [![image-1600354205749.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/scaled-1680-/image-1600354205749.png)](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/image-1600354205749.png) [![image-1600354220857.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/scaled-1680-/image-1600354220857.png)](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/image-1600354220857.png) This opens the following toolbox window, which contains the access to all functionalities of the ROI-tool [![image-1600354300543.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/scaled-1680-/image-1600354300543.png)](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/image-1600354300543.png) On the right you have list of currently opened ROIs togeter with information about matrix size and patientID/studyID. There is also information about the size of ROI and several tool icons:
[![image-1600356837328.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/scaled-1680-/image-1600356837328.png)](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/image-1600356837328.png)focuses the position of the viewer to the center of gravity of the current ROI
[![image-1600356743419.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/scaled-1680-/image-1600356743419.png)](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/image-1600356743419.png) turns the ROI to be the "current ROI" on which currently is drawn on
[![image-1600356769770.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/scaled-1680-/image-1600356769770.png)](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/image-1600356769770.png)toggles the visiblity of the ROI in all viewports
[![image-1600356803683.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/scaled-1680-/image-1600356803683.png)](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/image-1600356803683.png)open several options to modfiy ROIs (see below: ROI operations)
[![image-1600356868723.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/scaled-1680-/image-1600356868723.png)](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/image-1600356868723.png)save the ROI (upload to server)
[![image-1600356897331.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/scaled-1680-/image-1600356897331.png)](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/image-1600356897331.png)downloads the ROI to your local computer
[![image-1600356924459.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/scaled-1680-/image-1600356924459.png)](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/image-1600356924459.png)erases/clears all on voxels of the ROI
[![image-1600356948798.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/scaled-1680-/image-1600356948798.png)](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/image-1600356948798.png)deletes the ROI from workspace
#### Drawing and Pens Generally, the **left mouse button turns voxels on,** while **right mouse button eraśes** voxels. Drawing happens always on the ROI which is currently selected for drawing. You can select a ROI for drawing by highlighting the pencil icon in the viewbar, or in the ROItool [![image-1601631951727.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-10/scaled-1680-/image-1601631951727.png)](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-10/image-1601631951727.png) [![image-1601631990561.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-10/scaled-1680-/image-1601631990561.png)](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-10/image-1601631990561.png) A shortcut for switching drawing on/off you cane use the **spacebar**. You can also **hold shift pressed** while being in drawing mode to disable mouse drawning features. On the left panel of the ROI-tool the current type of pen mode (pen type) and the size of the pen can be set. You can turn on "**live preview**" to see what the current pen would draw. Displayed **opacity** of the ROI can be determined and whether **outlines** are drawn. The available pen types are as follows:
[![image-1600428072743.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/scaled-1680-/image-1600428072743.png)](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/image-1600428072743.png) ##### **Thresholding based pen**. Depending on the threshold (either choose clImL/R or an actual number) the pen turns voxels ON, which are above ("Higher") or below ("Lower") the threshold. Additional you can select "Higher RGrow"/"Lower RGrow" to enforce the ON voxels to be connected to the central voxel. [![image-1600432433860.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/scaled-1680-/image-1600432433860.png)](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/image-1600432433860.png)
[![image-1600428113719.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/scaled-1680-/image-1600428113719.png)](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/image-1600428113719.png) ##### **Magic pen (unconnected)**. Turns voxel ON, which have a 1) similar contrast compared to the central voxel, 2) are within pen's radius. The similarity depends on the color limits chosen for the current contrasts. [![image-1600432118373.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/scaled-1680-/image-1600432118373.png)](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/image-1600432118373.png)
[![image-1600428149703.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/scaled-1680-/image-1600428149703.png)](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/image-1600428149703.png) ##### **Magic pen (connected)**. Turns voxel ON, which have a 1) similar contrast compared to the central voxel, 2) are within pen's radius. and 3) are connected to central voxel via a **region growing approach.** The similarity depends on the color limits chosen for the current contrasts. [![image-1600432170357.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/scaled-1680-/image-1600432170357.png)](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/image-1600432170357.png)
[![image-1600428181303.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/scaled-1680-/image-1600428181303.png)](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/image-1600428181303.png) ##### **Unconstrained 3D region Growing.** Select a pixel by keeping left mouse button pressed. By moving the mouse left/right (while mouse pressed) the similarity threshold can be changed. ![image-1601375047324.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/scaled-1680-/image-1601375047324.png) [![image-1601374884021.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/scaled-1680-/image-1601374884021.png)move the mouse left/right to adapt size ](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/image-1601374884021.png)
[![image-1600428224875.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/scaled-1680-/image-1600428224875.png)](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/image-1600428224875.png) ##### **Polygontool** Use the polygon tool to determine a ROI by its outline. You can either create the outline by holding the mouse button down, or click by click. You can also move points of the outline manually after creation. Use trashcan to delete outline, use the pencil to render the polygon into the current ROI enabled for drawing. [![image-1601375520249.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/scaled-1680-/image-1601375520249.png)](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/image-1601375520249.png) [![image-1601375544409.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/scaled-1680-/image-1601375544409.png)](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/image-1601375544409.png)
#### Creating a ROI To create you always have to give a reference on which basis the underlying geometry the ROI is created. There are several ways to do this: 1. Take an existing onto ROI-tool by dragging the hand-icon [![image-1600368649317.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/scaled-1680-/image-1600368649317.png)](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/image-1600368649317.png) from the viewbar of the image (or the file from patienttable) and decide on the type of creation [![image-1600368594193.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/scaled-1680-/image-1600368594193.png)](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/image-1600368594193.png) The threshold for creation is the lower limit of the current windowing of the contrast 2. Or use the cog-wheel item of the viewbar to do the same thing. [![image-1600368375832.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/scaled-1680-/image-1600368375832.png)](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/image-1600368375832.png) 3. Or just use the "New ROI" button in ROI-tool itself. #### [![image-1600356803683.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/scaled-1680-/image-1600356803683.png) ](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-09/image-1600356803683.png)ROI operations - **Morphological Operations:** NORA provides the typical 4 operations (erosion, dilation, opening and closing) using a 6-neighborhood in the slicing of the ROI matrix, i.e. the size of the neighborhood varies depending on the underlying matrix size. - **Set Operations:** NORA provides intersection, union and set difference. Select - **Remove Salt:** Does a connected component analysis and removes components than the given threshold. #### ROI statistics Open the ROIstats window by clicking on the menubar in the ROI-tool [![image-1601631478257.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-10/scaled-1680-/image-1601631478257.png)](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-10/image-1601631478257.png) The ROI statitics table appears which computes for all possible combinations of contrasts and ROIs currently present in the viewer the following statistics: - median of contrast (percentile 50%) - iqr1/iqr2 - inter quartile ranges (percentile 25% and 75%) - mean/std - mean and standrad deviation - volume (in mL) - area (in cm2, makes only sense when ROI is 2D, or a single slice in the matrix) [![image-1601631457986.png](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-10/scaled-1680-/image-1601631457986.png)](https://www.nora-imaging.org/doc/uploads/images/gallery/2020-10/image-1601631457986.png)