| title | date | status | draft | weight | tags | menu | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Example 4: Display 2D Images in Open Inventor SoRenderArea |
2022-06-15 08:56:33 +0200 |
OK |
false |
570 |
|
|
{{< youtube "WaD6zuvVNek" >}}
In the previous example you learned how to use the module SoView2DOverlay together with a View2D. MeVisLab provides a whole family of SoView2D* modules (SoView2DOverlay, SoView2DRectangle, SoView2DGrid, ...). These modules are derived from SoView2DExtension, which extends the SoView2D with specialized interaction and rendering. SoView2D itself renders a slice or a slab of a voxel image as a 2D image on the screen.
{{}}
More information about the SoView2D family can be found {{< docuLinks "/Resources/Documentation/Publish/SDK/ToolBoxReference/SoView2DDocPage.html" "here" >}} and in the {{< docuLinks "/Resources/Documentation/Publish/SDK/ToolBoxReference/classSoView2D.html" "SoView2D Reference" >}}.
{{}}
We will start the example by creating an overlay again. Add the following modules and connect them as shown. Select a Threshold and a Comparison Operator for the module Threshold as in the previous example. The module SoView2D converts the image into a scene object. The image as well as the overlay is rendered and displayed by the module SoRenderArea.
You may have noticed that you are not able to scroll through the slices. This functionality is not implemented in the viewer SoRenderArea. To add a set of functionalities and viewer extensions, which are commonly used in conjunction with a 2D viewer, add the module View2DExtensions to the workspace and connect it as shown below. Now, additional information of the image can be displayed in the viewer and you can navigate and scroll through the slices.
With the help of the module SoRenderArea you can record screenshots and movies. Before we do that, open {{< menuitem "View" "Views" "Screenshot Gallery" >}}, to add the Screenshot Gallery to your views area.
If you now select your favorite slice of the bone in the viewer SoRenderArea and press {{< keyboard "F11" >}}, a screenshot is taken and displayed in the Screenshot Gallery. For recording a movie, press {{< keyboard "F9" >}} to start the movie and {{< keyboard "F10" >}} to stop recording. You can find the movie in the Screenshot Gallery.
- Create movies of a 3D scene.
- Modules of the
SoView2Dfamily create or interact with scene objects and are based on the moduleSoView2D, which can convert a voxel image into a scene object. - The
SoRenderAreamodule provides functionalities for screenshots and movie generation.
{{< networkfile "examples/visualization/example4/VisualizationExample4.mlab" >}}



