Skip to content

Commit f4df147

Browse files
committed
MLAB-6488: rephrased explanation about masking
1 parent 6d68476 commit f4df147

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

mevislab.github.io/content/tutorials/image_processing/image_processing2.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ menu:
1818
{{< youtube "k003ytr8ZQA" >}}
1919

2020
## Introduction
21-
The background of medical images is black for most cases. In the case an image is inverted or window/level values are adapted, these black voxels outside clinical relevant voxels might become very bright or even white.
21+
The background of medical images typically contains small values. When an image is inverted, these small-valued voxels outside clinically relevant regions can become very large-valued. As a result, they appear bright or even white on the screen.
2222

23-
Being in a dark room using a large screen, the user might be blended by these large white regions.
23+
In a dark environment, especially when using a large display, these bright background regions can be uncomfortable to look at.
2424

25-
Image masking is a very good way to select a defined region where image processing shall be applied. A mask allows to define a region (the masked region) to allow image modifications whereas voxels outside the mask remain unchanged.
25+
This effect occurs because the entire image is processed, including regions that are not relevant for analysis. A common way to avoid this is to restrict processing to the relevant regions using image masking. Image masking allows selecting a defined region (the masked region) in which image modifications are applied, while voxels outside the mask remain unchanged.
26+
27+
Beyond avoiding visual artifacts, image masking is generally useful for focusing processing on regions of interest. It helps reduce the influence of irrelevant data, improves the robustness of many algorithms, and can also reduce computation time by limiting operations to a smaller part of the image.
2628

2729
## Steps to Do
2830

@@ -31,29 +33,29 @@ Add a `LocalImage` and a `SynchroView2D` module to your network and connect the
3133

3234
![Example network](images/tutorials/image_processing/network_example2a.png "Example network")
3335

34-
Open the Automatic Panel of the `SynchroView2D` module via context menu {{< mousebutton "right" >}} and selecting {{< menuitem "Show Window" "Automatic Panel" >}}. Set the field <field>synchLUTs</field> to *Yes*.
36+
Open the Automatic Panel of the `SynchroView2D` module via the context menu {{< mousebutton "right" >}} by selecting {{< menuitem "Show Window" "Automatic Panel" >}}. Set the field <field>synchLUTs</field> to *Yes*.
3537

3638
![Synchronize LUTs in SynchroView2D](images/tutorials/image_processing/synchLUTs.png "Synchronize LUTs in SynchroView2D")
3739

38-
Double-click {{< mousebutton "left" >}} the `SynchroView2D` and change window/level values via right mouse button {{< mousebutton "right" >}}. You can see that the background of your images gets very bright and changes based on the LUT are applied to all voxels of your input image - even on the background. Hovering your mouse over the image(s) shows the current gray value under your cursor in [Hounsfield Unit (HU)](https://en.wikipedia.org/wiki/Hounsfield_scale).
40+
Double-click {{< mousebutton "left" >}} the `SynchroView2D` and change window/level values via right mouse button {{< mousebutton "right" >}}. You can see that the background of your images gets very bright and changes based on the LUT are applied to all voxels of your input image &mdash; even to the background. Hovering your mouse over the image(s) shows the current value under your cursor.
3941

4042
![Without masking the image](images/tutorials/image_processing/SynchroView2D_before.png "Without masking the image")
4143

42-
Hovering the mouse over black background voxels shows a value between *0* and about *60*. This means we want to create a mask that only allows modifications on voxels having a gray value larger than *60*.
44+
Hovering the mouse over black background voxels shows a value between *0* and about *60*. This means we want to create a mask that only allows modifications on voxels having a value larger than *60*.
4345

4446
Add a `Mask` and a `Threshold` module to your workspace and connect them as seen below.
4547

4648
![Example network: using Mask](images/tutorials/image_processing/network_example2b.png "Example network: using Mask")
4749

48-
Changing the window/level values in your viewer still also changes background voxels. The `Threshold` module still leaves the voxels as is because the threshold value is configured as larger than *0*. Open the panels of the modules `Threshold` and `Mask` via double-click {{< mousebutton "left" >}} and set the values as seen below.
50+
Changing the window/level values in your viewer still also changes the appearance of background voxels. The `Threshold` module still leaves the voxels as is because the threshold value is configured as larger than *0*. Open the panels of the modules `Threshold` and `Mask` via double-click {{< mousebutton "left" >}} and set the values as seen below.
4951

5052
{{< imagegallery 2
5153
"images/tutorials/image_processing"
5254
"Threshold|Threshold panel"
5355
"Mask|Mask panel"
5456
>}}
5557
56-
Now, all voxels having a value lower or equal *60* are set to *0*, all others are set to *1*. The resulting image from the `Threshold` module is a binary image that can now be used as a mask by the `Mask` module.
58+
Now, all voxels having a value less than or equal to *60* are set to *0*, all others are set to *1*. The resulting image from the `Threshold` module is a binary image that can now be used as a mask by the `Mask` module.
5759

5860
![Output of the Threshold module](images/tutorials/image_processing/OutputInspector_Threshold.png "Output of the Threshold module")
5961

0 commit comments

Comments
 (0)