3D

Chapter II: Open Inventor

Open Inventor modules Introduction In total, there are three types of modules: blue ML modules brown macro modules green Open Inventor modules The names of Open Inventor modules start with the prefix So\* (for Scene Objects). Open Inventor modules process and render 3D scene objects and enable image interactions. Scene objects are transmitted using the semi-circle shaped input and output connectors. With the help of these modules, Open Inventor scenes can be implemented.

Example 1: Open Inventor Objects

Example 1: Open Inventor Objects      This example is also available on YouTube. Introduction In this example we like to construct an Open Inventor scene in which we display three 3D objects of different color and shape. Steps to do Generating Open Inventor Objects First, add the modules SoExaminerViewer and SoCone to the workspace and connect both modules as shown. The module SoCone creates a cone shaped object, which can be displayed in the Viewer SoExaminerViewer.

Example 2: Mouse interactions in Open Inventor

Example 2: Mouse interactions in Open Inventor      This example is also available on YouTube. Introduction In this example, we implement some image or object interactions. We will create a 3D scene, in which we display a cube and change its size using the mouse. We also get to know another viewer, the module SoExaminerViewer. This viewer is important. It enables the rendering of Open Inventor scenes and allows interactions with the Open Inventor scenes.

Example 3: Camera Interactions in Open Inventor

Example 3: Camera Interactions in Open Inventor      This example is also available on YouTube. Introduction In this example, we are learning the basic principles of camera interactions in Open Inventor. We will show the difference between a SoRenderArea and a SoExaminerViewer and use different modules of the SoCamera* group. The SoRenderArea module The module SoRenderArea is a simple renderer for Open Inventor scenes. It offers functionality to record movies and to create snapshots, but does not include an own camera or light.

Chapter III: Visualization

Visualization in MeVisLab Introduction Images and data objects can be rendered in 2D and 3D and interacted with in several ways using a set of tools available through MeVisLab. In this chapter in particular, we will focus on simple image interaction with two- and three-dimensional visualizations. Info:  Not only pixel- and voxel-based data, but also scene objects and 3D scenes can be visualized. See our tutorial on OpenInventorModules for further information.

Example 4: Display 2D images in Open Inventor SoRenderArea

Example 4: Display images converted to Open Inventor scene objects      This example is also available on YouTube. 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, …). All these modules create or interact with scene objects and are based on the module SoView2D, which can convert a voxel-image into a scene object.

Example 5: Volume rendering and interactions

Example 5: Volume rendering and interactions      This example is also available on YouTube. Introduction In this example we like to convert a scan of a head into a 3D scene-object. The scene-object allows to add some textures, interactions and animations. Steps to do Develop your network Implement the following network and open the image $(DemoDataPath)/BrainMultiModal/ProbandT1.tif. SoGVRVolumeRenderer The module SoGVRVolumeRenderer allows volume rendering of 3D and 4D images. Extra Infos:  Additional information about Volume Rendering can be found here: Giga Voxel Renderer Change LUT We like to add a surface color to the head.

Example 6: MeVis Path Tracer

Example 6: MeVis Path Tracer      We have a Short video showing the possibilities of the MeVis Path Tracer on YouTube. Introduction The MeVis Path Tracer offers a Monte Carlo Path Tracing framework running on CUDA GPUs. It offers photorealistic rendering of volumes and meshes, physically based lightning with area lights and soft shadows and fully integrates into MeVisLab Open Inventor (camera, depth buffer, clipping planes, etc.). Extra Infos:  CUDA is a parallel computing platform and programming model created by NVIDIA.

Example 6.1: Volume Rendering vs. Path Tracer

Example 6.1: Volume Rendering vs. Path Tracer Introduction In this example you develop a network to show some differences between volume rendering and the MeVisLab Path Tracer. You will visualize the same scene using both 3D rendering techniques and some of the modules for path tracing. Attention:  The MeVis Path Tracer requires an NVIDIA graphics card with CUDA support. In order to check your hardware, open MeVisLab and add a SoPathTracer module to your workspace.

Example 6.2: Visualization using Path Tracer

Example 6.2: Visualization using SoPathTracer Introduction In this tutorial, we will explain the basics of using the SoPathTracer module in MeVisLab. You will learn how to create a scene, assign materials, add light sources, and configure the PathTracer to generate enhanced renderings. Attention:  The MeVis Path Tracer requires an NVIDIA graphics card with CUDA support. In order to check your hardware, open MeVisLab and add a SoPathTracer module to your workspace.

Example 7: Add 3D viewer to OrthoView2D

Example 7: Add 3D viewer to OrthoView2D      This example is also available on YouTube. Introduction In this example we will use the OrthoView2D module and add a 3D viewer to the layout Cube. Steps to do Develop your network Add the modules LocalImage and OrthoView2D to your workspace and connect them. Network The OrthoView2D module allows you to select multiple layouts. Select layout Cube Equal. The layout shows your image in three orthogonal viewing directions.

Example 8: Vessel Segmentation using SoVascularSystem

Example 8: Vessel Segmentation using SoVascularSystem      This example is also available on YouTube. Introduction In this tutorial, we are using an input mask to create a vessel centerline using the DtfSkeletonization module and visualize the vascular structures in 3D using the SoVascularSystem module. The second part uses the distance between centerline and surface of the vessel structures to color thin vessels red and thick vessels green. Steps to do Develop your network Load the example tree mask by using the LocalImage module.

Example 9: Creating Dynamic 3D Animations using AnimationRecorder

Example 9: Creating Dynamic 3D Animations using AnimationRecorder      This example is also available on YouTube. Introduction In this tutorial, we are using the AnimationRecorder module to generate dynamic and visually appealing animations of our 3D scenes. We will be recording a video of the results of our previous project, particularly the detailed visualizations of the muscles, bones and blood vessels created using PathTracer. Steps to do Open the network and files of Example 6.

Example 4: Subtract 3D objects

Example 4: Subtract 3D objects      This example is also available on YouTube. Introduction In this example, we load an image and render it as WEMIsoSurface. Then we create a 3-dimensional SoSphere and subtract the sphere from the initial WEM. Steps to do Develop your network Add a LocalImage module to your workspace and select load $(DemoDataPath)/BrainMultiModal/ProbandT1.dcm. Add a WEMIsoSurface, a SoWEMRenderer, a SoBackground and a SoExaminerViewer module and connect them as seen below.

Example 5: Clip Planes

Example 5: Clip Planes      This example is also available on YouTube. Introduction In this example, we are using the SoGVRDrawOnPlane module to define the currently visible slice from a 2D view as a clip plane in 3D. Steps to do Develop your network First we need to develop the network to scroll through the slices. Add a LocalImage module to your workspace and select the file ProbandT1 from MeVisLab demo data.

Chapter V: Data Objects

Data Objects in MeVisLab MeVisLab provides pre-defined data objects, e. g. Contour Segmented Objects (CSOs) which are three-dimensional objects encapsulating formerly defined contours within images. Surface Objects (Winged Edge Meshes or WEMs) represent the surface of geometrical figures and allow the user to manipulate them. Markers are used to mark specific locations or aspects of an image and allow to process those later on. Curves can print the results of a function as two-dimensional mathematical graphs into a diagram.

Contour Example 3: 2D and 3D Visualization of Contours

Contour Example 3: Overlay Creation and 3D Visualization of Contours      This example is also available on YouTube. Introduction In this example, we’d like to use the created CSOs to display an overlay. This allows us to mark one of two lungs. In addition to that, we will display the whole segmented lobe of the lung in a 3D image. Steps to do Develop your network Use the network from the contour example 2 and add the modules VoxelizeCSO, SoView2DOverlay and View2D to your workspace.

Surface Objects (WEM)

Surface Objects (WEMs) Introduction In MeVisLab it is possible to create, visualize, process and manipulate surface objects, also known as polygon meshes. Here, we call surface objects Winged Edge Mesh, in short WEM. In this chapter you will get an introduction into WEMs. In addition, you will find examples on how to work with WEMs. For more information on WEMs take a look at the MeVislab Toolbox Reference . If you like to know which WEM formats can be imported into MeVisLab, take a look at the assimp documentation here.

Surface Example 1: Creation of WEMs

Surface Example 1: Create Winged Edge Mesh out of voxel images and CSOs      This example is also available on YouTube. Introduction In this example you will learn how to create a Winged Edge Mesh (WEM). There are several approaches on creating WEMs, a few of them are shown in this example. Instead of creating WEMs, they can also be imported, see chapter Surface Objects (WEM). Steps to do From image to surface: Generating WEMs out of voxel images At first, we will create a WEM out of a voxel image using the module WEMIsoSurface.

Surface Example 2: Processing and Modification of WEM

Surface Example 2: Processing and Modification of WEM      This example is also available on YouTube. Introduction In this example, you will learn how to modify and process WEMs. Steps to do Develop your network Modification of WEMs Use the module WEMLoad to load the file venus.off. Then add and connect the shown modules. We like to display the WEM venus two times, one time this WEM is modified. You can use the module WEMModify to apply modifications.

Surface Example 3: Interactions with WEM

Surface Example 3: Interactions with WEM      This example is also available on YouTube. Introduction In these examples, we are showing 2 different possibilities to interact with a WEM: Scale, rotate and move a WEM in a scene Modify a WEM in a scene Scale, rotate and move a WEM in a scene We are using a SoTransformerDragger module to apply transformations on a 3D WEM object via mouse interactions. Add a SoCube and a SoBackground module and connect both to a SoExaminerViewer.

Surface Example 4: Interactively moving WEM

Surface Example 4: Interactively moving WEM      This example is also available on YouTube. Introduction In this example, we like to interactively move WEMs using SoDragger modules insight a viewer. Develop your network Interactively translating objects in 3D using SoDragger modules Add and connect the following modules as shown. In the panel of the module WEMInitialize select the Model Octasphere. After that, open the viewer SoExaminerViewer and make sure to select the Interaction Mode.

Surface Example 5: WEM - Primitive Value Lists

Surface Example 5: WEM - Primitive Value Lists      This example is also available on YouTube. Introduction WEMs do not only contain the coordinates of nodes and surfaces, they can also contain additional information. These information are stored in so called Primitive Value Lists (PVLs). Every node, every surface and every edge can contains such a list. In these lists, you can for example store the color of the node or specific patient information.

Example 1: Distance between Markers

Example 1: Calculating the distance between markers      This example is also available on YouTube. Introduction In this example, we will measure the distance between one position in an image to a list of markers. Steps to do Develop your network Add the following modules and connect them as shown. We changed the names of the modules SoView2DMarkerEditor and XMarkerLIstContainer, to distinguish these modules from two similar modules we will add later on.

assimp

Asset-Importer-Lib (assimp) Introduction Assimp (Asset-Importer-Lib) is a library to load and process geometric scenes from various 3D data formats. This chapter provides some examples of how 3D formats can be imported into MeVisLab. In general you always need a SoSceneLoader module. The SoSceneLoader allows to load meshes as Open Inventor points/lines/triangles/faces using the Open Asset Import Library. SoSceneLoader You can also use the SoSceneWriter module to export your 3D scenes from MeVisLab into any of the output formats listed below.

Example 1: 3D Printing in MeVisLab

Example 1: 3D Printing in MeVisLab Introduction This example uses the assimp library to load a 3D file and save the file as *.stl for 3D printing. Steps to do Develop your network Add the modules SoSceneLoader, SoBackground and SoExaminerViewer to your workspace and connect them as seen below. Example Network Open the 3D file Select the file vtkCow.obj from MeVisLab demo data directory. Open SoExaminerViewer and inspect the scene. You will see a 3D cow.