Example 3: How to blend images over each other
Introduction
In this example we will show you how to blend a 2D image over another one. With the help of the module SoView2DOverlay we will create an overlay, which allows us to highlight all bones in the scan.
Steps to do
Develop your network
Start this example by adding the shown modules, connecting the modules to form a network and loading the example image Bone.tiff.
Open the panel of the module Threshold and configure the module as shown below.
Threshold module is explained
hereThe module Threshold compares the contrast of each voxel of the image with a customized threshold. In this case: If the contrast of the chosen voxel is lower than the threshold, the voxel contrast is replaced by the minimum contrast of the image. If the contrast of the chosen voxel is higher than the threshold, the voxel contrast is replaced by the maximum contrast of the image. With this, we can construct a binary image, which divides the image into bone (white) and no bone (black).
Select output of the Threshold module to see the binary image in Output Inspector.
Overlays
The module SoView2DOverlay blends a 2D image over another one in a 2D viewer. In this case, all voxels with contrast above the Threshold are colored and therefore highlighted. The colored voxels are then blended over the original image. Using the panel of SoView2DOverlay, you can select the color of the overlay.
SoView2DOverlay module is explained
hereExercises
- Play around with different
Thresholdvalues andSoView2DOverlaycolors. - Visualize your generated threshold mask in 3D by using the
View3Dmodule
Summary
- The module
Thresholdapplies a relative or an absolute threshold to a voxel image. - The module
SoView2DOverlayblends an 2D image over another one in a 2D viewer. - You can also use a 3D
SoRenderAreafor the same visualizations. An example can be seen in the next Example 4
SoView2DOverlay module is not intended to work with OrthoView2D; in this case, use a GVROrthoOverlay.




