Skip to content

Latest commit

 

History

History
60 lines (41 loc) · 3.54 KB

File metadata and controls

60 lines (41 loc) · 3.54 KB
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
Beginner
Tutorial
Visualization
2D
3D
Open Inventor
Snapshots
Movies
main
identifier title weight parent
visualization_example4
Example for Displaying Images in Open Inventor SoRenderArea
570
visualization

Example 4: Display Images Converted to Open Inventor Scene Objects {#TutorialVisualizationExample4}

{{< youtube "WaD6zuvVNek" >}}

Introduction

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" >}}.

{{}}

Steps to Do

Develop Your Network

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.

SoRenderArea

Add Extension

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.

View2DExtensions

Add Screenshot Gallery to Views Area

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.

Screenshot Gallery

Create Screenshots and Movies

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.

Record Movies and Snapshots

Exercises

  1. Create movies of a 3D scene.

Summary

  • Modules of the SoView2D family create or interact with scene objects and are based on the module SoView2D, which can convert a voxel image into a scene object.
  • The SoRenderArea module provides functionalities for screenshots and movie generation.

{{< networkfile "examples/visualization/example4/VisualizationExample4.mlab" >}}