Visualization

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 1: Synchronous view of two images

Example 1: Synchronous view of two images Introduction In this example we like to use the module SynchroView2D to be able to inspect two different images simultaneously. The module SynchroView2D provides two 2D viewers that are synchronized. As in Tutorial Chapter 1 - Basic Mechanics of MeVisLab, the processed and the unprocessed image can be displayed simultaneously. Scrolling through one image automatically changes the slices of both viewers, so slices with the same slice number are shown in both images.

Example 2: Creating a magnifier

Example 2: Creating a magnifier      This example is also available on YouTube. Introduction Medical images are typically displayed in three different viewing directions (see image): coronal, axial and sagittal. Using the Viewer OrthoView2D you are able to decide, which viewing direction you like to use. In addition to that, you have the opportunity to display all three orthogonal viewing directions simultaneously. Here, we like to display an image of the head in all three viewing directions and mark positions in the image.

Example 3: Image Overlays

Example 3: How to blend images over each other      This example is also available on YouTube. 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.

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.

Matplotlib

Matplotlib Matplotlib, introduced by John Hunter in 2002 and initially released in 2003, is a comprehensive data visualization library in Python. It is widely used among the scientific world as it is easy to grasp for beginners and provides high quality plots and images, that are widely customizable. Info:  The documentation on Matplotlib along with general examples, cheat sheets and a starting guide can be found here. As MeVisLab supports the integration of Python scripts e.

Example 1: Module Setup

Example 1: Module Setup Introduction To be able to access the data needed for our grayscale distribution plots, we need a network consisting of a module that imports DICOM data, a module that differentiates between slices and another that ouputs histogram data. Steps to do Open up your MeVisLab workspace and add the modules LocalImage, SubImage and Histogram to it. Connect the output of LocalImage to the input of SubImage and the output of SubImage with the input of Histogram.

Example 2: 2D Plotting

Example 2: 2D Plotting Introduction In this tutorial, we will equip the macro module we created in the previous tutorial with a responsive and interactable panel to plot grayscale distributions of single slices as well as defined sequences of slices in 2D. Steps to do Open the module definition folder of your macro module and the related .script file in MATE. Then activate the Preview as shown below: Drag the small Preview window to the bottom right corner of your window where it does not bother you.

Example 3: Slice Comparison

Example 3: Slice Comparison Introduction We will adapt the previously created macro module to be able to overlay two defined slices to compare their grayscale distributions. The module we are adapting has been set up in the Example 1: Module Setup tutorial. The panel and two-dimensional plotting functionality has been added in [Example 2: 2D Plotting] (/tutorials/thirdparty/matplotlib/2dplotting). Steps to do At first, we will extend the panel: Open your BaseNetwork macro module within an empty MeVisLab workspace and select the .

Example 4: 3D Plotting

Example 4: 3D Plotting Introduction In this tutorial, we will equip the macro module we created in the Example 1: Module Setup and later on adapted by enabling it to plot grayscale distributions of single slices and sequences in 2D in Example 2: 2D Plotting with a three dimensional plotting functionality. Steps to do The fields and commands needed have already been prepared in the second tutorial. We will just have to modify our .