diff --git a/mevislab.github.io/content/about/about.md b/mevislab.github.io/content/about/about.md index cbce733a6..e6626aa4a 100644 --- a/mevislab.github.io/content/about/about.md +++ b/mevislab.github.io/content/about/about.md @@ -6,7 +6,7 @@ status: "OK" tags: ["Symbols", "Glossary", "Overview"] --- ## Symbols -We embedded three symbols, referencing additional info, tasks and warnings: +We embedded three symbols, referencing additional info, tasks, and warnings: {{}} Provides additional links or info on the current topic. {{}} diff --git a/mevislab.github.io/content/contact.md b/mevislab.github.io/content/contact.md index 5cd49c1f3..e70e8fdb8 100644 --- a/mevislab.github.io/content/contact.md +++ b/mevislab.github.io/content/contact.md @@ -3,12 +3,12 @@ title: "Contact" date: 2022-06-15T08:54:53+02:00 draft: false --- -### Feedback is valuable and always appreciated! +### Feedback is Valuable and Always Appreciated! #### MeVisLab Licensing Having any questions on MeVisLab Licensing? Please contact the [MeVisLab Sales Team](mailto://sales@mevislab.de) -#### MeVisLab forum +#### MeVisLab Forum Searching for a forum to ask your specific MeVisLab questions? Having trouble with functionalities? Ask [here](https://forum.mevislab.de)! Someone else might know the answer. If not - one of our developers will help you out! #### General Questions diff --git a/mevislab.github.io/content/examples/basic_mechanisms/contour_filter/index.md b/mevislab.github.io/content/examples/basic_mechanisms/contour_filter/index.md index 73623a8c0..75792f98e 100644 --- a/mevislab.github.io/content/examples/basic_mechanisms/contour_filter/index.md +++ b/mevislab.github.io/content/examples/basic_mechanisms/contour_filter/index.md @@ -9,7 +9,7 @@ This example shows how to create a contour filter. # Summary Images are loaded via `ImageLoad` module and visualized unchanged in a `View2D` module *View2D1*. -Additionally the images are modified by a local macro module `Filter` and shown in another `View2D` viewer *View2D*. +Additionally, the images are modified by a local macro module `Filter` and shown in another `View2D` viewer *View2D*. In order to display the same slice (unchanged and changed), the module `SyncFloat` is used to synchronize the field value *startSlice* in both viewers. The `SyncFloat` module duplicates the value *Float1* to the field *Float2*. diff --git a/mevislab.github.io/content/examples/basic_mechanisms/macro_modules_and_module_interaction/example1/index.md b/mevislab.github.io/content/examples/basic_mechanisms/macro_modules_and_module_interaction/example1/index.md index 81b98cab1..43ed34991 100644 --- a/mevislab.github.io/content/examples/basic_mechanisms/macro_modules_and_module_interaction/example1/index.md +++ b/mevislab.github.io/content/examples/basic_mechanisms/macro_modules_and_module_interaction/example1/index.md @@ -4,13 +4,13 @@ title: "Panel for the contour filter" category: "basic_mechanisms" --- -# Example 1: Panel for the contour filter +# Example 1: Panel for the Contour Filter This example contains a whole package structure. Inside you can find the example contour filter for which a panel was created. ## Summary -A new macro module `Filter` has been created. Initially macro modules do not provide an own panel containing user interface elements such as buttons. The *Automatic Panel* is shown on double-clicking the module providing the name of the module. +A new macro module `Filter` has been created. Initially, macro modules do not provide an own panel containing user interface elements such as buttons. The *Automatic Panel* is shown on double-clicking the module providing the name of the module. -In this example we update the *\*.script* file of the `Filter` module to display the kernel selection field of the `Convolution` module within its network. +In this example we update the *.script* file of the `Filter` module to display the kernel selection field of the `Convolution` module within its network. {{}} Changes applied to fields in the macro module's panel are applied to their internal network as well. diff --git a/mevislab.github.io/content/examples/basic_mechanisms/macro_modules_and_module_interaction/example2/index.md b/mevislab.github.io/content/examples/basic_mechanisms/macro_modules_and_module_interaction/example2/index.md index bb70e21d0..d61178cc9 100644 --- a/mevislab.github.io/content/examples/basic_mechanisms/macro_modules_and_module_interaction/example2/index.md +++ b/mevislab.github.io/content/examples/basic_mechanisms/macro_modules_and_module_interaction/example2/index.md @@ -4,13 +4,13 @@ title: "Python scripting" category: "basic_mechanisms" --- -# Example 2: Python scripting +# Example 2: Python Scripting This example shows how to create module interactions via Python scripting. ## Summary A new macro module `IsoCSOs` is created providing two viewers in its internal network, `View2D` and `SoExaminerViewer`. Both viewers are included in the panel of the module. -To showcase how Python functions can be implemented in MeVisLab and called from within a module, additional buttons to browse directories and create contours via the `CSOIsoGenerator` are added. Lastly a field listener is implemented reacting to field changes by colorizing contours when the user hovers over them with the mouse. +To showcase how Python functions can be implemented in MeVisLab and called from within a module, additional buttons to browse directories and create contours via the `CSOIsoGenerator` are added. Lastly, a field listener is implemented reacting to field changes by colorizing contours when the user hovers over them with the mouse. ![Screenshot](/examples/basic_mechanisms/macro_modules_and_module_interaction/example2/image2.png) diff --git a/mevislab.github.io/content/examples/basic_mechanisms/viewer_application/index.md b/mevislab.github.io/content/examples/basic_mechanisms/viewer_application/index.md index 33d916c8d..d102d7123 100644 --- a/mevislab.github.io/content/examples/basic_mechanisms/viewer_application/index.md +++ b/mevislab.github.io/content/examples/basic_mechanisms/viewer_application/index.md @@ -4,7 +4,7 @@ title: "Creating a simple application" category: "basic_mechanisms" --- -# Example 3: Creating a simple application +# Example 3: Creating a Simple Application In this example, you will learn how to create a simple prototype application in MeVisLab including a user interface (UI) with 2D and 3D viewers. ![Screenshot](/examples/basic_mechanisms/viewer_application/image.png) diff --git a/mevislab.github.io/content/examples/data_objects/contours/example1/index.md b/mevislab.github.io/content/examples/data_objects/contours/example1/index.md index a8022c56c..dc61f3461 100644 --- a/mevislab.github.io/content/examples/data_objects/contours/example1/index.md +++ b/mevislab.github.io/content/examples/data_objects/contours/example1/index.md @@ -4,8 +4,8 @@ title: "Creation of Contours" category: "data_objects" --- -# Contour Example 1: Creation of contours -Contours are stored as Contour Segmented Objects (CSOs) in MeVisLab. +# Contour Example 1: Creation of Contours +Contours are stored as Contour Segmentation Objects (CSOs) in MeVisLab. This example highlights ways of creating CSOs using modules of the `SoCSOEditor` group. {{}} @@ -27,7 +27,7 @@ The `SoCSOEditor` module group contains several modules, some of which are liste * `SoCSOLiveWireEditor` {{}} -Whenever Contour Segmented Objects are created, they are temporarily stored by and can be managed with the `CSOManager`. +Whenever Contour Segmentation Objects are created, they are temporarily stored by and can be managed with the `CSOManager`. {{}} In this example, contours are created and colors and styles of these CSOs are customized by using the `SoCSOVisualizationSettings` module. @@ -35,8 +35,8 @@ In this example, contours are created and colors and styles of these CSOs are cu ![Screenshot](/examples/data_objects/contours/example1/image.png) ## Summary -+ Contours are stored as their own abstract data type called Contour Segmented Objects (often abbreviated to *CSO*). -+ The `SoEditor` module group contains several useful modules to create, interact with or modify CSOs. ++ Contours are stored as their own abstract data type called Contour Segmentation Objects (often abbreviated to *CSO*). ++ The `SoCSO\*Editor` module group contains several useful modules to create, interact with or modify CSOs. + Created CSOs are temporarily stored and can be managed using the `CSOManager`. # Download diff --git a/mevislab.github.io/content/examples/data_objects/contours/example2/index.md b/mevislab.github.io/content/examples/data_objects/contours/example2/index.md index 1122f2b07..35138b56c 100644 --- a/mevislab.github.io/content/examples/data_objects/contours/example2/index.md +++ b/mevislab.github.io/content/examples/data_objects/contours/example2/index.md @@ -4,11 +4,11 @@ title: "Contour interpolation" category: "data_objects" --- -# Contour Example 2: Contour interpolation +# Contour Example 2: Contour Interpolation This example shows how to interpolate CSOs across slices. ## Summary -In this example, semi-automatic countours are created using the `SoCSOLiveWireEditor` module and their depiction is modified using the `SoCSOVisualizationSettings` module. +In this example, semi-automatic countours are created using the `SoCSOLiveWireEditor` module and their visualization is modified using the `SoCSOVisualizationSettings` module. Additional contours between the manually created ones are generated by the `CSOSliceInterpolator` and added to the `CSOManager`. Different groups of contours are created for the left and right lobe of the lung and colored respectively. diff --git a/mevislab.github.io/content/examples/data_objects/contours/example3/index.md b/mevislab.github.io/content/examples/data_objects/contours/example3/index.md index ffbdd9648..7cbf2282a 100644 --- a/mevislab.github.io/content/examples/data_objects/contours/example3/index.md +++ b/mevislab.github.io/content/examples/data_objects/contours/example3/index.md @@ -4,15 +4,15 @@ title: "2D and 3D visualization of contours" category: "data_objects" --- -# Contour Example 3: 2D and 3D visualization of contours +# Contour Example 3: 2D and 3D Visualization of Contours This example shows how to display CSOs in 2D as an overlay and additionally how the CSOs are displayed in 3D. ## Summary -Images are loaded by using a `LocalImage` module and displayed in a 2D viewer. A `SoCSOLiveWireEditor` is added to draw contours on the images. The `CSOSliceInterpolator` generates additional contours between the manual CSOs by using linear interpolation. +Images are loaded by using a `LocalImage` module and displayed in a 2D viewer. A `SoCSOLiveWireEditor` is added to draw contours on the images. The `CSOSliceInterpolator` generates additional contours between the manually created CSOs by using linear interpolation. -The module `VoxelizeCSO` is used to create a three-dimensional voxel mask of the contours which can be used as an overlay on the images in a `View2D` panel. The `SoView2DOverlay` module defines the color and opacity of the overlay. +The module `VoxelizeCSO` is used to create a three-dimensional voxel mask of the contours that can be used as an overlay on the images in a `View2D` panel. The `SoView2DOverlay` module defines the color and opacity of the overlay. -Lastly the panel of the `View3D` module is used to visualize the voxel mask in 3D. +Lastly, the panel of the `View3D` module is used to visualize the voxel mask in 3D. ![Screenshot](/examples/data_objects/contours/example3/image.png) diff --git a/mevislab.github.io/content/examples/data_objects/contours/example4/index.md b/mevislab.github.io/content/examples/data_objects/contours/example4/index.md index 27ec41c1c..e9e5fd737 100644 --- a/mevislab.github.io/content/examples/data_objects/contours/example4/index.md +++ b/mevislab.github.io/content/examples/data_objects/contours/example4/index.md @@ -4,7 +4,7 @@ title: "Annotation of images" category: "data_objects" --- -# Contour Example 4: Annotation of images +# Contour Example 4: Annotation of Images This example shows how to add annotations to an image. ## Summary diff --git a/mevislab.github.io/content/examples/data_objects/contours/example5/index.md b/mevislab.github.io/content/examples/data_objects/contours/example5/index.md index 410aa725f..564e771b1 100644 --- a/mevislab.github.io/content/examples/data_objects/contours/example5/index.md +++ b/mevislab.github.io/content/examples/data_objects/contours/example5/index.md @@ -4,11 +4,11 @@ title: "Contours and ghosting" category: "data_objects" --- -# Contour Example 5: Contours and ghosting -This image shows how to automatically create CSOs based on ISO values. In addition the visualization of CSOs of previous and subsequent slices is shown. +# Contour Example 5: Contours and Ghosting +This image shows how to automatically create CSOs based on isovalues. In addition, the visualization of CSOs of previous and subsequent slices is shown. ## Summary -In this example, the `CSOIsoGenerator` is used to generate contours based on a given ISO value of the image. Contours are generated in the image where the given ISO value is close to the one configured. These contours are stored in the `CSOManager` and ghosting is activated in the `SoCSOVisualizationSettings`. +In this example, the `CSOIsoGenerator` is used to generate contours based on a given isovalue of the image. Contours are generated in the image where the given isovalue is close to the one configured. These contours are stored in the `CSOManager` and ghosting is activated in the `SoCSOVisualizationSettings`. Ghosting means not only showing contours available on the currently visible slice but also contours of the neighbouring slices with increasing transparency. diff --git a/mevislab.github.io/content/examples/data_objects/curves/example1/index.md b/mevislab.github.io/content/examples/data_objects/curves/example1/index.md index 8c58b9237..8230f5278 100644 --- a/mevislab.github.io/content/examples/data_objects/curves/example1/index.md +++ b/mevislab.github.io/content/examples/data_objects/curves/example1/index.md @@ -4,7 +4,7 @@ title: "Drawing curves" category: "data_objects" --- -# Curves Example: Drawing curves +# Curves Example: Drawing Curves This examples shows how to create and render curves. ![Screenshot](/examples/data_objects/curves/example1/image.png) diff --git a/mevislab.github.io/content/examples/data_objects/markers/example1/index.md b/mevislab.github.io/content/examples/data_objects/markers/example1/index.md index 4d8777d6b..70128d12f 100644 --- a/mevislab.github.io/content/examples/data_objects/markers/example1/index.md +++ b/mevislab.github.io/content/examples/data_objects/markers/example1/index.md @@ -4,7 +4,7 @@ title: "Distance between markers" category: "data_objects" --- -# Marker Example 1: Distance between markers +# Marker Example 1: Distance Between Markers This examples shows how to create markers in a viewer and measure their distance. ![Screenshot](/examples/data_objects/markers/example1/image.png) diff --git a/mevislab.github.io/content/examples/data_objects/surface_objects/example2/index.md b/mevislab.github.io/content/examples/data_objects/surface_objects/example2/index.md index f2aed1280..7ca35ab38 100644 --- a/mevislab.github.io/content/examples/data_objects/surface_objects/example2/index.md +++ b/mevislab.github.io/content/examples/data_objects/surface_objects/example2/index.md @@ -4,8 +4,8 @@ title: "Processing and modification of WEMs" category: "data_objects" --- -# Surface Example 2: Processing and modification of WEMs -This example shows how to process and modify WEMs using the modules `WEMModify`, `WEMSmooth` and `WEMSurfaceDistance`. +# Surface Example 2: Processing and Modification of WEMs +This example shows how to process and modify WEMs using the modules `WEMModify`, `WEMSmooth`, and `WEMSurfaceDistance`. ![Screenshot](/examples/data_objects/surface_objects/example2/DO7_03.png) # Download diff --git a/mevislab.github.io/content/examples/data_objects/surface_objects/example3/index.md b/mevislab.github.io/content/examples/data_objects/surface_objects/example3/index.md index 8b8346799..4e4b29677 100644 --- a/mevislab.github.io/content/examples/data_objects/surface_objects/example3/index.md +++ b/mevislab.github.io/content/examples/data_objects/surface_objects/example3/index.md @@ -5,14 +5,14 @@ category: "data_objects" --- # Surface Example 3: Interactions with WEM -## Scale, rotate and move a WEM in a scene +## Scale, Rotate, and Move a WEM in a Scene In this example, we are using a `SoTransformerDragger` module to apply transformations on a 3D WEM object via mouse interactions. ![Screenshot](/examples/data_objects/surface_objects/example3/image.png) ### Download You can download the example network [here](/examples/data_objects/surface_objects/example3/SurfaceExample3.mlab) -## Interactively modify WEMs +## Interactively Modify WEMs In this example, we are using a `SoWEMBulgeEditor` module to modify a WEM using the mouse. ![Screenshot](/examples/data_objects/surface_objects/example3/image2.png) diff --git a/mevislab.github.io/content/examples/data_objects/surface_objects/example4/index.md b/mevislab.github.io/content/examples/data_objects/surface_objects/example4/index.md index fb057189f..7423dcc55 100644 --- a/mevislab.github.io/content/examples/data_objects/surface_objects/example4/index.md +++ b/mevislab.github.io/content/examples/data_objects/surface_objects/example4/index.md @@ -4,8 +4,8 @@ title: "Interactively moving WEM" category: "data_objects" --- -# Surface Example 4: Interactively moving WEM -This example shows how to use dragger modules, to modify objects in a 3D viewer. +# Surface Example 4: Interactively Moving WEM +This example shows how to use dragger modules to modify objects in a 3D viewer. ![Screenshot](/examples/data_objects/surface_objects/example4/image.png) # Download diff --git a/mevislab.github.io/content/examples/data_objects/surface_objects/example5/index.md b/mevislab.github.io/content/examples/data_objects/surface_objects/example5/index.md index cf12558a0..95cbb7c09 100644 --- a/mevislab.github.io/content/examples/data_objects/surface_objects/example5/index.md +++ b/mevislab.github.io/content/examples/data_objects/surface_objects/example5/index.md @@ -5,7 +5,7 @@ category: "data_objects" --- # Surface Example 5: WEM - Primitive Value Lists -This example shows how to use Primitive Value Lists (PVLs). With the help of PVLs the distance between the surfaces of WEMs is color coded. +This example shows how to use Primitive Value Lists (PVLs). With the help of PVLs, the distance between the surfaces of WEMs is color-coded. ![Screenshot](/examples/data_objects/surface_objects/example5/image.png) # Download diff --git a/mevislab.github.io/content/examples/howto.md b/mevislab.github.io/content/examples/howto.md index 2ef339d4a..ac46244f0 100644 --- a/mevislab.github.io/content/examples/howto.md +++ b/mevislab.github.io/content/examples/howto.md @@ -11,16 +11,16 @@ menu: --- ### Structure -Each tutorial chapter was used as an umbrella theme to structure related examples, that are linked in a list. +Each tutorial chapter was used as an umbrella theme to structure related examples that are linked in a list. After clicking any of the linked examples, you will be forwarded to a short description of the feature and have the option to download the resource that produces your desired effect. -The provided files are usually either \*.mlab files or \*.zip archives. You will find a short tutorial on how to add those files into your MeVisLab application, to work with them, below. +The provided files are usually either *.mlab* files or *.zip* archives. You will find a short tutorial on how to add those files into your MeVisLab application to work with them below. ### MeVisLab (\*.mlab) files -MeVisLab files are networks stored as \*.mlab files.
+MeVisLab files are networks stored as *.mlab* files.
{{}} -Double clicking the left mouse button within your MeVisLab workspace works as a shortcut to open files. +Double-clicking the left mouse button within your MeVisLab workspace works as a shortcut to open files. {{}} Files can also be opened using the menu option {{< menuitem "File" "Open">}}. @@ -38,7 +38,7 @@ The contents can be extracted into the directory of your package. Make sure to k The typical directory structure of a MeVisLab package looks like this: ![Package directory structure](/images/examples/howto_1.png "Package directory structure") -The package *TutorialSummary* within the package group *MeVis* is shown above. A package normally at least contains a *Projects* directory, which is where the macro modules are located. When extracting the contents of a \*.zip file, the *Projects* folder of your package should be the target directory. +The package *TutorialSummary* within the package group *MeVis* is shown above. A package typically contains at least a *Projects* directory, which is where the macro modules are located. When extracting the contents of a *.zip* file, the *Projects* folder of your package should be the target directory. Sometimes we even provide test cases. Extract them into the *TestCases* directory. ![Package directory structure](/images/examples/howto_2.png "Package directory structure") @@ -47,10 +47,10 @@ Sometimes we even provide test cases. Extract them into the *TestCases* director Feel free to create certain directories if they do not exist yet, but make sure to name them conforming the directory structure shown above. {{
}} -Continuing on your MeVisLab workspace: You might need to reload the module cache after adding macro modules out of \*.zip archives for them to be displayed and ready to be used. To do so, open {{< menuitem "Extras" "Reload Module Database (Clear Cache)" >}}. +Continuing on your MeVisLab workspace: You might need to reload the module cache after adding macro modules out of *.zip* archives for them to be displayed and ready to be used. To do so, open {{< menuitem "Extras" "Reload Module Database (Clear Cache)" >}}. -### Python (\*.py) or Script (\*.script) files -In the rare case that a \*.py or \*.script file is provided, make sure to firstly follow the tutorials related to macro modules and test cases. +### Python (\*.py) or Script (\*.script) Files +In the rare case that a *.py* or *.script* file is provided, make sure to firstly follow the tutorials related to macro modules and test cases. {{}} The integration of Python scripts might not add a lot of value for someone that lacks the knowledge conveyed by the tutorials. diff --git a/mevislab.github.io/content/examples/image_processing/example1/index.md b/mevislab.github.io/content/examples/image_processing/example1/index.md index fecc418c6..2b1420588 100644 --- a/mevislab.github.io/content/examples/image_processing/example1/index.md +++ b/mevislab.github.io/content/examples/image_processing/example1/index.md @@ -4,7 +4,7 @@ title: "Arithmetic operations on two images" category: "image_processing" --- -# Image Processing Example 1: Arithmetic operations on two images +# Image Processing Example 1: Arithmetic Operations on Two Images In this example, we apply scalar functions on two images like Add, Multiply, Subtract, etc. ## Summary diff --git a/mevislab.github.io/content/examples/image_processing/example2/index.md b/mevislab.github.io/content/examples/image_processing/example2/index.md index a33fcf121..f6a59398c 100644 --- a/mevislab.github.io/content/examples/image_processing/example2/index.md +++ b/mevislab.github.io/content/examples/image_processing/example2/index.md @@ -4,8 +4,8 @@ title: "Masking images" category: "image_processing" --- -# Image Processing Example 2: Masking images -In this example, we create a simple mask on an image, so that background pixels are not affected by changes of the window/level values. +# Image Processing Example 2: Masking Images +In this example, we create a simple mask on an image, so that background voxels are not affected by changes of the window/level values. ## Summary We are loading images by using the `LocalImage` module and show them in a `SynchroView2D`. The same image is shown in the right viewer of the `SynchroView2D` but with a `Threshold` based `Mask`. diff --git a/mevislab.github.io/content/examples/image_processing/example4/index.md b/mevislab.github.io/content/examples/image_processing/example4/index.md index e1f2c1e1b..16c7f8a2f 100644 --- a/mevislab.github.io/content/examples/image_processing/example4/index.md +++ b/mevislab.github.io/content/examples/image_processing/example4/index.md @@ -4,11 +4,11 @@ title: "Subtract 3D objects" category: "image_processing" --- -# Image Processing Example 4: Subtract 3D objects +# Image Processing Example 4: Subtract 3D Objects In this example, we subtract a sphere from another WEM. ## Summary -We are loading images by using the `LocalImage` module and render them as a 3D scene in a `SoExaminerViewer`. We also add a sphere which is then subtracted from the original image. +We are loading images by using the `LocalImage` module and render them as a 3D scene in a `SoExaminerViewer`. We also add a sphere that is then subtracted from the original image. ![Screenshot](/examples/image_processing/example4/image.png) diff --git a/mevislab.github.io/content/examples/image_processing/example5/index.md b/mevislab.github.io/content/examples/image_processing/example5/index.md index 98ae1bad0..ae4d5dedd 100644 --- a/mevislab.github.io/content/examples/image_processing/example5/index.md +++ b/mevislab.github.io/content/examples/image_processing/example5/index.md @@ -8,7 +8,7 @@ category: "image_processing" In this example, we are using the currently visible slice from a 2D view as a clip plane in 3D. ## Summary -We are loading images by using the `LocalImage` module and render them as a 2-dimensional image stack `SoRenderArea`. The displayed slice is used to create a 3D plane/clip plane in a `SoExaminerViewer`. +We are loading images by using the `LocalImage` module and render them as a two-dimensional image stack `SoRenderArea`. The displayed slice is used to create a 3D plane/clip plane in a `SoExaminerViewer`. ![Screenshot](/examples/image_processing/example5/image.png) diff --git a/mevislab.github.io/content/examples/open_inventor/example1/index.md b/mevislab.github.io/content/examples/open_inventor/example1/index.md index 23f8a9038..7205561ba 100644 --- a/mevislab.github.io/content/examples/open_inventor/example1/index.md +++ b/mevislab.github.io/content/examples/open_inventor/example1/index.md @@ -4,13 +4,13 @@ title: "Open Inventor objects" category: "open_inventor" --- -# Open Inventor Example 1: Open Inventor objects -In this example a simple Open Inventor scene is created. The Open Inventor scene shows three objects of different color and shape. +# Open Inventor Example 1: Open Inventor Objects +In this example, a simple Open Inventor scene is created. The Open Inventor scene shows three objects of different color and shape. ## Summary -A `SoExaminerViewer` is used to render open inventor scenes in 3D. The `SoBackground` module defines the background of the whole scene. +A `SoExaminerViewer` is used to render Open Inventor scenes in 3D. The `SoBackground` module defines the background of the whole scene. -Three 3D objects are created (`SoCone`, `SoSphere` and `SoCube`) having a defined `SoMaterial` module for setting the *DiffuseColor* of the object. The cube and the cone are also transformed by a `SoTransform` module so that they are located next to the centered sphere. +Three 3D objects are created (`SoCone`, `SoSphere`, and `SoCube`) having a defined `SoMaterial` module for setting the *DiffuseColor* of the object. The cube and the cone are also transformed by a `SoTransform` module so that they are located next to the centered sphere. In the end, all three objects including their materials and transformations are added to the `SoExaminerViewer` by a `SoGroup`. diff --git a/mevislab.github.io/content/examples/open_inventor/example2/index.md b/mevislab.github.io/content/examples/open_inventor/example2/index.md index 15927a436..e8ec855bc 100644 --- a/mevislab.github.io/content/examples/open_inventor/example2/index.md +++ b/mevislab.github.io/content/examples/open_inventor/example2/index.md @@ -4,7 +4,7 @@ title: "Mouse interactions in an Open Inventor scene" category: "open_inventor" --- -# Open Inventor Example 2: Mouse interactions in an Open Inventor scene +# Open Inventor Example 2: Mouse Interactions in an Open Inventor Scene This example shows how to implement object interactions. ## Summary diff --git a/mevislab.github.io/content/examples/open_inventor/example4/index.md b/mevislab.github.io/content/examples/open_inventor/example4/index.md index 64c264acd..880f332f8 100644 --- a/mevislab.github.io/content/examples/open_inventor/example4/index.md +++ b/mevislab.github.io/content/examples/open_inventor/example4/index.md @@ -4,7 +4,7 @@ title: "Camera interaction with collision detection" category: "open_inventor" --- -# Open Inventor Example 4: Camera interaction with collision detection +# Open Inventor Example 4: Camera Interaction with Collision Detection This example shows how to implement a camera flight using keyboard shortcuts. Collisions with anatomical structures are detected and the flight stops. In addition to that, the camera object and direction is rendered in another viewer. This example has been taken from the [MeVisLab forum](https://forum.mevislab.de/index.php?topic=3947.0). diff --git a/mevislab.github.io/content/examples/testing/Example1/index.md b/mevislab.github.io/content/examples/testing/Example1/index.md index 4774352b1..5de45d245 100644 --- a/mevislab.github.io/content/examples/testing/Example1/index.md +++ b/mevislab.github.io/content/examples/testing/Example1/index.md @@ -4,7 +4,7 @@ date: 2022-06-15T08:56:33+02:00 category: "testing" --- -# Testing Example 1: Writing a simple test case in MeVisLab +# Testing Example 1: Writing a Simple Test Case in MeVisLab This example shows how to write and execute test cases in MeVisLab. The Python files can be downloaded below. # Download diff --git a/mevislab.github.io/content/examples/testing/example3/index.md b/mevislab.github.io/content/examples/testing/example3/index.md index 3f2884a1d..3ede87d2a 100644 --- a/mevislab.github.io/content/examples/testing/example3/index.md +++ b/mevislab.github.io/content/examples/testing/example3/index.md @@ -4,7 +4,7 @@ date: 2022-06-15T08:56:33+02:00 category: "testing" --- -# Testing Example 3: Iterative tests in MeVisLab with Screenshots +# Testing Example 3: Iterative Tests in MeVisLab with Screenshots In this example you will learn how to write iterative tests in MeVisLab. In addition to that, we create a screenshot of a viewer and add the image to the test report. # Download diff --git a/mevislab.github.io/content/examples/thirdparty/example1/index.md b/mevislab.github.io/content/examples/thirdparty/example1/index.md index c8dbf0b9d..a2c841d03 100644 --- a/mevislab.github.io/content/examples/thirdparty/example1/index.md +++ b/mevislab.github.io/content/examples/thirdparty/example1/index.md @@ -4,7 +4,7 @@ date: 2022-06-15T08:56:33+02:00 category: "thirdparty" --- -# ThirdParty Example 1: OpenCV Webcam access +# ThirdParty Example 1: OpenCV Webcam Access This Python file shows how to access the webcam via OpenCV and use the video via `PythonImage` module in MeVisLab. # Download diff --git a/mevislab.github.io/content/examples/thirdparty/example2/index.md b/mevislab.github.io/content/examples/thirdparty/example2/index.md index f3eff5be1..07e7d366f 100644 --- a/mevislab.github.io/content/examples/thirdparty/example2/index.md +++ b/mevislab.github.io/content/examples/thirdparty/example2/index.md @@ -4,7 +4,7 @@ date: 2022-06-15T08:56:33+02:00 category: "thirdparty" --- -# ThirdParty Example 2: Face detection in OpenCV +# ThirdParty Example 2: Face Detection in OpenCV This Python file shows how to access the webcam and detect faces in the video stream via OpenCV. # Download diff --git a/mevislab.github.io/content/examples/thirdparty/pytorch1/index.md b/mevislab.github.io/content/examples/thirdparty/pytorch1/index.md index 162836a45..48d31b288 100644 --- a/mevislab.github.io/content/examples/thirdparty/pytorch1/index.md +++ b/mevislab.github.io/content/examples/thirdparty/pytorch1/index.md @@ -4,7 +4,7 @@ date: 2022-06-15T08:56:33+02:00 category: "thirdparty" --- -# ThirdParty Example 5: Segmentation in webcam stream by using PyTorch +# ThirdParty Example 5: Segmentation in Webcam Stream by using PyTorch This macro module segments a person shown in a webcam stream by using a pre-trained network from PyTorch (torchvision). ![Screenshot](/images/tutorials/thirdparty/pytorch_example3_10.png) diff --git a/mevislab.github.io/content/examples/visualization/example1/index.md b/mevislab.github.io/content/examples/visualization/example1/index.md index 568468056..faf4ac4d7 100644 --- a/mevislab.github.io/content/examples/visualization/example1/index.md +++ b/mevislab.github.io/content/examples/visualization/example1/index.md @@ -4,7 +4,7 @@ title: "Synchronous view of two images" category: "visualization" --- -# Visualization Example 1: Synchronous view of two images +# Visualization Example 1: Synchronous View of Two Images This very simple example shows how to load an image and apply a basic `Convolution` filter to the image. The image with and without filter is shown in a Viewer and scrolling is synchronized so that the same slice is shown for both images. ![Screenshot](/examples/visualization/example1/image.png) diff --git a/mevislab.github.io/content/examples/visualization/example2/index.md b/mevislab.github.io/content/examples/visualization/example2/index.md index 231f14dea..9dc8b0e17 100644 --- a/mevislab.github.io/content/examples/visualization/example2/index.md +++ b/mevislab.github.io/content/examples/visualization/example2/index.md @@ -4,8 +4,8 @@ title: "Creating a magnifier" category: "visualization" --- -# Visualization Example 2: Creating a magnifier -This example shows how to create a magnifier. Using the module `SubImage` a fraction of the original image can be extracted and enlarged. +# Visualization Example 2: Creating a Magnifier +This example shows how to create a magnifier. Using the module `SubImage`, a fraction of the original image can be extracted and enlarged. ![Screenshot](/examples/visualization/example2/image.png) # Download diff --git a/mevislab.github.io/content/examples/visualization/example3/index.md b/mevislab.github.io/content/examples/visualization/example3/index.md index 51685c6f2..8dc962e8f 100644 --- a/mevislab.github.io/content/examples/visualization/example3/index.md +++ b/mevislab.github.io/content/examples/visualization/example3/index.md @@ -4,7 +4,7 @@ title: "Image overlays" category: "visualization" --- -# Visualization Example 3: Image overlays +# Visualization Example 3: Image Overlays This example shows the creation of an overlay. Using the module `SoView2DOverlay`, an overlay can be blended over a 2D image. ![Screenshot](/examples/visualization/example3/image.png) diff --git a/mevislab.github.io/content/examples/visualization/example4/index.md b/mevislab.github.io/content/examples/visualization/example4/index.md index c072c8e63..4f10381c2 100644 --- a/mevislab.github.io/content/examples/visualization/example4/index.md +++ b/mevislab.github.io/content/examples/visualization/example4/index.md @@ -4,7 +4,7 @@ title: "Display images converted to Open Inventor scene objects" category: "visualization" --- -# Visualization Example 4: Display images converted to Open Inventor scene objects +# Visualization Example 4: Display Images Converted to Open Inventor Scene Objects This example shows how to convert images to Open Inventor scene objects using the module `SoView2D` and modules based on `SoView2D`. ![Screenshot](/examples/visualization/example4/image.png) diff --git a/mevislab.github.io/content/examples/visualization/example5/index.md b/mevislab.github.io/content/examples/visualization/example5/index.md index d0c719454..8c7c53f5b 100644 --- a/mevislab.github.io/content/examples/visualization/example5/index.md +++ b/mevislab.github.io/content/examples/visualization/example5/index.md @@ -4,7 +4,7 @@ title: "Volume rendering and interactions" category: "visualization" --- -# Visualization Example 5: Volume rendering and interactions +# Visualization Example 5: Volume Rendering and Interactions This example shows the volume rendering of a scan. The texture of the volume is edited and animations are implemented. ![Screenshot](/examples/visualization/example5/image.png) diff --git a/mevislab.github.io/content/introduction/introduction.md b/mevislab.github.io/content/introduction/introduction.md index 1e4324932..6112f813d 100644 --- a/mevislab.github.io/content/introduction/introduction.md +++ b/mevislab.github.io/content/introduction/introduction.md @@ -29,21 +29,21 @@ a [*Software Development Kit (SDK)*](/glossary/#mevislab-sdk) and an [*Applicati In turn, the *MeVisLab SDK* consists of an [*Integrated Development Environment (IDE)*](/glossary/#mevislab-ide) for visual programming and the advanced text editor [*MATE*](/glossary/#mevislab-mate) for Python -scripting, providing code completion, debugging, profiling and automated +scripting, providing code completion, debugging, profiling, and automated test development as well as execution. You can re-use thousands of pre-defined [*Modules*](/glossary/#module) for image processing -(2D up to 6D images) and visualization, combine them or even build your own. +(2D up to 6D images) and visualization, combine them, or even build your own. A quick introduction on available modules and [example networks](/glossary/#example-network) will be given in the following tutorials. -### Structure and usage of provided tutorials +### Structure and Usage of Provided Tutorials This tutorial is a hands-on training. You will learn about basic mechanics and features of MeVisLab. Starting with this introduction, we will be leading you through all relevant aspects of the user interface, -commonly used functionalities and provide you with all the basic knowledge you need to build your own web applications. +commonly used functionalities, and provide you with all the basic knowledge you need to build your own web applications. Additional information is accessible through embedded links, forwarding you to a related glossary entry or tutorial and shortcuts, advice and hints will be highlighted as shown [here](/about/about/). @@ -51,7 +51,7 @@ The tutorials are divided into chapters by their topic and each chapter contains You find them at the end of the tutorial or, also sorted by chapters, under the menu entry [Examples](/examples/howto). The examples under the designated menu entry are more suitable if you already have a little experience and rather search for inspiration than for explanations. -### Starting MeVisLab for the first time +### Starting MeVisLab for the First Time Right after installation of MeVisLab, you will find some new icons on your Desktop (if selected during setup). @@ -73,14 +73,14 @@ First, start the MeVisLab IDE. After the Welcome Screen, the standard user inter By default, MeVisLab starts with an empty [workspace](/glossary/#workspace). -This is where you will be developing and editing networks. Networks essentially form the base of all processing and visualization pipelines, so the workspace is, where the visual programming is done. +This is where you will be developing and editing networks. Essentially, networks form the base of all processing and visualization pipelines, so the workspace is where the visual programming is done. #### Views Area The standard [Views Area](/glossary/#views-area) contains the [Output Inspector and Module Inspector](./tutorials/basicmechanisms#The_Output_Inspector_and_the_Module_Inspector "Output Inspector and Module Inspector"). With the help of the Output Inspector, you can visualize the modules output. {{}} -Further information on each module, e. g. about [module parameters](/glossary/#field), can be found using the [Module Inspector](/glossary/#module-inspector). +Further information on each module, e.g., about [module parameters](/glossary/#field), can be found using the [Module Inspector](/glossary/#module-inspector). {{}} #### Debug Output @@ -90,7 +90,7 @@ Debugging information can be found using the [Debug Output](/glossary/#debug-out The MeVisLab IDE and its layout are completely configurable. You can rearrange the items and add new views via {{< menuitem "Main Menu" "View" "Views" >}}. -### Filetypes used in, for and with MeVisLab +### File Types Used in, for, and With MeVisLab {{< bootstrap-table table_class="table table-striped" >}} |
Extension
| Description | @@ -104,14 +104,14 @@ rearrange the items and add new views via {{< menuitem "Main Menu" "View" "Views | `.dcm` | DCM part of the imported DICOM file, see [Importing DICOM Data](./tutorials/basicmechanisms/dataimport#DICOMImport "Importing DICOM Data"). | {{< /bootstrap-table >}} -### Module types {#Module_Types} +### Module Types {#Module_Types} {{}} [Modules](/glossary/#module) are the basic entities the MeVisLab concept is built upon.
-They provide the functionalities to process, display and interact with images. +They provide the functionalities to process, display, and interact with images. {{
}} -The three existing module types (ML, [Open Inventor](/glossary/#open-inventor) and [macro module](/glossary/#macro-module)) can be distinguished by their colors: +The three existing module types (ML, [Open Inventor](/glossary/#open-inventor), and [macro module](/glossary/#macro-module)) can be distinguished by their colors: {{< bootstrap-table table_class="table table-striped" >}} |
Type
|
Appearance
| Characteristics | @@ -121,7 +121,7 @@ The three existing module types (ML, [Open Inventor](/glossary/#open-inventor) a | Macro module (brown) | ![Macro module](/images/tutorials/introduction/MLMModuleMacro.png "Macro module") | Combination of other module types, allowing the implementation of hierarchies and scripted interaction. | {{< /bootstrap-table >}} -### Invalid modules +### Invalid Modules If a module is invalid, it is displayed in bright red. This might happen if the module itself is not available for your system. @@ -140,22 +140,22 @@ Once the debug console is cleared, the warning and error indicators next to the module are also cleared. {{
}} -Informational messages are indicated in a similar matter on the same spot, but in a subtle grey color. +Informational messages are indicated in a similar matter on the same spot, but in a subtle gray color. -### Module interactions through the Context Menu +### Module Interactions Through the Context Menu Each module has a context menu, providing the following options: ![Context Menu of a module](/images/tutorials/introduction/ModuleContextMenu.png "Context Menu of a module") * **Show Internal Network:** [Macro modules](/glossary/#macro-module) provide an entry to open the internal network. You can see what happens inside a macro module. The internal network may also contain other macro modules. -* **Show Window:** If a module does not provide an User Interface, you will see the automatic panel, showing the module's name. Modules may additionally have one or more windows which can be opened. You can also open the Scripting Console of a module to integrate Python. +* **Show Window:** If a module does not provide a User Interface, you will see the automatic panel showing the module's name. Modules may additionally have one or more windows that can be opened. You can also open the Scripting Console of a module to integrate Python. * **Instance Name:** You can edit or copy the instance name. Renaming can be useful if the same module appears more than once in one network and/or if you want to access and distinguish the modules in your Python script. * **Help:** The menu entry Help provides access to the Module Help pages and to an example network where the module is used. This example network often helps to understand which additional modules can be added to create your desired effect. * **Extras:** Automated tests written for the specific module can be executed here. You can also run this module in a separate process. -* **Reload Definition:** In case you are currently working on a module, you may need to reload the definition so that your changes are applied on the module (for example attached Python scripts). -* **Related Files:** Related files allows a quick access to the modules *\*.script* or *\*.py* files. The files are automatically opened in [MATE](/glossary/#mevislab-mate) for editing. +* **Reload Definition:** In the case you are currently working on a module, you may need to reload the definition so that your changes are applied on the module (for example, attached Python scripts). +* **Related Files:** Related files allows a quick access to the modules *.script* or *.py* files. The files are automatically opened in [MATE](/glossary/#mevislab-mate) for editing. * **Show Enclosing Folder:** This entry opens the directory where your module is stored. -* **Grouping:** Multiple modules can be clustered and the groups can be named. This adds clarity to the structure of your network. In addition to that, grouped modules can be converted to local- or global macro modules easily. +* **Grouping:** Multiple modules can be clustered and the groups can be named. This adds clarity to the structure of your network. In addition to that, grouped modules can be converted to local or global macro modules easily. ### Input and Output Connectors {#Module_Connectors} As the creation of a network requires connected modules, each module has input and output connectors, located on their top and bottom side. Data is transmitted from the output connector on the top side of one module to the input connector on another module's bottom side. @@ -176,30 +176,30 @@ A connection can be established by dragging one module close to the other. Some modules even contain hidden connectors in addition to the ones displayed on the module's surface. Click on the workspace and press {{< keyboard "SPACE" >}} to see the hidden connectors as well as the internal networks of each module. You can now also use the hidden connectors for building connections. -For more information about connectors and different types of connections click {{< docuLinks "/Resources/Documentation/Publish/SDK/MeVisLabManual/ch03s03.html" "here" >}}.
-If you want to know more about establishing, interrupting, moving and replacing connections, have a look at {{< docuLinks "/Resources/Documentation/Publish/SDK/MeVisLabManual/ch03s04.html" "this." >}} +For more information about connectors and different types of connections, click {{< docuLinks "/Resources/Documentation/Publish/SDK/MeVisLabManual/ch03s03.html" "here" >}}.
+If you want to know more about establishing, removing, moving, and replacing connections, have a look at {{< docuLinks "/Resources/Documentation/Publish/SDK/MeVisLabManual/ch03s04.html" "this." >}} ### Parameter Connections Besides through a module's input and output connectors, connections can also be established between parameters in the module's panel. {{}} -An exemplary use-case for a parameter connection is synchronization. Have a look [here](/tutorials/basicmechanisms/#TutorialParameterConnection). +An exemplary use case for a parameter connection is synchronization. Have a look [here](/tutorials/basicmechanisms/#TutorialParameterConnection). {{}} -### Macro modules {#Macro_Modules} +### Macro Modules {#Macro_Modules} {{}} -The creation of macros is furtherly explained in [Tutorial Chapter I - Example 2.2](/tutorials/basicmechanisms/macromodules/globalmacromodules) +The creation of macros is explained in more detail in [Tutorial Chapter I - Example 2.2](/tutorials/basicmechanisms/macromodules/globalmacromodules) {{}} -### Adding modules to your workspace {#Searching_and_Adding_Modules} +### Adding Modules to your Workspace {#Searching_and_Adding_Modules} There are several ways to add a module to your current network: -- via the menu bar entry {{< menuitem "Modules" >}}. -- via {{< menuitem "Quick Search" >}}. -- via the View Module Search. -- via the View Module Browser. -- via copy and paste from another network. +- via the menu bar entry {{< menuitem "Modules" >}} +- via {{< menuitem "Quick Search" >}} +- via the View Module Search +- via the View Module Browser +- via copy and paste from another network - by scripting, see the {{< docuLinks "/Resources/Documentation/Publish/SDK/ScriptingReference/index.html" "Scripting Reference" >}} Both the menu entry{{< menuitem "Modules" >}} and the Module Browser display all available modules. The modules are sorted hierarchically by topic and name, as defined in the file `Genre.def`. @@ -210,23 +210,23 @@ Therefore, both places are a good starting point when in need of a specific func The advantage of the Module Browser is that you can right-click {{< mousebutton "right" >}} the entries, open the context menu and, for example, open the help (in your -default Internet browser) or the module files (in MATE, the in-built +default Internet browser) or the module files (in MATE, the built-in text editor). {{}} For a module to be listed, it has to be available in the [SDK](/glossary/#mevislab-sdk) or in your self-defined -[packages](/glossary/#package). A detailed tutorial on how to create packages, can be found [here](/tutorials/basicmechanisms/macromodules/package/). If in doubt or missing something, check out the loaded packages in the preferences. +[packages](/glossary/#package). A detailed tutorial on how to create packages can be found [here](/tutorials/basicmechanisms/macromodules/package/). If in doubt or missing something, check out the loaded packages in the preferences. {{}} -Usually the quickest way to add modules to a network is the quick search in the menu bar. It offers you the possibility to search for modules by module name. By default, the search will also be extended to keywords and substrings and is case-insensitive. To change these settings, click the magnifier button for the search options. +Usually the quickest way to add modules to a network is the quick search in the menu bar. It offers the possibility to search for modules by module name. By default, the search will also be extended to keywords and substrings and is case-insensitive. To change these settings, click the magnifier button for the search options. ![Quick Search Options](/images/tutorials/introduction/MLMQuickSearch.png "Quick Search Options") {{}} -Any time you enter something in the MeVisLab GUI while not being in a dialog window, your entry will be put into the quick search automatically. +Any time you enter something in the MeVisLab GUI while not focussing a dialog window, your entry will be put into the quick search automatically. {{}} - Use the {{< keyboard "ArrowUp" >}} and {{< keyboard "ArrowDown" >}} keys on your keyboard to move to one of the listed modules. The module's decription will appear next to it, allowing you to decide if this is the right module for your use-case. + Use the {{< keyboard "ArrowUp" >}} and {{< keyboard "ArrowDown" >}} keys on your keyboard to move to one of the listed modules. The module's decription will appear next to it, allowing you to decide if this is the right module for your use case. ![Quick Search Results](/images/tutorials/introduction/GSExampleNetworkViewImage02.png "Quick Search Results") diff --git a/mevislab.github.io/content/tutorials/basicmechanisms.md b/mevislab.github.io/content/tutorials/basicmechanisms.md index f40b522d6..6ec13cb77 100644 --- a/mevislab.github.io/content/tutorials/basicmechanisms.md +++ b/mevislab.github.io/content/tutorials/basicmechanisms.md @@ -26,20 +26,20 @@ Additional information on the basics of MeVisLab are explained {{< docuLinks "/R ### Loading Data {#TutorialLoadingData} -First, we need to load the data we would like to work on, e.g. a CT scan. In MeVisLab, modules are used to perform their associated specific task, they are the basic entities you will be working with. Each module has a different functionality for processing, visualization and interaction. Connecting modules enables the development of complex processing pipelines. You will get to know different types of modules throughout the course of this tutorial. +First, we need to load the data we would like to work on, e.g., a CT scan. In MeVisLab, modules are used to perform their associated specific task: they are the basic entities you will be working with. Each module has a different functionality for processing, visualization, and interaction. Connecting modules enables the development of complex processing pipelines. You will get to know different types of modules throughout the course of this tutorial. Starting off, we will add the module `ImageLoad` to our network to load our data. The module can be found by typing its name into the search bar on the top-right corner and is added to your network by clicking it. ![Search for ImageLoad](/images/tutorials/basicmechanics/BM_01.png "Search for ImageLoad") -Next, we select and load the data we'd like to process. Double-click the module `ImageLoad` to open its panel. You can browse through your folders to select the data you'd like to open. Example data can be found in the MeVisLab DemoData directory *$(InstallDir)/Packages/MeVisLab/Resources/DemoData* located in the MeVisLab installation path. Select a file, for example an MRI scan of a shoulder *Shoulder_Fracture.tif*. The image is loaded immediately and basic information of the loaded image can be seen in the Panel. +Next, we select and load the data we'd like to process. Double-click the module `ImageLoad` to open its panel. You can browse through your folders to select the data you'd like to open. Example data can be found in the MeVisLab DemoData directory *$(InstallDir)/Packages/MeVisLab/Resources/DemoData* located in the MeVisLab installation path. Select a file, for example, an MRI scan of a shoulder *Shoulder_Fracture.tif*. The image is loaded immediately and basic information of the loaded image can be seen in the Panel. {{}} There also are modules to load multiple other formats of data. These are the most common ones: * `DicomImport` to load DICOM Images * `LocalImage` to load any image format -For a more detailed description on loading DICOM images, look {{< docuLinks "/Resources/Documentation/Publish/SDK/GettingStarted/ch03.html" "here">}} +For a more detailed description on loading DICOM images, see {{< docuLinks "/Resources/Documentation/Publish/SDK/GettingStarted/ch03.html" "here">}} {{}} @@ -101,14 +101,14 @@ By dragging the connection away from either the input or the output connector, t Connections between compatible outputs and inputs are established automatically if two modules get close enough to each other. {{}} -Connecting, Disconnecting, Moving and Replacing Connections is furtherly explained {{< docuLinks "/Resources/Documentation/Publish/SDK/MeVisLabManual/ch03s04.html" "here" >}} +Connecting, Disconnecting, Moving, and Replacing Connections is explained in more detail {{< docuLinks "/Resources/Documentation/Publish/SDK/MeVisLabManual/ch03s04.html" "here" >}} {{}} [//]: <> (MVL-653) ### Image Processing {#TutorialImageProcessing} -An average kernel will be used to smooth the image out as our next step will be to actually process our image. Add the `Convolution`module to your workspace and disconnect the `View2D`module from the `ImageLoad`module by clicking on the connection and pressing {{< keyboard "DEL" >}}. Now, you can build new connections from the module `ImageLoad` to the module `Convolution` and the `Convolution`module to `View2D`. +An average kernel will be used to smooth the image as our next step will be to actually process our image. Add the `Convolution` module to your workspace and disconnect the `View2D` module from the `ImageLoad` module by clicking on the connection and pressing {{< keyboard "DEL" >}}. Now, you can build new connections from the module `ImageLoad` to the module `Convolution` and the `Convolution` module to `View2D`. ![Convolution Module](/images/tutorials/basicmechanics/BM_08.png "Convolution Module") @@ -118,9 +118,9 @@ Open the panel of the `Convolution` module by double-clicking it. The panel allo The module `View2D` is now displaying the smoothed image. -To compare the processed and unprocessed image, click on the output connector of the module `ImageLoad` to display the original image in the Output Inspector. The Output Inspectors greatest advantage is, that it's able to display the output of any connector in the process chain (as long as an interpretable format is used). Simply click the connector or connection to find out more about the module output. +To compare the processed and unprocessed image, click on the output connector of the module `ImageLoad` to display the original image in the Output Inspector. The Output Inspectors greatest advantage is that it's able to display the output of any connector in the process chain (as long as an interpretable format is used). Simply click the connector or connection to find out more about the module output. -You can also inspect changes between processed (output connector) and unprocessed (input connector) images by adding a second or even third viewer to your network."Layers" of applied changes can be inspected next to each other using more than one viewer and placing as well as connecting them accordingly. We will be using a second `View2D`-module. Notice how the second Viewer is numbered for you to be able to distinguish them better. It might be important to know at this point, that numerous connections can be established from one output-connector but an input-connector can only receive one stream of data. Please connect the module `ImageLoad` to the second viewer to display the images twice. You can now scroll through the slices of both viewers and inspect the images. +You can also inspect changes between processed (output connector) and unprocessed (input connector) images by adding a second or even third viewer to your network. "Layers" of applied changes can be inspected next to each other using more than one viewer and placing as well as connecting them accordingly. We will be using a second `View2D` module. Notice how the second viewer is numbered for you to be able to distinguish them better. It might be important to know at this point that numerous connections can be established from one output connector but an input connector can only receive one stream of data. Please connect the module `ImageLoad` to the second viewer to display the images twice. You can now scroll through the slices of both viewers and inspect the images. ![Multiple Viewers](/images/tutorials/basicmechanics/BM_10.png "Multiple Viewers") @@ -134,14 +134,14 @@ In order to practise establishing parameter connections, add the `SyncFloat` mod ![SyncFloat Module](/images/tutorials/basicmechanics/BM_11.png "SyncFloat Module") -We will be synchronizing the *startSlice* fields of our viewers, to be able to directly compare the effect our processing module has on the slices: +We will be synchronizing the *startSlice* fields of our viewers to be able to directly compare the effect our processing module has on the slices: Right-click the viewer `View2D` to open its context menu and select {{< menuitem "Show Window" "Automatic Panel" >}}. ![Automatic Panel View2D](/images/tutorials/basicmechanics/BM_12.png "Automatic Panel View2D") Doing so shows all parameter fields of the module `View2D`. -Search for the field *startSlice*. The field indicates which slice is currently shown in the viewer. If you scroll through the slices of an image the value of *startSlice* changes. +Search for the field *startSlice*. The field indicates which slice is currently shown in the viewer. If you scroll through the slices of an image, the value of *startSlice* changes. Now, double-click the module `SyncFloat` to open its panel. @@ -149,7 +149,7 @@ Click on the label *startSlice* in the automatic panel of the module `View2D`, k ![Synchronize StartSlice](/images/tutorials/basicmechanics/BM_13.png "Synchronize StartSlice") -The connection is drawn as a thin grey arrow between both modules with the arrowhead pointing to the module that receives the field value as input. The value of the field *starSlice* is now transmitted to the field *Float1*. Changing *StartSlice* automatically changes *Float1*, but not the other way round. +The connection is drawn as a thin gray arrow between both modules with the arrowhead pointing to the module that receives the field value as input. The value of the field *startSlice* is now transmitted to the field *Float1*. Changing *startSlice* automatically changes *Float1*, but not the other way round. ![Parameter Connection StartSlice](/images/tutorials/basicmechanics/BM_14.png "Parameter Connection StartSlice") @@ -161,11 +161,11 @@ As a result, scrolling through the slices with the mouse wheel {{< mousebutton " ![Your final Network](/images/tutorials/basicmechanics/BM_16.png "Your final Network") -It is also possible to use the pre-defined module `SynchroView2D` to accomplish a similar result.(`SynchroView2D`'s usage is futherly described in [this chapter](/tutorials/visualization/visualizationexample1/) ). +It is also possible to use the pre-defined module `SynchroView2D` to accomplish a similar result.(`SynchroView2D`'s usage is described in more detail in [this chapter](/tutorials/visualization/visualizationexample1/) ). -### Grouping modules {#TutorialGroupingModules} +### Grouping Modules {#TutorialGroupingModules} -A contour filter can be created based on our previously created network. To finalize the filter, add the modules `Arithmetic2` and `Morphology` to your workspace and connect the modules as shown below. Double-click the module `Arithmetic2` to open its panel. Change the field *Function* of the module `Arithmetic2` to use the function *subtract* in the panel of the module. The contour filter is done now. You can inspect each processing step using the Output Inspector by clicking on the input and output connectors of the respective modules. The final results can be displayed using the viewer modules. If necessary, adjust the contrast by pressing the right arrow key and moving the cursor. +A contour filter can be created based on our previously created network. To finalize the filter, add the modules `Arithmetic2` and `Morphology` to your workspace and connect the modules as shown below. Double-click the module `Arithmetic2` to open its panel. Change the field *Function* of the module `Arithmetic2` to use the function *subtract* in the panel of the module. The contour filter is done now. You can inspect each processing step using the Output Inspector by clicking on the input and output connectors of the respective modules. The final results can be displayed using the viewer modules. If necessary, adjust the contrast by pressing the right mouse button and moving the cursor. ![Grouping modules](/images/tutorials/basicmechanics/BM_17.png "Grouping modules") @@ -173,11 +173,11 @@ If you'd like to know more about specific modules, search for help. You can do t ![Module Help](/images/tutorials/basicmechanics/BM_18.png "Module Help") -To be able to better distinguish the image processing pipeline, you can encapsulate it in a group: Select the three modules, for example by dragging a selection rectangle around them. Then right-click the selection to open the context menu and select {{< menuitem "Add to New Group" >}}. +To be able to better distinguish the image processing pipeline, you can encapsulate it in a group: Select the three modules, for example, by dragging a selection rectangle around them. Then right-click the selection to open the context menu and select {{< menuitem "Add to New Group" >}}. ![Add modules to new group](/images/tutorials/basicmechanics/BM_19.png "Add to new group") -Enter a name for the new group, for example *Filter*. The new group is created and displayed as a green rectangle. The group allows for quick interactions with all its modules. +Enter a name for the new group, for example, *Filter*. The new group is created and displayed as a green rectangle. The group allows for quick interactions with all its modules. ![Your Filter Group](/images/tutorials/basicmechanics/BM_20.png "Your Filter Group") @@ -191,12 +191,12 @@ More information on module groups can be found {{< docuLinks "/Resources/Documen [//]: <> (MVL-653) -### Macro modules {#TutorialMacroModules} +### Macro Modules {#TutorialMacroModules} You have probably already noticed how the modules differ in color. Each color represents another type of module: - * The blue modules are called ML modules, they process voxel images. - * Green modules are OpenInventor modules, they enable visual 3D scene graphs. + * The blue modules are called ML modules: they process voxel images. + * Green modules are OpenInventor modules: they enable visual 3D scene graphs. * The brown modules are called macro modules. Macro modules encapsulate a whole network in a single module. To condense our filter into one single module, we will now be creating a macro module out of it. To do that, right-click on the group title and select *Convert To Local Macro*. Name your new macro module and finish. You just created a local macro module. Local macros can only be used from networks in the same or any parent directory. diff --git a/mevislab.github.io/content/tutorials/basicmechanisms/coordinatesystems/coordinatesystems.md b/mevislab.github.io/content/tutorials/basicmechanisms/coordinatesystems/coordinatesystems.md index 5bfcff143..846f9396f 100644 --- a/mevislab.github.io/content/tutorials/basicmechanisms/coordinatesystems/coordinatesystems.md +++ b/mevislab.github.io/content/tutorials/basicmechanisms/coordinatesystems/coordinatesystems.md @@ -25,24 +25,24 @@ The blue rectangle shows the same region in the three coordinate systems. ![Coordinate Systems in MeVisLab](/images/tutorials/basicmechanics/GSExampleImageProcessing10b.png "Coordinate Systems in MeVisLab") -## World coordinates +## World Coordinates World coordinates are: * Global: Combine several objects in a view * Isotropic: All directions are equivalent * Orthogonal: Coordinate axes are orthogonal to each other -The origin of the world coordinate system can be anywhere and is not clearly defined. Origins of the other coordinate systems can always be mapped to the world coordinate system. In case of DICOM images, this mapping is defined by DICOM tags. +The origin of the world coordinate system can be anywhere and is not clearly defined. Origins of the other coordinate systems can always be mapped to the world coordinate system. In the case of DICOM images, this mapping is defined by DICOM tags. -### World coordinates in MeVisLab +### World Coordinates in MeVisLab You can show the world coordinates in MeVisLab by using the following example network: ![World Coordinates in MeVisLab](/images/tutorials/basicmechanics/WorldCoordinates.png "World Coordinates in MeVisLab") -The `ConstantImage` module generates an artificial image with a certain size, data type and a constant fill value. The origin of the image is at the origin of the world coordinate system, therefore the `SoCoordinateSystem` module shows the world coordinate system. In order to have a larger z-axis, open the panel of the `ConstantImage` module and set *IMage Size* for *Z* to *256*. +The `ConstantImage` module generates an artificial image with a certain size, data type, and a constant fill value. The origin of the image is at the origin of the world coordinate system, therefore the `SoCoordinateSystem` module shows the world coordinate system. In order to have a larger z-axis, open the panel of the `ConstantImage` module and set *IMage Size* for *Z* to *256*. ![ConstantImage Info](/images/tutorials/basicmechanics/ConstantImageInfo.png "ConstantImage Info") -Placing an object into the Open Inventor Scene of the `SoExaminerViewer`, in this case a `SoCube` with *width*, *height* and *depth* of 10, places the object to the origin of the world coordinate system. +Placing an object into the Open Inventor Scene of the `SoExaminerViewer`, in this case a `SoCube` with *width*, *height*, and *depth* of 10, places the object to the origin of the world coordinate system. ![SoCube in world coordinate system](/images/tutorials/basicmechanics/SoCubeWorldCoordinates.png "SoCube in world coordinate system") @@ -52,19 +52,19 @@ You can move an object in your scene, for example by using a `SoTranslation` mod ![SoTranslation](/images/tutorials/basicmechanics/SoTranslation.png "SoTranslation") ### Transformations -More complex transformations can be done by using the `SoTransform` module. You can not only translate an existing object, but also rotate, scale and apply many other transformations. +More complex transformations can be done by using the `SoTransform` module. You can not only translate an existing object, but also rotate, scale, and apply many other transformations. ![SoTransform](/images/tutorials/basicmechanics/SoTransform.png "SoTransform") {{< networkfile "/examples/basic_mechanisms/coordinatesystems/WorldCoordinates.mlab" >}} -## Voxel coordinates +## Voxel Coordinates Voxel coordinates are: * Relative to an image * Continuous from [0..x,0..y,0..z], voxel center at 0.5 * Direct relation to voxel location in memory -### Voxel coordinates in MeVisLab +### Voxel Coordinates in MeVisLab You can show the voxel coordinates in MeVisLab by using the following example network: ![Voxel Coordinates](/images/tutorials/basicmechanics/VoxelCoordinates.png "Voxel Coordinates") @@ -75,11 +75,11 @@ Load the file *Liver1_CT_venous.small.tif* .The `Info` module shows detailed inf The *Advanced* tab of the `Info` module shows the world coordinates of the image. In this case, the origin of the voxel coordinate system is located at -186.993, -173.993, -249.993. -In addition to that, you can see a scaling which has been done on the image. The voxel sizes are shown in the diagonal values of the matrix as 3.985792, 3.985792, 3.985798. +In addition to that, you can see a scaling that has been done on the image. The voxel sizes are shown in the diagonal values of the matrix as 3.985792, 3.985792, 3.985798. ![World coordinates of the loaded image](/images/tutorials/basicmechanics/ImageInfo_Advanced.png "World coordinates of the loaded image") -You can change the scaling to 1 by adding a `Resample3D` module to the network, Set the voxel size to 1, 1, 1 and inspect the `Info` module. +You can change the scaling to 1 by adding a `Resample3D` module to the network: set the voxel size to 1, 1, 1 and inspect the `Info` module. ![Resample3D](/images/tutorials/basicmechanics/Resample3D.png "Resample3D") @@ -107,7 +107,7 @@ You can also add a `SoVertexProperty` and a `SoLineSet` module and configure a l {{< networkfile "/examples/basic_mechanisms/coordinatesystems/VoxelCoordinates.mlab" >}} -## Device coordinates +## Device Coordinates Device coordinates are: * 2D coordinates in OpenGL viewport * Measured in pixel diff --git a/mevislab.github.io/content/tutorials/basicmechanisms/coordinatesystems/coordinatesystems2.md b/mevislab.github.io/content/tutorials/basicmechanisms/coordinatesystems/coordinatesystems2.md index b12238fca..4a7fbea22 100644 --- a/mevislab.github.io/content/tutorials/basicmechanisms/coordinatesystems/coordinatesystems2.md +++ b/mevislab.github.io/content/tutorials/basicmechanisms/coordinatesystems/coordinatesystems2.md @@ -24,12 +24,12 @@ World coordinates also refer to the patient axes. They are: ![World Coordinates in Context of the Human Body](/images/tutorials/visualization/V2_00.png "World Coordinates in Context of the Human Body") -The DICOM (Digital Imaging and Communications in Medicine) standard defines a data format that groups information into data sets. This way, the image data is always kept together with all meta information like patient ID, study time, series time, acquisition data etc. The image slice is represented by another tag with pixel information. +The DICOM (Digital Imaging and Communications in Medicine) standard defines a data format that groups information into data sets. This way, the image data is always kept together with all meta information like patient ID, study time, series time, acquisition data, etc. The image slice is represented by another tag with pixel information. -DICOM tags have unique numbers, encoded as two 16 bit numbers, usually shown in hexadecimal notation as two four-digit numbers (xxxx,xxxx). These numbers are the data group number and the data element number. +DICOM tags have unique numbers, encoded as two 16-bit numbers, usually shown in hexadecimal notation as two four-digit numbers (xxxx,xxxx). These numbers are the data group number and the data element number. {{}} -Although DICOM is a standard, often the data that is received / recorded does not follow the standard. Wrongly used tags or missing mandatory tags may cause problems in data processing. +Although DICOM is a standard, often the data that is received/recorded does not follow the standard. Wrongly used tags or missing mandatory tags may cause problems in data processing. {{}} Some typical modules for DICOM handling: @@ -48,7 +48,7 @@ For handling and manipulating DICOM data in C++, the DICOM toolkit [DCMTK](https Another option for Python is [pydicom](https://pydicom.github.io/). {{
}} -## Orthogonal views +## Orthogonal Views The module `OrthoView2D` provides a 2D view displaying the input image in three orthogonal viewing directions. By default, the view is configured as *Cube* where the transverse view is placed in the top right segment, sagittal in bottom left and coronal in bottom right segment. Use the left mouse button to set a position in the data set. This position will be displayed in all available views and is available as field *worldPosition*. ![OrthoView2D](/images/tutorials/basicmechanics/OrthoView2D.png "OrthoView2D") diff --git a/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/globalmacromodules.md b/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/globalmacromodules.md index 48bb74379..1e3884c10 100644 --- a/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/globalmacromodules.md +++ b/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/globalmacromodules.md @@ -13,7 +13,7 @@ menu: parent: "macro_modules" --- -# Example 2.2: Global macro modules +# Example 2.2: Global Macro Modules {{< youtube "M4HnA0d1V5k">}} @@ -21,18 +21,18 @@ menu: In this chapter you will learn how to create global macro modules. There are many ways to do this. You can convert local macros into global macro modules or you can directly create global macro modules using the *Project Wizard*. In contrast to local macro modules, global macro modules are commonly available throughout projects and can be found via module search and under {{< menuitem "Modules" >}}. -## Steps to do -### Transform a local macro module into a global macro module +## Steps to Do +### Transform a Local Macro Module into a Global Macro Module To transform our local macro module `Filter` from [Chapter I](/tutorials/basicmechanisms#TutorialMacroModules) into a global macro module, right-click {{< mousebutton "right" >}} the macro module to open the context menu and select {{< menuitem "Extras" "Convert To Global Module..." >}} ![Convert local macro to global macro](/images/tutorials/basicmechanics/GUI_03.png "Convert local macro to global macro") -### Define module properties +### Define Module Properties -1. Choose a unique module name +1. Choose a unique module name. -2. State the module author +2. State the module's author. 3. Select the genre of the module. For this, browse through the module genres to select the appropriate genre. In our case, as our macro module @@ -43,7 +43,7 @@ right-click {{< mousebutton "right" >}} the macro module to open the context men 4. Tick the box *Add reference to example network* to directly create the template for an example network for your macro module. 5. Select the package you like to store the module in. We choose the - package we created [before](./tutorials/basicmechanisms/macromodules/package/). Your module is saved in an .mlab format + package we created [before](./tutorials/basicmechanisms/macromodules/package/). Your module is saved in the *.mlab* format and can be found in *\\MyPackageGroup\\General\\Modules\\Macros\\MyProject*. @@ -55,14 +55,14 @@ Also keep in mind that Python files are only created automatically if selected i ![Create global macro module](/images/tutorials/basicmechanics/GUI_04.png "Create global macro module") -### Use the Project Wizard to create global macro modules +### Use the Project Wizard to Create Global Macro Modules Instead of converting a local macro module into a global macro module, you can also use the *Project Wizard* to create new macro modules. Open the Project Wizard via {{< menuitem "File" "Run Project Wizard ..." >}}. Then, select {{< menuitem "Modules (Scripting)" "Macro module" >}} and *Run Wizard*. -### Define module properties +### Define Module Properties -1. Choose a unique module name +1. Choose a unique module name. -2. State the module author +2. State the module's author. 3. Select the genre of the module. For this, browse through the module genres to select the appropriate genre. In our case, as our macro module @@ -71,19 +71,19 @@ Instead of converting a local macro module into a global macro module, you can a 4. Tick the box *Add reference to example network* to directly create the template for an example network for your macro module. 5. Select the package you like to store the module in. We choose the - package we created [before](./tutorials/basicmechanisms/macromodules/package/). Your module is saved in an .mlab format + package we created [before](./tutorials/basicmechanisms/macromodules/package/). Your module is saved in the *.mlab* format and can be found in *\\MyPackageGroup\\General\\Modules\\Macros\\MyProject*. {{}} -Make sure to chose *Directory Structure* as *self-contained*. This makes sure that all files of your module are stored in a single directory. +Make sure to chose *Directory Structure* as *self-contained*. This ensures that all files of your module are stored in a single directory. {{}} - Press *Next >* to edit further properties. You have the opportunity to directly define the internal network of the macro module, for example by copying an existing network. In this case, we could copy the network of the local macro module `Filter` we already created. In addition, you have the opportunity to directly create a Python file. Python scripting can be used for the implementation of module interactions and other module functionalities. More information about Python scripting can be found [here](./tutorials/basicmechanisms/macromodules/pythonscripting). + Press *Next >* to edit further properties. You have the opportunity to directly define the internal network of the macro module, for example, by copying an existing network. In this case, we could copy the network of the local macro module `Filter` we already created. In addition, you have the opportunity to directly create a Python file. Python scripting can be used for the implementation of module interactions and other module functionalities. More information about Python scripting can be found [here](./tutorials/basicmechanisms/macromodules/pythonscripting). {{< imagegallery 2 "/images" "ProjectWizard1" "ProjectWizard2" >}} -## Structure of global macro modules +## Structure of Global Macro Modules After creating your global macro module, you can find the created project *MyProject* in your package. This project contains your macro module `Filter`. For the macro module exist three files: * *Filter.def*: Module definition file * *Filter.mlab*: Network file which contains the internal network of your macro module @@ -95,7 +95,7 @@ In addition, two folders may be created: ![Structure of global macro modules](/images/tutorials/basicmechanics/GUI_04_2.png "Structure of global macro modules") -## How to find global macro modules +## How to Find Global Macro Modules All available modules are categorized and can be found via {{< menuitem "Modules" >}} in the respective genre. After creating a global macro, the new module can be found via {{< menuitem "Modules" "Filters" >}}. In addition, you can now find your macro module via module search. @@ -109,7 +109,7 @@ If you do not find your new global macro module, try to reload the module databa {{}} ## Summary -* Via right-click {{< mousebutton "right" >}} {{< menuitem "Extras" "Convert To Global Module..." >}} global macro modules can be created out of local macro modules -* You can use the Project Wizard to create new macro modules -* You need to have a package structure to store your global macro module +* Via right-click {{< mousebutton "right" >}} {{< menuitem "Extras" "Convert To Global Module..." >}} global macro modules can be created out of local macro modules. +* You can use the Project Wizard to create new macro modules. +* You need to have a package structure to store your global macro module. * Global macro modules are available throughout projects and can be found via *Module Search* and under menu item {{< menuitem "Modules" >}}. \ No newline at end of file diff --git a/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/guidesign.md b/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/guidesign.md index 904f525c3..995537a47 100644 --- a/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/guidesign.md +++ b/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/guidesign.md @@ -12,7 +12,7 @@ menu: weight: 410 parent: "macro_modules" --- -# Example 2.4: Building a Panel Layout: Interactions with macro modules +# Example 2.4: Building a Panel Layout: Interactions with Macro Modules {{< youtube "tdQUkkROWBg">}} @@ -28,7 +28,7 @@ More information about GUI design in MeVisLab can be found {{< docuLinks "/Resou [//]: <> (MVL-653) [//]: <> (MVL-651) -## Creating a panel for the macro module flilter {#Example_Paneldesign} +## Creating a Panel for the Macro Module Filter {#Example_Paneldesign} ### Creation of a module panel In [Example 2.2](/tutorials/basicmechanisms/macromodules/globalmacromodules) we created the global macro module `Filter`. By now, this module does not have a proper panel. When double-clicking {{< mousebutton "left" >}} the module, the *Automatic Panel* is shown. @@ -40,9 +40,9 @@ To add and edit a panel, open the context menu and select {{< menuitem "Related ![Module script file](/images/tutorials/basicmechanics/GUI_11.png "Module script file") -### Module interface -Per default, the *\*.script* file contains the {{< docuLinks "/Resources/Documentation/Publish/SDK/MDLReference/index.html#mdl_Interface" "interface" >}} of the module. -In the interface section (everything insight the curled brackets behind the name *Interface*) you can define the module inputs, the module outputs and also all module fields (or *Parameters*). +### Module Interface +Per default, the *.script* file contains the {{< docuLinks "/Resources/Documentation/Publish/SDK/MDLReference/index.html#mdl_Interface" "interface" >}} of the module. +In the interface section (everything insight the curled brackets behind the name *Interface*) you can define the module inputs, the module outputs, and also all module fields (or *Parameters*). [//]: <> (MVL-653) {{< highlight filename="Filter.script" >}} @@ -62,9 +62,9 @@ Interface { ``` {{}} -##### Module inputs and outputs +##### Module Inputs and Outputs -To create an input/output, you need to define a *Field* in the respective input/output environment. Each input/output gets a name (here *input0/output0*) which you can use to reference this field. The module input maps to an input of the internal network. You need to define this mapping. In this case the input of the macro module `Filter` maps to the input of the module `Convolution` of the internal network (*internalName = Convolution.input0*). Similarly, you need to define which output of the internal network maps to the output of the macro module `Filter`. In this example, the output of the internal module `Arithmethic2` maps to the output of our macro module `Filter` (*internalName = Arithmetic2.output0*). +To create an input/output, you need to define a *Field* in the respective input/output environment. Each input/output gets a name (here *input0/output0*) that you can use to reference this field. The module input maps to an input of the internal network. You need to define this mapping. In this case, the input of the macro module `Filter` maps to the input of the module `Convolution` of the internal network (*internalName = Convolution.input0*). Similarly, you need to define which output of the internal network maps to the output of the macro module `Filter`. In this example, the output of the internal module `Arithmethic2` maps to the output of our macro module `Filter` (*internalName = Arithmetic2.output0*). Creating an input/output causes: 1. Input/output connectors are added to the module. @@ -74,13 +74,13 @@ Creating an input/output causes: ![Internal Network of your macro module](/images/tutorials/basicmechanics/BM_23.png "Internal Network of your macro module") -##### Module fields +##### Module Fields In the environment *Parameters* you can define *fields* of your macro module. These fields may map to existing fields of the internal network (*internalName = ...* ), but they do not need to and can also be completely new. You can reference these fields when creating a panel, to allow interactions with these fields. All fields appear in the *Automatic Panel*. -### Module panel layout +### Module Panel Layout -To create your own User Interface, we need to create a {{< docuLinks "/Resources/Documentation/Publish/SDK/MDLReference/index.html#mdl_Window" "Window" >}}. A window is one of the layout elements which exist in MDL. These layout elements are called {{< docuLinks "/Resources/Documentation/Publish/SDK/MDLReference/index.html#Controls" "controls" >}}. The curled brackets define the window environment, in which you can define properties of the window and insert further controls like a {{< docuLinks "/Resources/Documentation/Publish/SDK/MDLReference/index.html#mdl_Box" "Box" >}}. +To create your own User Interface, we need to create a {{< docuLinks "/Resources/Documentation/Publish/SDK/MDLReference/index.html#mdl_Window" "Window" >}}. A window is one of the layout elements that exist in MDL. These layout elements are called {{< docuLinks "/Resources/Documentation/Publish/SDK/MDLReference/index.html#Controls" "controls" >}}. The curled brackets define the window environment, in which you can define properties of the window and insert further controls like a {{< docuLinks "/Resources/Documentation/Publish/SDK/MDLReference/index.html#mdl_Box" "Box" >}}. Initially, we call the window *MyWindowTitle*, which can be used to reference this window. @@ -175,11 +175,11 @@ Window MyWindowName { There are much more controls, which can be used. For example a CheckBox, -a Table, a Grid, a Button, \... . To find out more, take a look into the {{< docuLinks "/Resources/Documentation/Publish/SDK/MDLReference/index.html#Controls" "MDL Reference" >}}. +a Table, a Grid, or a Button. To find out more, take a look into the {{< docuLinks "/Resources/Documentation/Publish/SDK/MDLReference/index.html#Controls" "MDL Reference" >}}. [//]: <> (MVL-653) -### Module interactions {#mdlInteractions} +### Module Interactions {#mdlInteractions} Until now, we learned how to create the layout of a panel. As a next step, we like to get an overview over interactions. @@ -187,7 +187,7 @@ Until now, we learned how to create the layout of a panel. As a next step, we li You can add the module `GUIExample` to your workspace and play around with is. {{}} -#### Access to existing fields of the internal network +#### Access to Existing Fields of the Internal Network To interact with fields of the internal network in your User Interface, we need to access these fields. To access the field of the internal module @@ -199,7 +199,7 @@ Then, open the panel of the module `Convolution` and right-click {{< mousebutton ![Convolution Module](/images/tutorials/basicmechanics/Convolution.png "Convolution Module") In the panel of the module `Convolution`, you can change this variable *Kernel* via a drop-down menu. In -MDL a drop-down menu is called a {{< docuLinks "/Resources/Documentation/Publish/SDK/MDLReference/index.html#mdl_ComboBox" "ComboBox" >}}. We can take over the field *predefKernel*, its drop-down menu and all its properties by +MDL, a drop-down menu is called a {{< docuLinks "/Resources/Documentation/Publish/SDK/MDLReference/index.html#mdl_ComboBox" "ComboBox" >}}. We can take over the field *predefKernel*, its drop-down menu and all its properties by creating a new field in our panel and reference to the internal field *Convolution.predefKernel*, which already exist in the internal network. @@ -221,7 +221,7 @@ Window MyWindowName { ![Selecting the kernel](/images/tutorials/basicmechanics/SelectingKernel.png "Selecting the kernel") -As an alternative, you can define the field *kernel* in the *Parameters* environment, and reference the defined field by its name. The result in the panel is the same. You can see a difference in the Automatic Panel. All fields, which are defined in the interface in the *Parameters* environment appear in the Automatic Panel. Fields of the internal network, which are used but not declared in the section *Parameters* of the module interface do not appear in the Automatic Panel. +As an alternative, you can define the field *kernel* in the *Parameters* environment, and reference the defined field by its name. The result in the panel is the same. You can see a difference in the Automatic Panel. All fields that are defined in the interface in the *Parameters* environment appear in the Automatic Panel. Fields of the internal network, which are used but not declared in the section *Parameters* of the module interface, do not appear in the Automatic Panel. {{< highlight filename="Filter.script" >}} ```Stan @@ -253,9 +253,9 @@ Window MyWindowName { #### Commands -We can not only use existing functionalities, but also add new interactions via Python scripting. +We cannot only use existing functionalities, but also add new interactions via Python scripting. -In below example we added a *wakeupCommand* to the Window and a simple *command* to the Button. +In the example below, we added a *wakeupCommand* to the Window and a simple *command* to the Button. {{< highlight filename="Filter.script" >}} ```Stan @@ -270,9 +270,9 @@ Window MyWindowName { ``` {{}} -The *wakeupCommand* defines a Python function which is executed as soon as the Window is opened. The Button *command* is executed when the user clicks on the Button. +The *wakeupCommand* defines a Python function that is executed as soon as the Window is opened. The Button *command* is executed when the user clicks on the Button. -Both commands reference a Python function which is executed whenever both actions (open the Window or click the Button) are executed. +Both commands reference a Python function that is executed whenever both actions (open the Window or click the Button) are executed. If you like to learn more about Python scripting, take a look at [Example 2.5](tutorials/basicmechanisms/macromodules/pythonscripting). @@ -288,12 +288,12 @@ Commands { {{}} {{}} -The section Source should already be available and generated automatically in case you enable the Wizard to add a Python file to your module. +The section *Source* should already be available and generated automatically in case you enable the Wizard to add a Python file to your module. {{}} [//]: <> (MVL-653) -You can right-click {{< mousebutton "right" >}} on the command (*myWindowCommand* or *myButtonAction*) in your *\*.script* file and select {{< menuitem "Create Python Funtion......" >}}. The text editor MATE opens automatically and generates an initial Python function for you. You can simply add a logging function or implement complex logic here. +You can right-click {{< mousebutton "right" >}} on the command (*myWindowCommand* or *myButtonAction*) in your *.script* file and select {{< menuitem "Create Python Funtion......" >}}. The text editor MATE opens automatically and generates an initial Python function for you. You can simply add a logging function or implement complex logic here. **Example:** {{< highlight filename="Filter.py" >}} @@ -306,10 +306,10 @@ def myButtonAction: ``` {{}} -## Available examples -MeVisLab provides a lot of example modules for GUI development. All of these examples provides the \*.script file for UI development and the \*.py file containing the Python script. +## Available Examples +MeVisLab provides a lot of example modules for GUI development. All of these examples provides the *.script* file for UI development and the *.py* file containing the Python script. -### Layouting examples +### Layouting Examples * {{< docuLinks "/Resources/Documentation/Publish/SDK/MDLReference/index.html#TestVerticalLayout" "TestVerticalLayout Module">}} * {{< docuLinks "/Resources/Documentation/Publish/SDK/MDLReference/index.html#TestHorizontalLayout" "TestHorizontalLayout Module">}} * {{< docuLinks "/Resources/Documentation/Publish/SDK/MDLReference/index.html#TestTableLayout" "TestTableLayout Module">}} @@ -318,7 +318,7 @@ MeVisLab provides a lot of example modules for GUI development. All of these exa * {{< docuLinks "/Resources/Documentation/Publish/SDK/MDLReference/index.html#TestBoxLayout" "TestBoxLayout Module">}} * {{< docuLinks "/Resources/Documentation/Publish/SDK/MDLReference/index.html#TestTabViewLayout" "TestTabViewLayout Module">}} -### Other examples +### Other Examples * {{< docuLinks "/Resources/Documentation/Publish/SDK/MDLReference/index.html#TestHyperText" "TestHyperText Module">}} * {{< docuLinks "/Resources/Documentation/Publish/SDK/MDLReference/index.html#TestListBox" "TestListBox Module">}} * {{< docuLinks "/Resources/Documentation/Publish/SDK/MDLReference/index.html#TestListView" "TestListView Module">}} @@ -334,7 +334,7 @@ Please use the *Module Search* with the prefix *Test* for more examples. ## Summary * User interfaces and several module panels can be created for each macro module. -* You can create a panel, define inputs and outputs as well as interactions, in your *\*.script* file in {{< docuLinks "/Resources/Documentation/Publish/SDK/MeVisLabManual/ch26.html" "MATE">}} by using the {{< docuLinks "/Resources/Documentation/Publish/SDK/MDLReference/index.html" "MeVisLab Definition Language (MDL)">}}. +* You can create a panel, define inputs and outputs as well as interactions, in your *.script* file in {{< docuLinks "/Resources/Documentation/Publish/SDK/MeVisLabManual/ch26.html" "MATE">}} by using the {{< docuLinks "/Resources/Documentation/Publish/SDK/MDLReference/index.html" "MeVisLab Definition Language (MDL)">}}. * Module interactions can be implemented using commands, which are linked to Python functions. * You can implement field listeners, which trigger actions after a field value changes. diff --git a/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/helpfiles.md b/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/helpfiles.md index f4aa55bc7..502134896 100644 --- a/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/helpfiles.md +++ b/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/helpfiles.md @@ -12,7 +12,7 @@ menu: weight: 400 parent: "macro_modules" --- -# Example 2.3: Creation of module help +# Example 2.3: Creation of Module Help Generating help of a macro module is part of the video about macro modules from [Example 2: Creation of global macro modules](/tutorials/basicmechanisms/macromodules/globalmacromodules) {{< youtube "M4HnA0d1V5k">}} @@ -21,17 +21,17 @@ Generating help of a macro module is part of the video about macro modules from In this chapter, you will learn how to create a help page and an example network. For hands-on training, we will use the macro module `Filter`, which was created in the [previous chapter](/tutorials/basicmechanisms/macromodules/globalmacromodules). -Depending on the way the macro module was created the default help page and example network might or might not exist. In case they exist, the help page only contains information about module in- and outputs as well as module fields. The example network only contains the macro module itself. Both, the help page and the example network, can be created and edited after module creation. +Depending on the way the macro module was created, the default help page and example network might or might not exist. In the case they exist, the help page only contains information about module inputs and outputs as well as module fields. The example network only contains the macro module itself. Both, the help page and the example network, can be created and edited after module creation. -## Steps to do -### Creation of help files using MeVisLab MATE -We will start by creating a help file using the build in text editor {{< docuLinks "/Resources/Documentation/Publish/SDK/MeVisLabManual/ch26.html" "MeVisLab MATE">}} (MeVisLab Advanced Text Editor). If you open the context menu of your global macro module and select {{< menuitem "Help" >}}, it might be, that no help page is given. We will start to create a help file by selecting {{< menuitem "Help" "Create Help" >}}. If a help page already exists, select {{< menuitem "Help" "Edit Help" >}}. +## Steps to Do +### Creation of Help Files Using MeVisLab MATE +We will start by creating a help file using the built-in text editor {{< docuLinks "/Resources/Documentation/Publish/SDK/MeVisLabManual/ch26.html" "MeVisLab MATE">}} (MeVisLab Advanced Text Editor). If you open the context menu of your global macro module and select {{< menuitem "Help" >}}, it might be that no help page is given. We will start to create a help file by selecting {{< menuitem "Help" "Create Help" >}}. If a help page already exists, select {{< menuitem "Help" "Edit Help" >}}. [//]: <> (MVL-653) ![Creation of module help](/images/tutorials/basicmechanics/GUI_06.png "Creation of module help") -{{< docuLinks "/Resources/Documentation/Publish/SDK/MeVisLabManual/ch26.html" "MeVisLab MATE">}} opens. An \*.mhelp file (*Filter.mhelp*) is created automatically and is stored in the folder your macro module `Filter` is stored in. You can find the folder structure in MATE on the left side. Editing the text field, you can edit the help file. +{{< docuLinks "/Resources/Documentation/Publish/SDK/MeVisLabManual/ch26.html" "MeVisLab MATE">}} opens. An *.mhelp* file (*Filter.mhelp*) is created automatically and stored in the folder your macro module `Filter` is stored in. You can find the folder structure in MATE on the left side. Editing the text field, you can edit the help file. [//]: <> (MVL-653) @@ -40,7 +40,7 @@ We will start by creating a help file using the build in text editor {{< docuLin When creating the help file of a module, all important information of the module down to the field specifications are extracted and created automatically. Thus, the basic module information is always available in the module -help. Additional documentation should be added by the module author. On the left +help. Additional documentation should be added by the module's author. On the left side, you can find the outline of the help file. Each section can be edited. In this example, we added the purpose of the module to the help file. @@ -68,10 +68,10 @@ The result can be seen when opening the help file via context menu in MeVisLab I Depending on the way the macro module was created, more or less features are automatically given in the help file and the example network. All missing features can be added manually. {{}} -### Creation of an example network -To add an example network to your module, you need to add a reference to the respective *\*.mlab* file to the module definition file (.def). Open the file *Filter.def*. You can find the line *exampleNetwork = "$(LOCAL)/networks/FilterExample.mlab"*, which defines the reference to the *\*.mlab* file containing the example network. Per default the name of the example network is *ModulenameExample.mlab*. An *\*.mlab* file containing only the module Filter is created insight the folder *networks*. +### Creation of an Example Network +To add an example network to your module, you need to add a reference to the respective *\*.mlab* file to the module definition file (.def). Open the file *Filter.def*. You can find the line *exampleNetwork = "$(LOCAL)/networks/FilterExample.mlab"*, which defines the reference to the *.mlab* file containing the example network. By default, the name of the example network is *ModulenameExample.mlab*. An *.mlab* file containing only the module *Filter* is created inside the folder *networks*. -It is possible that the reference to the example network or the file *FilterExample.mlab* is missing. One reason could be, that its creation was not selected when creating the macro module. In this case, add the reference and the file manually. +It is possible that the reference to the example network or the file *FilterExample.mlab* is missing. One reason could be that its creation was not selected when creating the macro module. In this case, add the reference and the file manually. ![Reference to Example Network](/images/tutorials/basicmechanics/ExpNetwork_01.png "Reference to Example Network") @@ -83,6 +83,6 @@ To create the example network, open the file *FilterExample.mlab* in MeVisLab an ## Summary * {{< docuLinks "/Resources/Documentation/Publish/SDK/MeVisLabManual/ch26.html" "MeVisLab MATE">}} is a build-in text editor which can be used to create module help files, module panels or to create module interactionss via Python scripting. * You can create help files via the module context menu using MeVisLab Mate. -* You can add an example network to your macro module via the .def file +* You can add an example network to your macro module via the .def file. [//]: <> (MVL-653) \ No newline at end of file diff --git a/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/itemmodelview.md b/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/itemmodelview.md index 8db3421fc..74646de77 100644 --- a/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/itemmodelview.md +++ b/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/itemmodelview.md @@ -12,14 +12,14 @@ menu: weight: 465 parent: "basicmechanisms" --- -# Example 7: Creating your own ItemModel by using the ItemModelView +# Example 7: Creating Your Own ItemModel by Using the ItemModelView ## Introduction In this example, we will show how to use the *ItemModelView* MDL control to represent an abstract hierarchical item model with generically named attributes. You will see how to select the displayed attributes in the resulting table and how to interact with this table. We create a macro module that receives an input image and then shows some selected DICOM attributes of this patient in our own *ItemModelView*. -## Prepare your network +## Prepare Your Network ### Create a Macro Module {{}} @@ -30,7 +30,7 @@ Use the *Project Wizard* via menu entry {{< menuitem "File" "Run Project Wizard Start with an empty network and add a Python file. -We can leave the *Fields* empty for now. We can add them in the *\*.script* file. +We can leave the *Fields* empty for now. We can add them in the *.script* file. Click *Create* {{< mousebutton "left" >}}. @@ -38,12 +38,12 @@ Click *Create* {{< mousebutton "left" >}}. If you cannot find your module via *Module Search*, reload module cache by clicking the menu item {{< menuitem "Extras" "Reload Module Database (Clear Cache)" >}} -### Define the necessary fields +### Define the Necessary Fields Add your new module `MyItemModelView` to your workspace. It does not provide a user interface and you do not have any *Fields* available. ![Empty Module](/images/tutorials/basicmechanics/ItemModel_4.png "Empty Module") -Open the *\*.script* file of your module via right-click {{< mousebutton "right" >}} and {{< menuitem "Related Files (4)" "MyItemModelView.script" >}}. +Open the *.script* file of your module via right-click {{< mousebutton "right" >}} and {{< menuitem "Related Files (4)" "MyItemModelView.script" >}}. We first define the input for the image. {{< highlight filename="MyItemModelView.script" >}} @@ -100,7 +100,7 @@ If you now open your panel, you should see the *Input* *inImage* and the just cr ![Module Input and Fields](/images/tutorials/basicmechanics/ItemModel_5.png "Module Input and Fields") -### Add the ItemModelView to your panel +### Add the ItemModelView to Your Panel We can now add the *ItemModelView* to our panel and define the columns of the view, that we want to see. Add a *Window* section to your script file and define it as seen below. {{< highlight filename="MyItemModelView.script" >}} @@ -109,8 +109,8 @@ Window { Category { Vertical { ItemModelView myItemModel { - name = itemModelView - idAttribute = id + name = itemModelView + idAttribute = id Column id {} Column patientName {} Column patientBirthdate {} @@ -143,8 +143,8 @@ Your module now also shows an output *MLBase* object and the columns you defined ![Module Output and Columns](/images/tutorials/basicmechanics/ItemModel_6.png "Module Output and Columns") -### Fill your table with data -We want to get the necessary information from the defined input image *inImage*. We want the module to update the content whenever the input image changes. Therefore we need a *Field Listener* calling a Python function whenever the input image changes. Add it to your *Commands* section. +### Fill Your Table with Data +We want to get the necessary information from the defined input image *inImage*. We want the module to update the content whenever the input image changes. Therefore, we need a *Field Listener* calling a Python function whenever the input image changes. Add it to your *Commands* section. {{< highlight filename="MyItemModelView.script" >}} ```Stan @@ -181,7 +181,7 @@ We need to import *mevis.MLAB* and we define the attributes of our resulting vie The unique *id* is an increasing *Integer* and we can now initialize our model. -#### Implement the model +#### Implement the Model In Python, we have to define some basic classes and functions for our final model. Define a class *MyItem* which represents a single item. Each item may have children of the same type to provide a hierarchical structure. {{< highlight filename="MyItemModelView.py" >}} @@ -194,7 +194,7 @@ class MyItem: ``` {{}} -Now we implement a very simple and basic model named *MyItemModel*. Initially we create a new *MLBase* object using the existing *StandardItemModel* and define the structure of our items as already done using the attributes. +Now we implement a very simple and basic model named *MyItemModel*. Initially, we create a new *MLBase* object using the existing *StandardItemModel* and define the structure of our items as already done using the attributes. Some additional functions are necessary to get the root item and the selected index of the model. We also need functions to add and insert items and to clear all items. @@ -253,7 +253,7 @@ class MyItemModel: ``` {{}} -You can see that the above Python code uses a field *selection* which contains the ID of the selected item in our table. We have to add this *Field* to our *\*.script* file, too. +You can see that the above Python code uses a field *selection* that contains the ID of the selected item in our table. We have to add this *Field* to our *.script* file, too. {{< highlight filename="MyItemModelView.script" >}} ```Stan @@ -279,7 +279,7 @@ Window { ``` {{}} -#### Fill the model with your data +#### Fill the Model with Your Data Now, we can implement the function *imageChanged*. {{< highlight filename="MyItemModelView.py" >}} @@ -361,8 +361,8 @@ If you now open the panel of your module, you can already see the results. The first line shows the information of the patient, the study and the series and each child item represents a single slice of the image. -## Interact with your model -We can now add options to interact with the *ItemModelView*. Open the *\*.script* file of your module and go to the *Commands* section. We add a *FieldListener* to our *selection* field. Whenever the user selects a different item in our view, the Python function *itemClicked* in the *FieldListener* is executed. +## Interact with Your Model +We can now add options to interact with the *ItemModelView*. Open the *.script* file of your module and go to the *Commands* section. We add a *FieldListener* to our *selection* field. Whenever the user selects a different item in our view, the Python function *itemClicked* in the *FieldListener* is executed. {{< highlight filename="MyItemModelView.script" >}} ```Stan @@ -400,7 +400,7 @@ def itemClicked(field: "mevislab.MLABField"): ``` {{}} -The *itemClicked* function uses *id* from the selected item to get the value of column 8 (in this case it is the *SOP Instance UID* of the image) and prints this value. +The *itemClicked* function uses *id* from the selected item to get the value of column 8 (in this case, it is the *SOP Instance UID* of the image) and prints this value. ![Clicked Item](/images/tutorials/basicmechanics/ItemModel_8.png "Clicked Item") @@ -431,8 +431,8 @@ def itemClicked(field: "mevislab.MLABField"): While the *imageChanged* function is executed, the parameter is set to *False* and the *itemClicked* function does not print anything. ## Summary -* *ItemModelViews* allow you to define your own abstract hierarchical item model with generically named attributes -* This model can be provided as Output and added to the Panel of your module +* *ItemModelViews* allow you to define your own abstract hierarchical item model with generically named attributes. +* This model can be provided as Output and added to the Panel of your module. * Interactions with the model can be implemented by using a *FieldListener*. {{< networkfile "examples/basic_mechanisms/Modules.zip" >}} diff --git a/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/package.md b/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/package.md index 0a1446a7d..7a4ebf3cc 100644 --- a/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/package.md +++ b/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/package.md @@ -14,7 +14,7 @@ menu: --- -# Example 2.1: Package creation +# Example 2.1: Package Creation {{< youtube "1wrGsYtAs3g">}} @@ -28,7 +28,7 @@ Macro modules and projects are stored in packages. If you like to create a globa [//]: <> (MVL-653) -## Steps to do +## Steps to Do To create packages and package groups, we will use the Project Wizard. Open the Project Wizard via {{< menuitem "File" "Run Project Wizard ..." >}}. Then, select {{< menuitem "Package" "New Package" >}} and *Run Wizard*. ![The Project Wizard](/images/tutorials/basicmechanics/GUI_01.png "The Project Wizard") @@ -40,9 +40,9 @@ Next you need to: 2. Find a name for your package, in our example we call it *General*. -3. Select the path your package group is supposed to be stored in (If you +3. Select the path your package group is supposed to be stored in. If you like to add a package to an existing package group, select its name - and chose the path the package group is stored in) + and chose the path the package group is stored in. If you now create the package, you can find a folder structure in the desired directory. The folder of your package group contains the folder diff --git a/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/pythondebugger.md b/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/pythondebugger.md index f9a770701..168b18f2f 100644 --- a/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/pythondebugger.md +++ b/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/pythondebugger.md @@ -12,56 +12,56 @@ menu: weight: 455 parent: "basicmechanisms" --- -# Example 5: Debugging Python files in MATE +# Example 5: Debugging Python Files in MATE {{< youtube "ccLDQUrlzjU">}} ## Introduction MeVisLab provides the powerful integrated text editor MATE. By default, MATE is used to create/edit files like Python scripts. In this tutorial, we want to show you how to debug Python scripts in MeVisLab. -## Prepare your network +## Prepare Your Network We are using a very simple network of pre-defined modules, but you can also debug your self-written Python scripts. Add a `LocalImage` module to your workspace and connect it to a `DicomTagBrowser` module. The `DicomTagBrowser` module shows a table containing the DICOM tags of your currently opened file. ![Example Network](/images/tutorials/basicmechanics/Debug1.png "Example Network") -## Open Python script in MATE +## Open Python Script in MATE To debug our module, we need to open the Python file. Right-click {{< mousebutton "right" >}} the module `DicomTagBrowser` and select {{< menuitem "Related Files (3)" "DicomTagBrowser.py" >}}. The file is opened in MATE. {{}} -MATE only opens Python files if default configuration in *MeVisLab/Preferences* is not changed for *Supportive Programs*. +MATE only opens Python files if the default configuration in *MeVisLab/Preferences* is not changed for *Supportive Programs*. {{}} ![MATE](/images/tutorials/basicmechanics/Debug2.png "MATE") {{}} -You can not only debug your own files, but also Python scripts of pre-defined MeVisLab modules. +You cannot only debug your own files, but also Python scripts of pre-defined MeVisLab modules. {{}} The user interface of MATE provides some relevant views for debugging. -### Outline view +### Outline View The *Outline* view shows a list of all functions defined in your currently opened script. -### Project Workspace view +### Project Workspace View The *Project Workspace* view shows the content of the directories for all of your opened files. In this case, we only opened one file and only see the content of the directory for the `DicomTagBrowser` module. -### Debug Output view +### Debug Output View The *Debug Output* view shows the messages you also see in MeVisLab. Additional views are available as soon as we start debugging our file. -## Debug a Python script +## Debug a Python Script First we need to enable debugging. In the MATE main menu, select {{< menuitem "Debug" "Enable Debugging" >}}. You can see some new panels appearing in MATE. -### Debugging panel +### Debugging Panel The *Debugging* panel allows you to step through your code. ![Debugging Panel](/images/tutorials/basicmechanics/Debug3.png "Debugging Panel") -### Stack Frames panel +### Stack Frames Panel The *Stack Frames* panel shows your current stack trace while debugging. ![Stack Frames](/images/tutorials/basicmechanics/Debug4.png "Stack Frames") -### Variables/Watches/Evaluate Expression panel +### Variables/Watches/Evaluate Expression Panel Another panel *Variables/Watches/Evaluate Expression* appears, where you can see all current local and global variables. Add your own variables to watch their current value and evaluate your own expressions. ![Variables/Watches/Evaluate Expression](/images/tutorials/basicmechanics/Debug5.png "Variables/Watches/Evaluate Expression") diff --git a/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/pythonpip.md b/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/pythonpip.md index 6bb50bd3e..8bd99789a 100644 --- a/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/pythonpip.md +++ b/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/pythonpip.md @@ -12,9 +12,9 @@ menu: weight: 450 parent: "basicmechanisms" --- -# Example 4: Installing additional Python packages using the PythonPip module +# Example 4: Installing Additional Python Packages Using the PythonPip Module ## Introduction -MeVisLab already comes with a lot of integrated third party software tools ready to use. Nevertheless it might be necessary to install additional Python packages for your specific needs. This example will walk you through the process of adding packages through usage of/using the `PythonPip` module. +MeVisLab already comes with a lot of integrated third-party software tools ready to use. Nevertheless, it might be necessary to install additional Python packages for your specific needs. This example will walk you through the process of adding packages through usage of/using the `PythonPip` module. The `PythonPip` module allows to work with the Python package manager pip. It can be used to install Python packages into the site-packages of the MeVisLab Python installation. @@ -24,7 +24,7 @@ It technically provides the full Python package ecosystem, though you will have * **All installed packages with C-Extensions are release only**, so you can only import them in a release MeVisLab (under Windows) {{}} -Under Windows: Existing packages (e. g./ like *NumPy*) can only be upgraded if they haven't already been loaded by MeVisLab's Python. So please make sure to start with a *fresh* MeVisLab +On Windows: Existing packages (e.g., *NumPy*) can only be upgraded if they haven't already been loaded by MeVisLab's Python. So please make sure to start with a *fresh* MeVisLab {{}} **Packages that you should not upgrade or install (because they have been adapted for MeVisLab):** @@ -35,14 +35,14 @@ Under Windows: Existing packages (e. g./ like *NumPy*) can only be upgraded if t These are some of the most important packages that have been adapted for MeVisLab. If you seem to have a problem upgrading another one that is not listed here, make sure to ask in the [MeVisLab forum](https://forum.mevislab.de) or directly contact our developers via [EMail](mailto://info@mevislab.de). -### Working with the PythonPip module on your MeVisLab workspace +### Working with the PythonPip Module on your MeVisLab Workspace The module `PythonPip` can be found via module search. It provides a user interface showing the currently installed Python packages including version and MeVisLab package it has been installed to. ![PythonPip interface](/images/tutorials/thirdparty/pytorch_example1_2.png "PythonPip interface") Select the package to install the Python package into, write the name of the package and click install. -In case you want to install a specific version, you can also use *==1.2.0* +In the case you want to install a specific version, you can also use *==1.2.0* {{}} We strongly recommend to install the packages into a MeVisLab user package. This has many advantages: @@ -53,9 +53,9 @@ We strongly recommend to install the packages into a MeVisLab user package. This The only disadvantage: Python commands will not be recognized outside of MeVisLab by default. {{}} -Thirdparty information and *\*.mli* files are updated automatically. +Thirdparty information and *.mli* files are updated automatically. -### Using the commandline +### Using the Commandline Another option is using the commandline tool provided by MeVisLab. Under Windows, you need to change to directory *Packages\MeVis\ThirdParty\Python* first. {{< highlight filename="commandline" >}} @@ -65,10 +65,10 @@ MeVisPython -m pip ... {{}} {{}} -The commandline option does not provide the possibility to install into a specified user package. Thirdparty information and *\*.mli* files are not adapted automatically with the commandline tool. +The commandline option does not provide the possibility to install into a specified user package. Third-party information and *.mli* files are not adapted automatically with the commandline tool. {{}} In [Example 1: Installing PyTorch using the PythonPip module](/tutorials/thirdparty/pytorch/pytorchexample1/) we are installing PyTorch to use it in MeVisLab scripting. ## Summary -* The `PythonPip` module allows to install additional Python packages to adapt MeVisLab to a certain extent +* The `PythonPip` module allows to install additional Python packages to adapt MeVisLab to a certain extent. diff --git a/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/pythonscripting.md b/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/pythonscripting.md index c2a2dc991..d7d6d00a2 100644 --- a/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/pythonscripting.md +++ b/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/pythonscripting.md @@ -22,17 +22,17 @@ In fact, nearly everything in MeVisLab can be done via Python scripting: You can ## Basics To see how to access modules, fields, and so on, open the *Scripting Console* Via {{< menuitem "Scripting" "Show Scripting Console" >}}. -### Internal field names +### Internal Field Names You can find the internal name of one module field in the respective network. Open a panel, for example the Automatic Panel and right-click {{< mousebutton "right" >}} the field's title to open the field's context menu. Now, you can select *Copy Name*, to copy the internal name of the field. This name can be used to access the field via scripting. -### Scripting context +### Scripting Context -When entering *ctx* to the console, you can see the context you are working with. In the context of the *Scripting Console*, you have access to your workspace, meaning the whole network, its modules and the module fields. +When entering *ctx* to the console, you can see the context you are working with. In the context of the *Scripting Console*, you have access to your workspace, meaning the whole network, its modules, and the module fields. ![Scripting context](/images/tutorials/basicmechanics/Scripting_02.png "Scripting context") -### Editing the workspace +### Editing the Workspace In the *Scripting Console*, you can add and connect modules using the following commands: @@ -40,7 +40,7 @@ In the *Scripting Console*, you can add and connect modules using the following * *ctx.field("* < ModuleName.FieldName> *")* : Access a field of a module. * *ctx.field("* < ModuleInput > *").connectFrom("* < ModuleOutput > *")* : Draw a connection from one module's output to another module's input. -In this case we added the modules `DicomImport` and `View2D` to the workspace and connected both modules. +In this case, we added the modules `DicomImport` and `View2D` to the workspace and connected both modules. ![Add and connect modules via scripting](/images/tutorials/basicmechanics/Scripting_03.png "Add and connect modules via scripting") @@ -48,9 +48,9 @@ It is also possible to add notes to your workspace. ![Add a note to the workspace](/images/tutorials/basicmechanics/Scripting_04.png "Add a note to your workspace") -### Access modules and module fields +### Access Modules and Module Fields -You can access modules via *ctx.module("* < ModuleName > *")*. From this object, you can access module fields, module inputs and outputs and everything in context of this module. +You can access modules via *ctx.module("* < ModuleName > *")*. From this object, you can access module fields, module inputs and outputs, and everything in context of this module. You can also directly access a module field via *ctx.field("* < ModuleName.FieldName > *")*. Different methods can be called on this object. Take a look at the {{< docuLinks "/Resources/Documentation/Publish/SDK/ScriptingReference/group__scripting.html" "Scripting Reference" >}} to find out which methods can be called for which object or class. You can for example access the value of the respective field. @@ -64,7 +64,7 @@ You can also directly access a module field via *ctx.field("* < ModuleName.Field [//]: <> (MVL-653) -## Where and how to use Python scripting +## Where and How to Use Python Scripting #### Scripting View Under {{< menuitem "View" "Views" "Scripting" >}} you can find the View *Scripting*. The view offers a standard Python console, without any meaningful network or module context. This means only general Python functionalities can be tested and used. Access to modules or your network is not possible. @@ -73,7 +73,7 @@ Under {{< menuitem "View" "Views" "Scripting" >}} you can find the View *Scripti You can open the *Scripting Console* via {{< menuitem "Scripting" "Show Scripting Console" >}}. In the context of your workspace, you can access your network and modules. -#### Scripting console of modules +#### Scripting Console of Modules Every module offers a scripting console. Open the context menu of a module and select {{< menuitem "Show Window" "Scripting Console" >}}. You can work in the context (*ctx.*) of this module. @@ -81,14 +81,14 @@ Every module offers a scripting console. Open the context menu of a module and s The module `RunPythonScript` allows to execute Python scripts from within a MeVisLab network. You can draw parameter connection from modules to `RunPythonScript` and back, to process parameter fields using Python scripting. An example for the usage of `RunPythonScript` can be found [here](../scriptingexample1/). -#### Module interactions via Python scripting +#### Module Interactions via Python Scripting -You can reference to a Python function inside a *\*.script* file of a macro module. With this, you can for example execute a Python function, whenever you open a panel, define the action which is executed when pressing a button or specify the command triggered by a [field listener](tutorials/basicmechanisms/macromodules/scriptingexample2). An example for module interactions via Python scripting is given in the same example. +You can reference to a Python function inside a *.script* file of a macro module. With this, you can for example execute a Python function, whenever you open a panel, define the action that is executed when pressing a button or specify the command triggered by a [field listener](tutorials/basicmechanisms/macromodules/scriptingexample2). An example for module interactions via Python scripting is given in the same example. -#### Python scripting in network files (\*.mlab) -If you do not want to create a macro module, you can also execute Python scripts in a network file (\*.mlab). Save your network using a defined name, for example *mytest.mlab*. Then create a \*.script and a \*.py file in the same directory, using the same names (*mytest.script* and *mytest.py*). +#### Python Scripting in Network Files (*.mlab*) +If you do not want to create a macro module, you can also execute Python scripts in a network file (*.mlab*). Save your network using a defined name, for example *mytest.mlab*. Then create a *.script* and a *.py* file in the same directory, using the same names (*mytest.script* and *mytest.py*). -Open the \*.script file and add a *Commands* section defining the name of the Python file. +Open the *.script* file and add a *Commands* section defining the name of the Python file. {{< highlight filename="IsoCSOs.script" >}} ```Stan @@ -111,7 +111,7 @@ print("Hello") If you now use the menu item {{< menuitem "Scripting" "Start Network Script" >}}, the script can be executed inside your network. You can also use the keyboard shortcut {{< keyboard "ctrl+R" >}}. -## Tips and tricks +## Tips and Tricks #### Scripting Assistant Under {{< menuitem "View" "Views" "Scripting Assistant" >}} you can find the view *Scripting Assistant*. In this view, the actions you execute in the workspace are translated into Python script. @@ -121,7 +121,7 @@ For example: Open the *Scripting Assistant*. Add the module `WEMInitialize` to y ![Scripting Assistant](/images/tutorials/basicmechanics/Scripting_01.png "Scripting Assistant") ## Examples -See the following examples for Python Scripting: +See the following examples for Python scripting: 1. [The module RunPythonScript](./tutorials/basicmechanisms/macromodules/scriptingexample1/) 2. [Module interactions via Python scripting](./tutorials/basicmechanisms/macromodules/scriptingexample2/) @@ -129,4 +129,4 @@ See the following examples for Python Scripting: * Python can be used to access, create and process networks, modules, fields and panels. * You can use Python via different scripting consoles. -* You can also define custom module interactions by referencing to Python functions from the *\*.script* file \ No newline at end of file +* You can also define custom module interactions by referencing to Python functions from the *.script* file. diff --git a/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/scriptingexample1.md b/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/scriptingexample1.md index fb20b9a32..5fb912f18 100644 --- a/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/scriptingexample1.md +++ b/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/scriptingexample1.md @@ -13,7 +13,7 @@ menu: parent: "macro_modules" --- -# Example 2.5.1: The module RunPythonScript +# Example 2.5.1: The Module RunPythonScript {{< youtube "O5Get1PMOq8" >}} @@ -21,14 +21,14 @@ menu: The module `RunPythonScript` allows to execute Python scripts from within a MeVisLab network. You can draw parameter connection from modules to `RunPythonScript` and back, to process parameter fields using Python scripting. -## Steps to do -### Develop your network +## Steps to Do +### Develop Your Network In this example, we like to dynamically change the color of a cube in an Open Inventor scene. For that, add and connect the following modules as shown. ![RunPythonScript Example](/images/tutorials/basicmechanics/Scripting_06.png "RunPythonScript") -### Scripting using the moduule `RunPythonScript` +### Scripting Using the Module `RunPythonScript` Open the panel of `RunPythonScript`. There is an option to display input and output fields. For that, tick the box *Fields* on the top left side of the panel. diff --git a/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/scriptingexample2.md b/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/scriptingexample2.md index 5e3a70846..f76eae5fa 100644 --- a/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/scriptingexample2.md +++ b/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/scriptingexample2.md @@ -12,23 +12,23 @@ menu: weight: 440 parent: "macro_modules" --- -# Example 2.5.2: Module interactions via Python scripting +# Example 2.5.2: Module Interactions Via Python Scripting {{< youtube "hGq6vA7Ll9Q" >}} ## Introduction -In this example, you will learn how to add Python scripting to your User Interface. The network used in [Chapter V](tutorials/dataobjects/contours/contourexample5/) will be used for creating the macro module. +In this example, you will learn how to add Python scripting to your user interface. The network used in [Chapter V](tutorials/dataobjects/contours/contourexample5/) will be used for creating the macro module. -## Steps to do -### Creating the macro module +## Steps to Do +### Creating the Macro Module First, we condense the example network into a macro module and then we create a panel for that module. To create a macro module use the Project Wizard, which you find under {{< menuitem "File" "Run Project Wizard" >}}. Select *Macro module* and press *Run*. Now, you have to edit: 1. Name: The name of your module -2. Package: Select the package you like to save the macro module in. +2. Package: Select the package you like to save the macro module in 3. Directory Structure: Change to *Self-contained* (this setting is only available in MeVisLab versions before 5.0.0, later versions always use *self-contained*) 4. Project: Select you project name @@ -43,13 +43,13 @@ Now, create your macro module and reload MeVisLab. You can find your module via ![Enable Python scripting](/images/tutorials/basicmechanics/EnablePythonScripting.png "Enable Python scripting") -To design a panel and create a user interface for the macro module, open the *\*.script* file. You can see, that a Command environment exist, which defines the python file as source for all commands. +To design a panel and create a user interface for the macro module, open the *.script* file. You can see that a *Command* environment exist, which defines the Python file as source for all commands. ![Open the script file](/images/tutorials/basicmechanics/OpenScriptFile.png "Open the script file") ![Script file](/images/tutorials/basicmechanics/ScriptFile.png "Script file") -### Creating a panel with tabs and viewers +### Creating a Panel with Tabs and Viewers At first, we create a {{< docuLinks "/Resources/Documentation/Publish/SDK/MDLReference/index.html#mdl_Window" "Window" >}} with two {{< docuLinks "/Resources/Documentation/Publish/SDK/MDLReference/index.html##mdl_TabView" "Tabs" >}}. One *Main* tab, in which both viewers of the network are represented and one tab for *Settings*. For generating tabs, we can use the control {{< docuLinks "/Resources/Documentation/Publish/SDK/MDLReference/index.html#mdl_TabView" "TabView" >}}, with its items {{< docuLinks "/Resources/Documentation/Publish/SDK/MDLReference/index.html#mdl_TabViewItem" "TabViewItem" >}}. The control *TabView* enables to add a command, which is executed when opening the tab. For adding the viewers to the panel, we use the Control *Viewer*. @@ -83,7 +83,7 @@ Window { ![Panel with Tabs and Viewers](/images/tutorials/basicmechanics/PanelWithTabsAndViewers.png "Panel with Tabs and Viewers") -### Edit viewer settings in the panel +### Edit Viewer Settings in the Panel You may want to change the design setting of the right viewer. This is still possible via the internal network of the macro module. Open the @@ -95,7 +95,7 @@ the module `SoExaminerViewer` via context menu {{< menuitem "Show Windows" "Auto ![Changed viewer settings](/images/tutorials/basicmechanics/ChangedViewerSettings.png "Changed viewer settings") -### Selection of images +### Selection of Images Next, we like to add the option to browse through the folders and select the image, we like to create CSOs from. This functionality is already given in the internal network in the module `LocalImage`. We can copy this functionality from `LocalImage` and add this option to the panel above both viewers. But, how should we know, which field name we @@ -140,16 +140,16 @@ Window { ![Add name field](/images/tutorials/basicmechanics/AddNameField.png "Add name field") -### Add buttons to your panel +### Add Buttons to your Panel -As a next step, we like to add a *Browse\...*-Button, like in the module +As a next step, we like to add a *Browse\...* button, like in the module `LocalImage`, and also a button to create the CSOs. -To create the *Browse\...*-Button: +To create the *Browse\...* button: 1. Create a button containing the command *fileDialog*. 2. Right-click {{< mousebutton "right" >}} the command to create the respective function in the Python file. -3. Edit the function in the Python file, to enable the file dialog (similar function as in *LocalImage.py*). +3. Edit the function in the Python file to enable the file dialog (similar function as in *LocalImage.py*). To create the Iso Generator Button: @@ -239,7 +239,7 @@ can do this in the following way: ![Scripting Assistant](/images/tutorials/basicmechanics/GUI_Exp_15.png "Scripting Assistant") -2. Enable a functionality which allows us to notice the id of the CSO we are currently hovering over with our mouse. For this open the internal network of our macro module. We will use the module `SoView2DCSOExtensibleEditor`. Open its panel and select the tab *Advanced*. You can check a box to enable *Update CSO id under mouse*. If you now hover over a CSO, you can see its id in the panel. We can save the internal network to save this functionality, but we can also solve our problem via scripting. The Scripting Assistant translated our action into code, which we can use. +2. Enable a functionality that allows us to notice the id of the CSO we are currently hovering over with our mouse. For this open the internal network of our macro module. We will use the module `SoView2DCSOExtensibleEditor`. Open its panel and select the tab *Advanced*. You can check a box to enable *Update CSO id under mouse*. If you now hover over a CSO, you can see its id in the panel. We can save the internal network to save this functionality, but we can also solve our problem via scripting. The Scripting Assistant translated our action into code, which we can use. ![Enabling CSO id identification](/images/tutorials/basicmechanics/GUI_Exp_16.png "Enabling CSO id identification") @@ -271,7 +271,7 @@ def enableFunctionalities(): 3. Implement a field listener. This field listener will detect when you hover over a CSO and the CSO id changes. Triggered by a CSO id change, a colorization function will be executed, which will colorize the selected CSO. -In the *\*.script* file: +In the *.script* file: {{< highlight filename="IsoCSOs.script" >}} ```Stan diff --git a/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/soviewportregion.md b/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/soviewportregion.md index 914e3631a..8bf617a57 100644 --- a/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/soviewportregion.md +++ b/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/soviewportregion.md @@ -22,14 +22,14 @@ We will demonstrate how to: * Assign different content to each region. * Use alternative methods, such as `SoView2D`, when applicable. -## Prepare your network +## Prepare Your Network -### Displaying three images in one panel +### Displaying Three Images in One Panel Add an `ImageLoad` module to your workspace and select a 3D image like *./MeVisLab/Resources/DemoData/MRI_Head.tif* from the MeVisLab demo data directory. Connect an `OrthoReformat3` module and add three `View2D` modules. ![Image Display Setup](/images/tutorials/basicmechanics/E6_1.png "Image Display Setup") -Opening the three `View2D` module panels now shows the data in 3 orthogonal views. The module `OrthoReformat3` transforms the input image (by rotating and/or flipping) into the three main views commonly used. +Opening the three `View2D` module panels now shows the data in three orthogonal views. The module `OrthoReformat3` transforms the input image (by rotating and/or flipping) into the three main views commonly used. ![3 Views in 3 Viewers](/images/tutorials/basicmechanics/E6_2.png "3 Views in 3 Viewers") @@ -49,7 +49,7 @@ This happens, because all three `SoViewportRegion` modules have the same setting ![SoViewportRegion](/images/tutorials/basicmechanics/E6_5.png "SoViewportRegion") -The `SoViewportRegion` module allows to define the X- and Y-position and the width and height of the image in the `SoRenderArea` module. +The `SoViewportRegion` module allows to define the x- and y-position and the width and height of the image in the `SoRenderArea` module. Values can be in pixels or as fractions from 0 to 1: @@ -109,7 +109,7 @@ The right `SoViewportRegion` module should look as follows: ![Sagittal View](/images/tutorials/basicmechanics/E6_9.png "Sagittal View") -#### Displaying four images in one panel +#### Displaying Four Images in One Panel In the next example, the `SoRenderArea` will display four views at the same time: axial, coronal, sagittal, and a 3D view. ![3D View Layout](/images/tutorials/basicmechanics/E6_11.png "3D View Layout") @@ -152,14 +152,14 @@ You will see that the orientation cube of the 3D viewer appears in the bottom ri ![Final Network](/images/tutorials/basicmechanics/E6_13.png "Final Network") -## Alternative using `SoView2D` +## Alternative Using `SoView2D` In case you want the same dataset to be visualized in multiple viewers, the module `SoView2D` already provides this functionality. ![Initial SoView2D](/images/tutorials/basicmechanics/SoView2D_1.png "Initial SoView2D") -Whenever you are using the `SoView2D` module to visualize a 2D dataset, you need to add a `View2DExtensions` module and for example a `SoRenderArea` module. Without the `View2DExtensions` module, interactions like scrolling through slices or changing the window and level settings will not be possible. +Whenever you are using the `SoView2D` module to visualize a 2D dataset, you need to add a `View2DExtensions` module and, for example, a `SoRenderArea` module. Without the `View2DExtensions` module, interactions like scrolling through slices or changing the window and level settings will not be possible. -By default, you will see your images in a single viewer the same way as if you use the `View2D` module. The *number of columns* is defined as *1* by default. If you now change the *Number of Slices* to something like *3*, you will see 3 viewers shown in 1 column. As we can only connect one dataset, this network cannot display multiple series at the same time. +By default, you will see your images in a single viewer the same way as if you use the `View2D` module. The *number of columns* is defined as *1* by default. If you now change the *Number of Slices* to something like *3*, you will see three viewers shown in a single column. As we can only connect one dataset, this network cannot display multiple series at the same time. ![Multiple slices in SoView2D](/images/tutorials/basicmechanics/SoView2D_2.png "Multiple slices in SoView2D") diff --git a/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/viewerexample.md b/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/viewerexample.md index 47e500201..40f6cb1c1 100644 --- a/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/viewerexample.md +++ b/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/viewerexample.md @@ -12,29 +12,29 @@ menu: weight: 445 parent: "basicmechanisms" --- -# Example 3: Creating a simple application +# Example 3: Creating a Simple Application ## Introduction -In the previous examples, you already learned how to create macro modules, user interfaces and how to interact with your UI via Python scripting. +In the previous examples, you already learned how to create macro modules, user interfaces, and how to interact with your UI via Python scripting. -In this example, you will learn how to create a simple Prototype application in MeVisLab including a User Interface with 2D and 3D viewer. You will learn how to implement field listeners and react on events. +In this example, you will learn how to create a simple prototype application in MeVisLab including a user interface with 2D and 3D viewer. You will learn how to implement field listeners and react on events. -## Steps to do -### Create your network -Start with an empty network and add the Module `ImageLoad` to your workspace. Then add a `View2D` and `View3D` to your workspace and connect the modules as seen below. +## Steps to Do +### Create Your Network +Start with an empty network and add the Module `ImageLoad` to your workspace. Then, add a `View2D` and `View3D` to your workspace and connect the modules as seen below. ![Loading and viewing images](images/tutorials/basicmechanics/SimpleApp_01.png "Loading and viewing images") -### Load an image +### Load an Image Now double-click {{< mousebutton "left" >}} on the `ImageLoad` module and open any image. You can use the included file *./MeVisLab/Resources/DemoData/MRI_Head.dcm*. Opening your viewers should now show the images in 2D and 3D. ![Show images in 2D and 3D](images/tutorials/basicmechanics/SimpleApp_02.png "Show images in 2D and 3D") -### Save your network -Now, save your network as *\*.mlab* file and remember the location. +### Save Your Network +Now, save your network as *.mlab* file and remember the location. -### Create a macro module -Open the Project Wizard via {{< menuitem "File" "Run Project Wizard" >}} and run Wizard for a *macro module*. Name your module *MyViewerApplication*, enter your details and click *Next >*. +### Create a Macro Module +Open the Project Wizard via {{< menuitem "File" "Run Project Wizard" >}} and run the Wizard for a *macro module*. Name your module *MyViewerApplication*, enter your details, and click *Next >*. ![Module Properties](images/tutorials/basicmechanics/SimpleApp_03.png "Module Properties") @@ -46,18 +46,18 @@ You can leave all fields empty for now and just click *Create*. ![Module Field Interface](images/tutorials/basicmechanics/SimpleApp_05.png "Module Field Interface") -MeVisLab reloads its internal database and you can open a new Tab. Search for your newly created module, in our case it was *MyViewerApplication*. +MeVisLab reloads its internal database and you can open a new tab. Search for your newly created module, in our case it was *MyViewerApplication*. ![MyViewerApplication](images/tutorials/basicmechanics/SimpleApp_06.png "MyViewerApplication") -In case you double-click {{< mousebutton "left" >}} your module now, you will see the *Automatic Panel* only showing the name of your module, because we did not add any own *Window* until now. +In the case you double-click {{< mousebutton "left" >}} your module now, you will see the *Automatic Panel* only showing the name of your module, because we did not add any own *Window* until now. -### Develop your User Interface -Before adding your own UI, open internal network of your macro module via right-click {{< mousebutton "right" >}} and {{< menuitem "Show Internal Network" >}}. Open the panel of your `ImageLoad` module and set filename to an empty string (clear). This is necessary for later. +### Develop Your User Interface +Before adding your own UI, open the internal network of your macro module via right-click {{< mousebutton "right" >}} and {{< menuitem "Show Internal Network" >}}. Open the panel of your `ImageLoad` module and set *filename* to an empty string (clear). This is necessary for later. Now, right-click on your *MyViewerApplication* and select {{< menuitem "Related Files" "MyViewerApplication.script" >}} -{{< docuLinks "/Resources/Documentation/Publish/SDK/MeVisLabManual/ch26.html" "MATE">}} opens showing your script file. You already learned how to create simple UI elements in [Example 2.4](tutorials/basicmechanisms/macromodules/guidesign). Now we will create a little more complex UI including your `View2D` and `View3D`. +{{< docuLinks "/Resources/Documentation/Publish/SDK/MeVisLabManual/ch26.html" "MATE">}} opens showing your script file. You already learned how to create simple UI elements in [Example 2.4](tutorials/basicmechanisms/macromodules/guidesign). Now, we will create a little more complex UI including your `View2D` and `View3D`. First we need a new *Field* in your *Parameters* section. Name the field *filepath* and set *internalName* to *ImageLoad.filename*. @@ -75,7 +75,7 @@ Interface { ``` {{}} -We now re-use the *filepath* field from the `ImageLoad` module for our interface. Add a *Window* and a *Vertical* to the bottom of your *\*.script* file. Add the just created parameter field *filepath* inside your *Vertical* as seen below. +We now re-use the *filepath* field from the `ImageLoad` module for our interface. Add a *Window* and a *Vertical* to the bottom of your *.script* file. Add the just created parameter field *filepath* inside your *Vertical* as seen below. {{< highlight filename="MyViewerApplication.script" >}} ``` Stan @@ -105,7 +105,7 @@ If you now double-click {{< mousebutton "left" >}} on your module, you can see y ![Filepath field in UI](images/tutorials/basicmechanics/SimpleApp_08.png "Filepath field in UI") -Next, we will add your 2D and 3D Viewers and a Button to your Window. Change your *\*.script* file as seen below: +Next, we will add your 2D and 3D viewers and a *Button* to your *Window*. Change your *.script* file as seen below: {{< highlight filename="MyViewerApplication.script" >}} ``` Stan @@ -136,19 +136,19 @@ Window { ``` {{}} -We have a vertical Layout having 2 items placed horizontally next to each other. The new Button gets the title *Reset* but does nothing, yet because we did not add a Python function to a command. +We have a vertical layout having two items placed horizontally next to each other. The new *Button* gets the title *Reset* but does nothing yet, because we did not add a Python function to a command. -Additionally we added the `View2D` and the `View3D` to our *Window* and defined the *height*, *width* and the *expandX/Y* property to *yes*. This leads our viewers to resize together with our *Window*. +Additionally, we added the `View2D` and the `View3D` to our *Window* and defined the *height*, *width* and the *expandX/Y* property to *yes*. This leads our viewers to resize together with our *Window*. {{}} Additional information about the `View2D` and `View3D` options can be found in the MeVisLab {{< docuLinks "/Resources/Documentation/Publish/SDK/MDLReference/index.html#mdl_Viewer" "MDL Reference">}} {{}} -You can now play around with your module in MeVisLab SDK. Open the *Window* and select a file. You can see the 2 viewers showing the 2D and 3D images. You can interact with your viewers the same way as in your MeVisLab network. All functionalities are taken from the modules and transferred to your user interface. +You can now play around with your module in MeVisLab SDK. Open the *Window* and select a file. You can see the two viewers showing the 2D and 3D images. You can interact with your viewers the same way as in your MeVisLab network. All functionalities are taken from the modules and transferred to your user interface. ![2D and 3D viewers in our application](images/tutorials/basicmechanics/SimpleApp_09.png "2D and 3D viewers in our application") -### Develop a python function for your Button +### Develop a Python Function for Your Button Next we want to reset the filepath to an empty string on clicking our *Reset* button. Add the *reset* command to your Button. {{< highlight filename="MyViewerApplication.script" >}} ``` Stan @@ -174,11 +174,11 @@ def reset(): Clicking on *Reset* in your module now clears the filename field and the viewers do not show any images anymore. -#### Field listeners {#fieldlisteners} +#### Field Listeners {#fieldlisteners} -A field listener watches a given field in your network and reacts on any changes of the field value. You can define Python functions to execute in case a change has been detected. +A field listener watches a given field in your network and reacts on any changes of the field value. You can define Python functions to execute in the case a change has been detected. -In order to define such a listener, you need to add it to the *Commands* section in your *\*.script* file. +In order to define such a listener, you need to add it to the *Commands* section in your *.script* file. **Example:** {{< highlight filename="MyViewerApplication.script" >}} @@ -195,7 +195,7 @@ Commands { In the above example, we react on changes of the field *startSlice* of the module `View2D`. Whenever the field value (currently displayed slice) changes, the Python function *printCurrentSliceNumber* is executed. -In your Python file `MyViewerApplication.py` you can now add the following: +In your Python file `MyViewerApplication.py`, you can now add the following: {{< highlight filename="MyViewerApplication.py" >}} ```Python diff --git a/mevislab.github.io/content/tutorials/dataobjects.md b/mevislab.github.io/content/tutorials/dataobjects.md index e095a85d5..7a52cc45d 100644 --- a/mevislab.github.io/content/tutorials/dataobjects.md +++ b/mevislab.github.io/content/tutorials/dataobjects.md @@ -14,8 +14,8 @@ menu: --- ## Data Objects in MeVisLab {#TutorialDataObjects} -MeVisLab provides pre-defined data objects, e. g. -* [Contour Segmented Objects (CSOs)](/tutorials/dataobjects/contourobjects)
+MeVisLab provides pre-defined data objects, e.g.: +* [Contour Segmentation Objects (CSOs)](/tutorials/dataobjects/contourobjects)
, which are three-dimensional objects encapsulating formerly defined contours within images. * [Surface Objects (Winged Edge Meshes or WEMs)](/tutorials/dataobjects/surfaceobjects)
represent the surface of geometrical figures and allow the user to manipulate them. @@ -24,4 +24,4 @@ are used to mark specific locations or aspects of an image and allow to process * [Curves](tutorials/dataobjects/curves)
can print the results of a function as two-dimensional mathematical graphs into a diagram. -Usage, advantages and disadvantages of each above mentioned data object type will be covered in the following specified chapters, where you will be building example networks for some of the most common use cases. +Usage, advantages, and disadvantages of each above-mentioned data object type will be covered in the following specified chapters, where you will be building example networks for some of the most common use cases. diff --git a/mevislab.github.io/content/tutorials/dataobjects/contourobjects.md b/mevislab.github.io/content/tutorials/dataobjects/contourobjects.md index bdd7cf556..84110f525 100644 --- a/mevislab.github.io/content/tutorials/dataobjects/contourobjects.md +++ b/mevislab.github.io/content/tutorials/dataobjects/contourobjects.md @@ -16,11 +16,11 @@ menu: ## Introduction ### Structure of CSOs -MeVisLab provides modules to create contours in images. 3D objects which encapsulate these contours are called Contour Segmented Objects (CSOs). +MeVisLab provides modules to create contours in images. 3D objects that encapsulate these contours are called Contour Segmentation Objects (CSOs). In the next image, you can see a rectangular shaped CSO. The pink circles you can see are called *Seed Points*. -*Seed Points* define the shape of the CSO. In case of a rectangle, you need four *Seed Points* forming the corners, to define the whole rectangle. +*Seed Points* define the shape of the CSO. In the case of a rectangle, you need four *Seed Points* forming the corners to define the whole rectangle. The points forming the blue lines are called *Path Points*. @@ -41,17 +41,17 @@ The following images show editors available in MeVisLab for drawing CSOs: {{}} The `SoCSOIsoEditor` and `SoCSOLiveWireEditor` are special, because they are using an algorithm to detect edges themselves. -* The `SoCSOIsoEditor` generates iso-contours interactively. +* The `SoCSOIsoEditor` generates isocontours interactively. * The `SoCSOLiveWireEditor` renders and semi-interactively generates CSOs based on the LiveWire algorithm. {{}} ### CSO Lists and CSO Groups -All created CSOs are stored in CSO lists, which can be saved and loaded on demand. The lists can not only store the coordinates of the CSOs, but also additional information in the form of name-value pairs (using specialized modules or Python scripting). +All created CSOs are stored in CSO lists that can be saved and loaded on demand. The lists can not only store the coordinates of the CSOs, but also additional information in the form of name-value pairs (using specialized modules or Python scripting). ![Basic CSO Network](/images/tutorials/dataobjects/contours/BasicCSONetwork.png "Basic CSO Network") -Each `SoCSO*Editor` requires a `SoView2DCSOExtensibleEditor` which manages attached CSO editors and renderers and offers an optional default renderer for all types of CSOs. In addition to that, the list of CSOs needs to be stored in a `CSOManager`. +Each `SoCSO*Editor` requires a `SoView2DCSOExtensibleEditor` that manages attached CSO editors and renderers and offers an optional default renderer for all types of CSOs. In addition to that, the list of CSOs needs to be stored in a `CSOManager`. The appearance of the CSO can be defined by using a `SoCSOVisualizationSettings` module. diff --git a/mevislab.github.io/content/tutorials/dataobjects/contours/contourexample1.md b/mevislab.github.io/content/tutorials/dataobjects/contours/contourexample1.md index c62078815..637915770 100644 --- a/mevislab.github.io/content/tutorials/dataobjects/contours/contourexample1.md +++ b/mevislab.github.io/content/tutorials/dataobjects/contours/contourexample1.md @@ -19,15 +19,15 @@ menu: ## Introduction -We like to start with the creation of CSOs. To create CSOs, you need a `SoCSO*`-Editor. There are several different editors, which can be used to create CSOs (see [here](tutorials/dataobjects/contourobjects#CSOEditors)). Some of them are introduced in this example. +We like to start with the creation of CSOs. To create CSOs, you need a `SoCSO*`-Editor. There are several different editors that can be used to create CSOs (see [here](tutorials/dataobjects/contourobjects#CSOEditors)). Some of them are introduced in this example. -## Steps to do -### Develop your network -For this example, we need the following modules. Add the modules to your workspace, connect them as shown below and load the example image *$(DemoDataPath)/BrainMultiModal/ProbandT1.tif*. +## Steps to Do +### Develop Your Network +For this example, we need the following modules. Add the modules to your workspace, connect them as shown below, and load the example image *$(DemoDataPath)/BrainMultiModal/ProbandT1.tif*. ![Data Objects Contours Example 1](/images/tutorials/dataobjects/contours/DO1_01.png "Data Objects Contours Example 1") -### Edit rectangular CSO +### Edit Rectangular CSO Now, open the module `View2D`. Use your left mouse key {{< mousebutton "left" >}}, to draw a rectangle, which is your first CSO. ![Rectangle Contour](/images/tutorials/dataobjects/contours/DO1_02.png "Rectangle Contour") @@ -44,7 +44,7 @@ If you now open the panel of the `CSOManager`, you will find one CSO, the one we ![CSO Manager](/images/tutorials/dataobjects/contours/DO1_04.png "CSO Manager") -### Change properties of CSO +### Change Properties of CSO Now, add the module `SoCSOVisualizationSettings` to your workspace and connect it as shown below. ![CSO Manager](/images/tutorials/dataobjects/contours/DO1_05.png "CSO Manager") @@ -55,17 +55,17 @@ be red). Tick the *Auto apply* box at the bottom or press *Apply*. ![Visualization Settings](/images/tutorials/dataobjects/contours/DO1_07.png "Visualization Settings") -### CSOs of different shapes +### CSOs of Different Shapes Exchange the module `SoCSORectangleEditor` with another editor, for -example the `SoSCOPolygonEditor` or `SoCSOSplineEditor`. Other editors +example, the `SoSCOPolygonEditor` or `SoCSOSplineEditor`. Other editors allow to draw CSOs of other shapes. For polygon-shaped CSOs or CSOs consisting of splines, left-click on the image viewer to add new points -to form the CSO. Double--click to finish the CSO. +to form the CSO. Double-click to finish the CSO. ![SoSCOPolygonEditor](/images/tutorials/dataobjects/contours/DO1_08.png "SoSCOPolygonEditor") ![SoCSOSplineEditor](/images/tutorials/dataobjects/contours/DO1_09.png "SoCSOSplineEditor") -### Draw filled CSOs +### Draw Filled CSOs If you want to fill the shapes, you can simply add a `SoCSOFillingRenderer` module to your `SoView2DCSOExtensibleEditor`. ![SoCSOFillingRenderer](/images/tutorials/dataobjects/contours/DO1_09_filled.png "SoCSOFillingRenderer") @@ -73,10 +73,10 @@ If you want to fill the shapes, you can simply add a `SoCSOFillingRenderer` modu Create CSOs with green color and ellipsoid shapes. ## Summary -* CSOs can be created using a SoCSO-Editor -* CSOs of different shapes can be created -* A list of CSOs can be stored in the `CSOManager` -* Properties of CSOs can be changed using `SoCSOVisualizationSettings` +* CSOs can be created using a SoCSO-Editor. +* CSOs of different shapes can be created. +* A list of CSOs can be stored in the `CSOManager`. +* Properties of CSOs can be changed using `SoCSOVisualizationSettings`. {{< networkfile "examples/data_objects/contours/example1/ContourExample1.mlab" >}} diff --git a/mevislab.github.io/content/tutorials/dataobjects/contours/contourexample2.md b/mevislab.github.io/content/tutorials/dataobjects/contours/contourexample2.md index f3dfcab0d..cc4dcf29e 100644 --- a/mevislab.github.io/content/tutorials/dataobjects/contours/contourexample2.md +++ b/mevislab.github.io/content/tutorials/dataobjects/contours/contourexample2.md @@ -27,8 +27,8 @@ generated between manual segmentations based on a linear interpolation. As a last step, we will group together CSOs of the same anatomical unit. -## Steps to do -### Develop your network and create CSOs +## Steps to Do +### Develop Your Network and Create CSOs In order to do that, create the shown network. You can use the network from the previous example and exchange the `SoCSO`-Editor. In addition to @@ -39,7 +39,7 @@ displays the amount of existing CSOs. ![Data Objects Contours Example 2](/images/tutorials/dataobjects/contours/DO2_02.png "Data Objects Contours Example 2") -### Create CSO interpolations +### Create CSO Interpolations We like to generate interpolated contours for existing CSOs. In order to do that, add the module `CSOSliceInterpolator` to your workspace and connect it as shown. @@ -47,7 +47,7 @@ connect it as shown. ![Slice Interpolation](/images/tutorials/dataobjects/contours/DO2_03.png "Slice Interpolation") Open the panel of module `CSOSliceInterpolator` and change the *Group -Handling* and the *Mode* as shown. If you now press *Update* interpolating +Handling* and the *Mode* as shown. If you now press *Update*, interpolating CSOs are created. ![Slice Interpolation Settings](/images/tutorials/dataobjects/contours/DO2_04_2.png "Slice Interpolation Settings")   @@ -62,7 +62,7 @@ displayed in white and interpolated CSOs are marked in yellow. ![Interpolated CSOs](/images/tutorials/dataobjects/contours/DO2_06.png "Interpolated CSOs") ### Group CSOs -We like to segment both lobes of the lung. To distinguish the CSOs of both lungs, we like to group CSOs together, according to the lung, they belong to. First, we like to group together all CSOs belonging to the lung we already segmented. In order to do this, open the `CSOManager`. Create a new Group and label that Group. We chose the label *Left Lung*. Now, mark the created Group and all CSOs you want to include into that group and press *Combine*. If you click on the Group, all CSOs belonging to this Group are marked with a star. +We like to segment both lobes of the lung. To distinguish the CSOs of both lungs, we like to group CSOs together, according to the lung they belong to. First, we like to group together all CSOs belonging to the lung we already segmented. In order to do this, open the `CSOManager`. Create a new Group and label that Group. We chose the label *Left Lung*. Now, mark the created Group and all CSOs you want to include into that group and press *Combine*. If you click on the Group, all CSOs belonging to this Group are marked with a star. {{}} Keep in mind, that the right lung might be displayed on the left side of the image and vice versa, depending on your view. @@ -77,16 +77,16 @@ As a next step, segment the right lung by creating new CSOs. Create a new Group for all CSOs of the right lung. We labeled this Group *Right Lung*. Again, mark the group and the CSOs you like to combine and press *Combine*. ![Grouping remaining CSOs](/images/tutorials/dataobjects/contours/DO2_09.png "Grouping remaining CSOs") -To visually distinguish the CSOs of both groups, change the color of each group under {{< menuitem "Group" "Visuals" >}}. We changed the color of the *Left Lung* to be green and of the *Right Lung* to be orange of path and seed points. In addition, we increased the *Width* of the path points. +To visually distinguish the CSOs of both groups, change the color of each group under {{< menuitem "Group" "Visuals" >}}. We changed the color of the *Left Lung* to be green and of the *Right Lung* to be orange for path and seed points. In addition, we increased the *Width* of the path points. ![Interpolated CSOs](/images/tutorials/dataobjects/contours/DO2_10.png "Interpolated CSOs") As a last step, we need to disconnect the module `SoCSOVisualizationSettings`, as this module overwrites the visualization settings we enabled for each group in the `CSOManager`. ![Interpolated CSOs](/images/tutorials/dataobjects/contours/DO2_11.png "Interpolated CSOs") ## Summary -* `SoCSOLiveWireEditor` can be used to create CSOs semi-automatically -* CSO interpolations can be created using `CSOSliceInterpolator` -* CSOs can be grouped together using the `CSOManager` +* `SoCSOLiveWireEditor` can be used to create CSOs semi-automatically. +* CSO interpolations can be created using `CSOSliceInterpolator`. +* CSOs can be grouped together using the `CSOManager`. {{< networkfile "examples/data_objects/contours/example2/ContourExample2.mlab" >}} diff --git a/mevislab.github.io/content/tutorials/dataobjects/contours/contourexample3.md b/mevislab.github.io/content/tutorials/dataobjects/contours/contourexample3.md index 718e75d7b..7d27a713b 100644 --- a/mevislab.github.io/content/tutorials/dataobjects/contours/contourexample3.md +++ b/mevislab.github.io/content/tutorials/dataobjects/contours/contourexample3.md @@ -23,22 +23,22 @@ 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 +## Steps to Do +### Develop Your Network Use the network from the [contour example 2](/tutorials/dataobjects/contours/contourexample2) and add the modules `VoxelizeCSO`, `SoView2DOverlay` and `View2D` to your workspace. Connect the module as shown. The module `VoxelizeCSO` allows to convert CSOs into voxel images. ![Data Objects Contours Example 3](/images/tutorials/dataobjects/contours/DO3_02.png "Data Objects Contours Example 3") -### Convert CSOs into voxel images +### Convert CSOs into Voxel Images Update the module `VoxelizeCSOs` to create overlays based on your CSOs. The result can be seen in `View2D1`. ![Overlay](/images/tutorials/dataobjects/contours/DO3_03.png "Overlay") -Next, we like to inspect the marked lobe of the lung. This means, we -like to inspect the object, build out of CSOs. In order to do that, add +Next, we like to inspect the marked lobe of the lung. This means we +like to inspect the object that is built out of CSOs. In order to do that, add the `View3D` module. The 3D version of the lung can be seen in the viewer. @@ -46,8 +46,8 @@ viewer. ![Extracted Object](/images/tutorials/dataobjects/contours/DO3_05.png "Extracted Object") ## Summary -* The module `VoxelizeCSO` converts CSOs to voxel images -* Create an overlay out of voxel images using `SoView2DOverlay` +* The module `VoxelizeCSO` converts CSOs to voxel images. +* Create an overlay out of voxel images using `SoView2DOverlay`. {{< networkfile "examples/data_objects/contours/example3/ContourExample3.mlab" >}} diff --git a/mevislab.github.io/content/tutorials/dataobjects/contours/contourexample4.md b/mevislab.github.io/content/tutorials/dataobjects/contours/contourexample4.md index 96a92d07b..36fa74e46 100644 --- a/mevislab.github.io/content/tutorials/dataobjects/contours/contourexample4.md +++ b/mevislab.github.io/content/tutorials/dataobjects/contours/contourexample4.md @@ -20,19 +20,19 @@ menu: In this example we like to calculate the volume of our object, in this case the part of the lung we have segmented. -## Steps to do -### Develop your network and calculate the lung volume +## Steps to Do +### Develop Your Network and Calculate the Lung Volume Add the module `CalculateVolume` and `SoView2DAnnotation` to your workspace and connect both modules as shown. Update the module `CalculateVolume`, which directly shows the volume of our object. ![Data Objects Contours Example 4](/images/tutorials/dataobjects/contours/DO4_01.png "Data Objects Contours Example 4") -### Display the lung volume in the image +### Display the Lung Volume in the Image We now like to display the volume in the image viewer. For this, open the panel of the modules `CalculateVolume` and `SoView2DAnnotation`. Open the tab *Input* in the panel of the module `SoView2DAnnotation`. Now -construct a parameter connection between *Total Volume* calculated in +establish a parameter connection between *Total Volume* calculated in the module `CalculateVolume` and the *input00* of the module `SoView2DAnnotation`. This connection projects the *Total Volume* to the input of `SoView2DAnnotation`. @@ -44,8 +44,8 @@ each annotation mode. ![Annotate Image](/images/tutorials/dataobjects/contours/DO4_03_2.png "Annotate Image") -We select the tab *User* which we like to work on. You can see four -fields, which display four areas of a viewer in which you can add +We select the tab *User* that we like to work on. You can see four +fields that display four areas of a viewer in which you can add information text to the image. ![Annotate Image 2](/images/tutorials/dataobjects/contours/DO4_04.png "Annotate Image") @@ -58,9 +58,9 @@ the annotations of the viewer by pressing the keyboard shortcut {{< keyboard "A" ![Display Volume in Image](/images/tutorials/dataobjects/contours/DO4_05.png "Display Volume in Image") ## Summary -* `CalculateVolume` can calculate the volume of a voxel image -* `SoView2DAnnotation` enables to manually change the annotation mode of a viewer -* Annotations shown in a `View2D` can be customized by using a `SoView2DAnnotation` module +* `CalculateVolume` can calculate the volume of a voxel image. +* `SoView2DAnnotation` enables to manually change the annotation mode of a viewer. +* Annotations shown in a `View2D` can be customized by using a `SoView2DAnnotation` module. {{< networkfile "examples/data_objects/contours/example4/ContourExample4.mlab" >}} diff --git a/mevislab.github.io/content/tutorials/dataobjects/contours/contourexample5.md b/mevislab.github.io/content/tutorials/dataobjects/contours/contourexample5.md index ee46a03cc..42fb183c0 100644 --- a/mevislab.github.io/content/tutorials/dataobjects/contours/contourexample5.md +++ b/mevislab.github.io/content/tutorials/dataobjects/contours/contourexample5.md @@ -18,19 +18,18 @@ menu: ## Introduction -In this example, we like to automatically create CSOs based on a predefined iso value. +In this example, we like to automatically create CSOs based on a predefined isovalue. -## Steps to do -### Develop your network +## Steps to Do +### Develop Your Network Add the following modules to your workspace and connect them as shown. Load the example image *Bone.tiff*. -### Automatic creation of CSOs based on the iso value +### Automatic Creation of CSOs Based on the Isovalue Now, open the panel of `CSOIsoGenerator` to set the *Iso Value* to 1200. If you press *Update* in -the panel, you can see the creation of CSOs on every slide, when opening -the module `View2D`. In addition to that the number of CSOs is displayed in the `CSOManager`. The module -`CSOIsoGenerator` generates iso-contours for each slice at a fixed iso -value. This means that closed CSOs are formed based on the detection of the +the panel, you can see the creation of CSOs on every slide when opening +the module `View2D`. In addition to that, the number of CSOs is displayed in the `CSOManager`. The module +`CSOIsoGenerator` generates isocontours for each slice at a fixed isovalue. This means that closed CSOs are formed based on the detection of the voxel value of 1200 on every slice. ![Data Objects Contours Example 5](/images/tutorials/dataobjects/contours/DO5_02.png "Data Objects Contours Example 5") @@ -39,13 +38,13 @@ voxel value of 1200 on every slice. Now, we like to make CSOs of previous and subsequent slices visible (Ghosting). In order to do that, open the panel of `SoCSOVisualizationSettings` and open the tab *Misc*. Increase the parameter `Ghosting depth in voxel`, -which shows you the number of slices above and below the current slice, +which shows you the number of slices above and below the current slice in which CSOs are also seen in the viewer. The result can be seen in the viewer. ![Ghosting](/images/tutorials/dataobjects/contours/DO5_04.png "Ghosting") -### Display created CSOs +### Display Created CSOs At last, we like to make all CSOs visible in a 3D viewer. To do that, add the modules `SoCSO3DRenderer` and `SoExaminerViewer` to your network and connect them as shown. In the viewer `SoExaminerViewer` you can see @@ -54,8 +53,8 @@ all CSOs together. In this case all scanned bones can be seen. ![CSOs in 3D View](/images/tutorials/dataobjects/contours/DO5_05.png "CSOs in 3D View") ## Summary -* `CSOIsoGenerator` enables automatic COS generation based on an iso value -* Ghosting allows to display CSOs of previous and following slices +* `CSOIsoGenerator` enables automatic CSO generation based on an isovalue. +* Ghosting allows to display CSOs of previous and following slices. {{< networkfile "examples/data_objects/contours/example5/ContourExample5.mlab" >}} diff --git a/mevislab.github.io/content/tutorials/dataobjects/contours/contourexample6.md b/mevislab.github.io/content/tutorials/dataobjects/contours/contourexample6.md index 68fa79732..d7436635d 100644 --- a/mevislab.github.io/content/tutorials/dataobjects/contours/contourexample6.md +++ b/mevislab.github.io/content/tutorials/dataobjects/contours/contourexample6.md @@ -20,8 +20,8 @@ menu: In this example, we are adding a label to a contour. The label provides information about measurements and about the contour itself. The label remains connected to the contour and can be moved via mouse interactions. -## Steps to do -### Develop your network +## Steps to Do +### Develop Your Network Add a `LocalImage` and a `View2D` module to your workspace and connect them as shown below. Load the file *ProbandT1.dcm* from MeVisLab demo data. In order to create contours (CSOs), we need a `SoView2DCSOExtensibleEditor` module. It manages attached CSO editors, renderers and offers an optional default renderer for all types of CSOs. @@ -35,7 +35,7 @@ We are now able to create lines in the `View2D`. You can also modify the lines b ![SoCSODistanceLineEditor](/images/tutorials/dataobjects/contours/Ex6_2.png "SoCSODistanceLineEditor") -The created lines do neither provide any details about the length of your measurement, nor a unique ID to identify it in case of multiple CSOs. +The created lines do neither provide any details about the length of your measurement, nor a unique ID to identify it in the case of multiple CSOs. Add a `CSOLabelRenderer` module to your network and connect it to a `SoGroup`. Also connect your `SoCSODistanceLineEditor` to the `SoGroup` as seen below. The *ID* of each CSO appears next to your distance lines. Moving the ID also shows the *name* of the contour. @@ -46,7 +46,7 @@ We now want to customize the details to be shown for each distance line. Open th Enter the following to the panel of the `CSOLabelRenderer` module: {{< highlight filename="CSOLabelRenderer" >}} ```Python -labelString = f"Length {cso.getLength()}" +labelString = f"Length: {cso.getLength()}" labelName = f"Distance: {cso.getId()}" deviceOffsetX = 0 deviceOffsetY = 0 @@ -64,11 +64,11 @@ labelString = f'Length: {cso.getLength():.2f} mm' ``` {{}} -In order to see all possible parameters of a CSO, add a `CSOInfo` module to your network and connect it to the `CSOManager`. The geometric informations of the selected CSO from `CSOManager` can be seen there. +In order to see all possible parameters of a CSO, add a `CSOInfo` module to your network and connect it to the `CSOManager`. The geometric information of the selected CSO from `CSOManager` can be seen there. ![CSOInfo](/images/tutorials/dataobjects/contours/Ex6_CSOInfo.png "CSOInfo") -For labels shown on greyscale images, it makes sense to add a shadow. Open the panel of the `SoCSOVisualizationSettings` module and on tab *Misc* check the option *Should render shadow*. This increases the readability of your labels. +For labels shown on grayscale images, it makes sense to add a shadow. Open the panel of the `SoCSOVisualizationSettings` module and on tab *Misc* check the option *Should render shadow*. This increases the readability of your labels. {{< imagegallery 2 "/images/tutorials/dataobjects/contours/" "Ex6_NoShadow" "Ex6_Shadow" >}} @@ -120,7 +120,7 @@ You will find a lot more information in the `CSOInfo` module for your rectangles ![CSOInfo](/images/tutorials/dataobjects/contours/Ex6_10.png "CSOInfo") -## Parameters and meanings for all CSO types +## Parameters and Meanings for All CSO Types diff --git a/mevislab.github.io/content/tutorials/dataobjects/contours/contourexample7.md b/mevislab.github.io/content/tutorials/dataobjects/contours/contourexample7.md index e9304152c..ef9d3371f 100644 --- a/mevislab.github.io/content/tutorials/dataobjects/contours/contourexample7.md +++ b/mevislab.github.io/content/tutorials/dataobjects/contours/contourexample7.md @@ -18,7 +18,7 @@ menu: ## Introduction -In this example, we are using the module `CSOListContainer` instead of the `CSOManager`. The `CSOManager` is a heavy weight, UI driven module. You can use it to see all of your CSOs, CSOLists and CSOGroups in the module panel. The `CSOListContainer` is a light weight module with focus on Python scripting. We recommend to use this module for final application development, because Python provides much more flexibility in handling CSO objects. +In this example, we are using the module `CSOListContainer` instead of the `CSOManager`. The `CSOManager` is a heavyweight, UI driven module. You can use it to see all of your CSOs and CSOGroups in the module panel. The `CSOListContainer` is a lightweight module with focus on Python scripting. We recommend to use this module for final application development, because Python provides much more flexibility in handling CSO objects. ![CSOManager](/images/tutorials/dataobjects/contours/Example_7_1.png "CSOManager") @@ -26,10 +26,10 @@ In this example, we are using the module `CSOListContainer` instead of the `CSOM We will create multiple CSOs by using the `SoCSOEllipseEditor` and dynamically add these CSOs to different groups via Python scripting depending on their size. CSOs larger than a configurable threshold will be red, small CSOs will be drawn green. The colors will also be adapted if we manually resize the contours. -## Steps to do -### Develop your network +## Steps to Do +### Develop Your Network -Add a `LocalImage` and a `View2D` module to your workspace and connect them as shown below. Load the file *ProbandT1.dcm* from MeVisLab demo data. In order to create contours (CSOs), we need a `SoView2DCSOExtensibleEditor` module. It manages attached CSO editors, renderers and offers an optional default renderer for all types of CSOs. +Add a `LocalImage` and a `View2D` module to your workspace and connect them as shown below. Load the file *ProbandT1.dcm* from MeVisLab demo data. In order to create contours (CSOs), we need a `SoView2DCSOExtensibleEditor` module. It manages attached CSO editors, renderers, and offers an optional default renderer for all types of CSOs. Add a `SoCSOEllipseEditor` and a `CSOListContainer` to the `SoView2DCSOExtensibleEditor` @@ -39,7 +39,7 @@ You are now able to draw CSOs. Create a separate directory for this tutorial and save your network in this empty directory. This makes the final structure easier to read. -### Create a local macro module +### Create a Local Macro Module Select the module `CSOListContainer` and open menu {{}}. Enter some details about your new local macro module and click finish. Leave the already defined output as is. ![Create Local Macro](/images/tutorials/dataobjects/contours/Example_7_4.png "Create Local Macro") @@ -48,13 +48,13 @@ The appearance of the `CSOListContainer` module changes, because it is a macro m ![Network with new local macro](/images/tutorials/dataobjects/contours/Example_7_5.png "Network with new local macro") -The behavior of your network does not change. You can still draw the same CSOs and they are still managed by the `CSOListContainer` module. The reason why we created a local macro with a single module inside is, that we want to add Python scripting to the module. Python scripts can only be added to macro modules. +The behavior of your network does not change. You can still draw the same CSOs and they are still managed by the `CSOListContainer` module. The reason why we created a local macro with a single module inside is that we want to add Python scripting to the module. Python scripts can only be added to macro modules. Open the context menu of your `csoList` module {{< mousebutton "right" >}} and select {{}}. -The MeVisLab text editor MATE opens, showing your script file. You can see the output of your module as *CSOListContainer.outCSOList*. We want to define a threshold for the color of our CSOs. Therefore add another field to the *Parameters* section of your script file named *areaThreshold*. Define the *type* as *Float* and *value* as *2000.0*. +The MeVisLab text editor MATE opens, showing your script file. You can see the output of your module as *CSOListContainer.outCSOList*. We want to define a threshold for the color of our CSOs. For this, add another field to the *Parameters* section of your script file named *areaThreshold*. Define the *type* as *Float* and *value* as *2000.0*. -In order to call Python functions, we also need a Python file. Add a *Commands* section and define the *source* of the Python file as *$(LOCAL)/csoList.py*. Also add an *initCommand* as *initCSOList*. The initCommand defines the Python function which is called whenever the module is added to the workspace or reloaded. +In order to call Python functions, we also need a Python file. Add a *Commands* section and define the *source* of the Python file as *$(LOCAL)/csoList.py*. Also add an *initCommand* as *initCSOList*. The initCommand defines the Python function that is called whenever the module is added to the workspace or reloaded. {{< highlight filename="csoList.script" >}} ```Stan @@ -81,7 +81,7 @@ Right-click {{< mousebutton "right" >}} on the *initCSOList* command and select Back in MeVisLab, the new field *areaThreshold* can be seen in Module Inspector when selecting your module. The next step is to write the Python function *initCSOList*. -### Write Python script +### Write Python Script Whenever the local macro module is added to the workspace or reloaded, new CSOLists shall be created and we need a possibility to update the lists whenever a new CSO has been created or existing contours changed. Define a function *setupCSOList*. @@ -109,7 +109,7 @@ The function gets the current CSOList from the output field of the `CSOListConta We also create two new CSO lists: one list for small contours, one list for larger contours, depending on the defined *areaThreshold* from the modules parameter. -Additionally, we also want to define different colors for the CSOs in the lists. Small contours shall be drawn green, large contours shall be red. +Additionally, we also want to define different colors for the CSOs in the lists. Small contours shall be drawn green, large contours shall be drawn red. In order to listen for changes on the contours, we need to register for notifications. Create a new function *registerForNotification*. diff --git a/mevislab.github.io/content/tutorials/dataobjects/curves/curvesexample1.md b/mevislab.github.io/content/tutorials/dataobjects/curves/curvesexample1.md index fff6fbc1c..fb8ac25fe 100644 --- a/mevislab.github.io/content/tutorials/dataobjects/curves/curvesexample1.md +++ b/mevislab.github.io/content/tutorials/dataobjects/curves/curvesexample1.md @@ -12,7 +12,7 @@ menu: weight: 780 parent: "curves" --- -# Example 1: Drawing curves +# Example 1: Drawing Curves {{< youtube "sj6muyInkRc">}} @@ -20,14 +20,14 @@ menu: In this example, you will draw one or more curves into a diagram and define different styles for the curves. -## Steps to do -### Develop your network +## Steps to Do +### Develop Your Network A curve requires x- and y-coordinates to be printed. You can use the `CurveCreator` module as input for these coordinates. The `SoDiagram2D` draws the curves into a `SoRenderArea`. You can also define the style of the curves by using the `StylePalette` module. Add the modules to your workspace and connect them as seen below. ![Example Network](/images/tutorials/dataobjects/curves/example_network.png "Example Network") -### Creating a curve +### Creating a Curve Click on the output of the CurveCreator and open the Output Inspector. ![Empty Output Inspector](/images/tutorials/dataobjects/curves/OutputInspector_empty.png "Empty Output Inspector") @@ -36,7 +36,7 @@ Double-click {{}} on the `CurveCreator` module and open the ![CurveCreator Module](/images/tutorials/dataobjects/curves/CurveCreatorModule.png "CurveCreator Module") -You can see a large input field *Curve Table*. Here you can enter the x and y values of your curve. The values of the first column will become the x-values and the 2nd any further column will become the y-series. Comment lines start with a '#' character. +You can see a large input field *Curve Table*. Here you can enter the x- and y-values of your curve. The values of the first column will become the x-values and the 2nd any further column will become the y-series. Comment lines start with a '#' character. Enter the following into the *Curve Table*: {{< highlight filename="Curve Table" >}} @@ -57,8 +57,8 @@ Now your *Output Inspector* shows a yellow line through the previously entered c ![SoRenderArea](/images/tutorials/dataobjects/curves/SoRenderArea.png "SoRenderArea") -### Creating multiple curves -Now, update the *Curve Table* so that you are using 3 columns and click *Update* {{}}: +### Creating Multiple Curves +Now, update the *Curve Table* so that you are using three columns and click *Update* {{}}: {{< highlight filename="Curve Table" >}} ```Text # My first curve @@ -73,13 +73,13 @@ Now, update the *Curve Table* so that you are using 3 columns and click *Update* ``` {{}} -You can see 2 curves. The second and third columns are printed as separate curves. Both appear yellow. After checking *Split columns into data sets*, you will see one yellow and one red curve. +You can see two curves. The second and third columns are printed as separate curves. Both appear yellow. After checking *Split columns into data sets*, you will see one yellow and one red curve. {{}} If the flag *Split columns into data sets* is set to *TRUE*, then a table with more than two columns is split into different *CurveData* objects. This gives the user the possibility to assign a different style and title for each series. -### Titles and styles +### Titles and Styles Let's do this. Open the panel of the `SoDiagram2D` module and check *Draw legend*. Enter *"Curve1 Curve2"* into the *Title(s)* text box of the `CurveCreator` module and click *Update* {{}}. ![SoRenderArea with Legend](/images/tutorials/dataobjects/curves/SoRenderArea2.png "SoRenderArea with Legend") @@ -90,15 +90,15 @@ Now open the panel of the `StylePalette` module. ![StylePalette](/images/tutorials/dataobjects/curves/StylePalette.png "StylePalette") -The `StylePalette` allows you to define 12 different styles for curves. Initially without manual changes, the styles are applied one after the other. The first curve gets style 1, the second curve style 2, and so on. +The `StylePalette` allows you to define twelve different styles for curves. Initially, without manual changes, the styles are applied one after the other. The first curve gets style 1, the second curve style 2, and so on. Open the Panel of your `CurveCreator` again and define *Curve Style(s)* as *"3 6"*. *Update* {{}} your curves. ![StylePalette applied](/images/tutorials/dataobjects/curves/StylePalette_applied.png "StylePalette applied") -You now applied the style 3 for your first curve and 6 for the second. This is how you can create 12 different curves with unique appearance. +You now applied the style three for your first curve and six for the second. This is how you can create twelve different curves with unique appearance. -### Using multiple tables for curve generation +### Using Multiple Tables for Curve Generation In addition to adding multiple columns for different y-coordinates, you can also define multiple tables as input, so that you can also have different x-coordinates for multiple curves. Update the *Curve Table* as defined below and click *Update* {{}}: @@ -138,9 +138,9 @@ For more complex visualizations, you can also use Matplotlib. See examples at [T {{}} ## Summary -* Curves can be created to draw 2-dimensional diagrams -* The `StylePalette` allows you to define the appearance of a curve -* Details of the different curves can be visualized by using the `SoDiagram2D` module +* Curves can be created to draw two-dimensional diagrams. +* The `StylePalette` allows you to define the appearance of a curve. +* Details of the different curves can be visualized by using the `SoDiagram2D` module. {{}} The attached example network shows the curves after clicking *Update* on `CurveCreator` module. diff --git a/mevislab.github.io/content/tutorials/dataobjects/markerobjects.md b/mevislab.github.io/content/tutorials/dataobjects/markerobjects.md index b52882e47..fc4064a20 100644 --- a/mevislab.github.io/content/tutorials/dataobjects/markerobjects.md +++ b/mevislab.github.io/content/tutorials/dataobjects/markerobjects.md @@ -13,18 +13,18 @@ menu: parent: "dataobjects" --- # Markers in MeVisLab {#MarkersInMeVisLab} -In MeVisLab you can equip images and other data objects with markers. In this example you will see how to create, process and use markers. +In MeVisLab you can equip images and other data objects with markers. In this example you will see how to create, process, and use markers. ## Creation and Rendering -To create markers, you can use a marker editor, for example the `SoView2DMarkerEditor`. Connect this editor to a viewer as shown below. Now you can interactively create new markers. Connect the module `XMarkerListContainer` to your marker editor to store markers in a list. +To create markers, you can use a marker editor, for example, the `SoView2DMarkerEditor`. Connect this editor to a viewer as shown below. Now you can interactively create new markers. Connect the module `XMarkerListContainer` to your marker editor to store markers in a list. ![Create Markers](/images/tutorials/dataobjects/markers/DO_Markers_01.png "Create Markers") -Using the module `StylePalette` you can define a style for your markers. In order to set different styles for different markers, change the field *Color Mode* in the Panel of `SoView2DMarkerEditor` to *Index*. +Using the module `StylePalette`, you can define a style for your markers. In order to set different styles for different markers, change the field *Color Mode* in the Panel of `SoView2DMarkerEditor` to *Index*. ![Style of Markers](/images/tutorials/dataobjects/markers/DO_Markers_08.png "Style of Markers") -With the help of the module `So3DMarkerRenderer` markers of an `XMarkerList` can be rendered. +With the help of the module `So3DMarkerRenderer`, markers of an `XMarkerList` can be rendered. ![Rendering of Markers](/images/tutorials/dataobjects/markers/DO_Markers_09.png "Rendering of Markers") @@ -32,7 +32,7 @@ With the help of the module `So3DMarkerRenderer` markers of an `XMarkerList` can {{}} It is possible to convert other data objects into markers and also to convert markers into other data objects. -It is, for example, possible to set markers by using the `MaskToMarkers`-module and later on generate a surface object from a list of markers, using the `MaskToSurface`-module. Marker conversion can also be done by various other modules, listed in [/Modules/Geometry/Markers]. +It is, for example, possible to set markers by using the `MaskToMarkers` module and later on generate a surface object from a list of markers using the `MaskToSurface` module. Marker conversion can also be done by various other modules, listed in [/Modules/Geometry/Markers]. {{}} Learn how to convert markers by building the following network. Press the *Reload* buttons of the modules `MaskToMarkers` and `MarkersToSurface` to enable the conversion. Now you can see both the markers and the created surface in the module `SoExaminerViewer`. Use the toggle options of `SoToggle` and `SoWEMRenderer` to enable or disable the visualization of markers and surface. diff --git a/mevislab.github.io/content/tutorials/dataobjects/markers/markerexample1.md b/mevislab.github.io/content/tutorials/dataobjects/markers/markerexample1.md index 4b6dbf85e..449a0524f 100644 --- a/mevislab.github.io/content/tutorials/dataobjects/markers/markerexample1.md +++ b/mevislab.github.io/content/tutorials/dataobjects/markers/markerexample1.md @@ -12,7 +12,7 @@ menu: weight: 755 parent: "markers" --- -# Example 1: Calculating the distance between markers +# Example 1: Calculating the Distance Between Markers {{< youtube "xYR5Qkze0lE">}} @@ -20,33 +20,33 @@ menu: 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 +## 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. Open the panel of `SoView2DMarkerEditor` and select the tab *Drawing*. Now chose the *Color* *red*. +We changed the names of the modules `SoView2DMarkerEditor` and `XMarkerListContainer`, to distinguish these modules from two similar modules we will add later on. Open the panel of `SoView2DMarkerEditor` and select the tab *Drawing*. Now choose the *Color* *red*. ![Marker Color](/images/tutorials/dataobjects/markers/DO_Markers_03.png "Marker Color") -As a next step, add two more modules: `SoView2DMarkerEditor` and `XMarkerLIstContainer`. +As a next step, add two more modules: `SoView2DMarkerEditor` and `XMarkerListContainer`. -Change their names and the marker color to *green* and connect them as shown. We also like to change the mouse button you need to press, in order to create a marker. This allows to place both types of markers, the red ones and the green ones. In order to do this, open the panel of `GreenMarker`. Under *Buttons* you can adjust, which button needs to be pressed in order to place a marker. Select the *Button2* (the middle button of your mouse {{< mousebutton "middle" >}}) instead of *Button1* (the left mouse button {{< mousebutton "left" >}}). +Change their names and the marker color to *green* and connect them as shown. We also like to change the mouse button you need to press in order to create a marker. This allows to place both types of markers, the red ones and the green ones. In order to do this, open the panel of `GreenMarker`. Under *Buttons* you can adjust which button needs to be pressed in order to place a marker. Select the *Button2* (the middle button of your mouse {{< mousebutton "middle" >}}) instead of *Button1* (the left mouse button {{< mousebutton "left" >}}). In addition to that, we like to allow only one green marker to be present. If we place a new marker, the old marker should vanish. For this, select the *Max Size* to be one and select *Overflow Mode: Remove All*. ![Marker Editor Settings](/images/tutorials/dataobjects/markers/DO_Markers_04.png "Marker Editor Settings") -### Create markers of different type +### Create Markers of Different Type Now we can place as many red markers as we like, using the left mouse button {{< mousebutton "left" >}} and one green marker using the middle mouse button {{< mousebutton "middle" >}}. ![Two Types of Markers](/images/tutorials/dataobjects/markers/DO_Markers_05.png "Two Types of Markers") -### Calculate the distance between markers -We like to calculate the minimum and maximum distance of the green marker to all the red markers. In order to do this, add the module `DistanceFromXMarkerList` and connect it to `RedMarkerList`. Open the panels of `DistanceFromXMarkerList` and `GreenMarkerList`. Now, draw a parameter connection from the coordinates of the green marker, which are stored in the field *Current Item -> Position* in the panel of `GreenMarkerList` to the field *Position* of `DistanceFromXMarkerList`. You can now press *Calculate Distance* in the panel of `DistanceFromXMatkerList` to see the result, meaning the distance of the green marker to all the red markers in the panel of `DistanceFromXMarkerList`. +### Calculate the Distance Between Markers +We like to calculate the minimum and maximum distance of the green marker to all the red markers. In order to do this, add the module `DistanceFromXMarkerList` and connect it to `RedMarkerList`. Open the panels of `DistanceFromXMarkerList` and `GreenMarkerList`. Now, draw a parameter connection from the coordinates of the green marker, which are stored in the field *Current Item -> Position* in the panel of `GreenMarkerList`, to the field *Position* of `DistanceFromXMarkerList`. You can now press *Calculate Distance* in the panel of `DistanceFromXMatkerList` to see the result, meaning the distance of the green marker to all the red markers in the panel of `DistanceFromXMarkerList`. ![Module DistanceFromXMarkerList](/images/tutorials/dataobjects/markers/DO_Markers_06.png "Module DistanceFromXMarkerList") -### Automation of distance calculation +### Automation of Distance Calculation To automatically update the calculation when placing a new marker, we need to tell the module `DistanceFromXMarkerList` **when** a new green marker is placed. Open the panels of `DistanceFromXMarkerList` and `GreenMarker` and draw a parameter connection from the field *Currently busy* in the panel of `GreenMarker` to *Calculate Distance* in the panel of `DistanceFromXMarkerList`. If you now place a new green marker, the distance from the new green marker to all red markers is automatically calculated. ![Calculation of Distance between Markers](/images/tutorials/dataobjects/markers/DO_Markers_07.png "Calculation of Distance between Markers") @@ -55,8 +55,8 @@ Another example for using a `SoView2DMarkerEditor` module can be found at [Image {{}} ## Summary -* Markers can be created using `SoView2DMarkerEditor` -* Markers can be stored and managed using `XMarkerListContainer` -* The distance between markers can be calculated using `DistanceFromXMarkerList` +* Markers can be created using `SoView2DMarkerEditor`. +* Markers can be stored and managed using `XMarkerListContainer`. +* The distance between markers can be calculated using `DistanceFromXMarkerList`. {{< networkfile "examples/data_objects/markers/example1/Marker_Example1.mlab" >}} diff --git a/mevislab.github.io/content/tutorials/dataobjects/surfaceobjects.md b/mevislab.github.io/content/tutorials/dataobjects/surfaceobjects.md index 91741c07d..0815f80c1 100644 --- a/mevislab.github.io/content/tutorials/dataobjects/surfaceobjects.md +++ b/mevislab.github.io/content/tutorials/dataobjects/surfaceobjects.md @@ -14,15 +14,15 @@ menu: --- # Surface Objects (WEMs){#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 {{< docuLinks "/Resources/Documentation/Publish/SDK/ToolBoxReference/WEMDataStructure.html" "MeVislab Toolbox Reference" >}}. If you like to know which WEM formats can be imported into MeVisLab, take a look at the assimp documentation [here](https://github.com/assimp/assimp). +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 {{< docuLinks "/Resources/Documentation/Publish/SDK/ToolBoxReference/WEMDataStructure.html" "MeVislab Toolbox Reference" >}}. If you like to know which WEM formats can be imported into MeVisLab, take a look at the *assimp* documentation [here](https://github.com/assimp/assimp). [//]: <> (MVL-653) -## WEM explained with MeVisLab -To explain WEMs in MeVisLab we will build a network, which shows the structure and the characteristics of WEMs. We will start the example by generating a WEM forming a cube. With this, we will explain structures of WEMs called *Edges*, *Nodes*, *Surfaces*, and *Normals*. +## WEM Explained with MeVisLab +To explain WEMs in MeVisLab, we will build a network that shows the structure and the characteristics of WEMs. We will start the example by generating a WEM forming a cube. With this, we will explain structures of WEMs called *Edges*, *Nodes*, *Surfaces*, and *Normals*. ### Initialize a WEM -Add the module `WEMInitialize` to your workspace, open its panel and select a *Cube*. In general, a WEM is made up of surfaces. Here all surfaces are squares. In MeVisLab it is common to build WEMs out of triangles. +Add the module `WEMInitialize` to your workspace, open its panel, and select a *Cube*. In general, a WEM is made up of surfaces. Here all surfaces are squares. In MeVisLab it is common to build WEMs out of triangles. ![WEM initializing](/images/tutorials/dataobjects/surfaces/WEM_01_1.png "WEM initializing") @@ -32,27 +32,31 @@ For rendering WEMs, you can use the module `SoWEMRenderer` in combination with t ![WEM rendering](/images/tutorials/dataobjects/surfaces/WEM_01_2.png "WEM rendering") ### Geometry of WEMs -The geometry of WEMs is given by different structures. Using specialized WEM-Renderer modules, all structures can be visualized. +The geometry of WEMs is given by different structures. Using specialized WEM renderer modules, all structures can be visualized. + #### Edges -Add and connect the module `SoWEMRendererEdges` to your workspace to enable the rendering of WEM Edges. Here, we manipulated the line thickness, to make the lines of the edges thicker. +Add and connect the module `SoWEMRendererEdges` to your workspace to enable the rendering of WEM Edges. Here, we manipulated the line thickness to make the lines of the edges thicker. ![WEM Edges](/images/tutorials/dataobjects/surfaces/WEM_01_3.png "WEM Edges") + #### Nodes -Nodes mark the corner points of each surface. Therefore, nodes define the geometric properties of every WEM. To visualize the nodes, add and connect the module `SoWEMRendererNodes` as shown. Per default, the nodes are visualized with an offset to the position they are located in. We reduced the offset to be zero, increased the point size and changed the color. +Nodes mark the corner points of each surface. Therefore, nodes define the geometric properties of every WEM. To visualize the nodes, add and connect the module `SoWEMRendererNodes` as shown. By default, the nodes are visualized with an offset to the position they are located in. We reduced the offset to be zero, increased the point size, and changed the color. ![WEM Nodes](/images/tutorials/dataobjects/surfaces/WEM_01_4.png "WEM Nodes") + #### Faces -Between the nodes and alongside the edges surfaces are created. The rendering of these surfaces can be enabled and disabled using the panel of `SoWEMRenderer`. +Between the nodes and alongside the edges, surfaces are created. The rendering of these surfaces can be enabled and disabled using the panel of `SoWEMRenderer`. ![WEM Faces](/images/tutorials/dataobjects/surfaces/WEM_01_5.png "WEM Faces") + #### Normals -Normals display the orthogonal vector either to the faces (Face Normals) or to the nodes (Nodes Normals). With the help of the module `SoWEMRendererNormals` these structures can be visualized. +Normals display the orthogonal vector either to the faces (Face Normals) or to the nodes (Nodes Normals). With the help of the module `SoWEMRendererNormals`, these structures can be visualized. ![WEM normal editor](/images/tutorials/dataobjects/surfaces/WEM_01_6.png "WEM normal editor") {{< imagegallery 2 "images/tutorials/dataobjects/surfaces/" "WEMNodeNormals" "WEMFaceNormals">}} ### WEMs in MeVisLab {#WEMsInMevislab} -In MeVisLab WEMs can consist of triangles, squares or other polygons. Most common in MeVisLab are surfaces composed of triangles, as shown in the following example. With the help of the module `WEMLoad` existing WEMs can be loaded into the network. +In MeVisLab, WEMs can consist of triangles, squares, or other polygons. Most common in MeVisLab are surfaces composed of triangles, as shown in the following example. With the help of the module `WEMLoad`, existing WEMs can be loaded into the network. {{< imagegallery 3 "images/tutorials/dataobjects/surfaces/" "WEMTriangles" "WEMNetwork" "WEMSurface" >}} ## Summary -* WEMs are polygon meshes, in most cases composed of triangles -* WEM's geometry is determined by nodes, edges, faces and normals, which can be visualized using renderer modules +* WEMs are polygon meshes, in most cases composed of triangles. +* WEM's geometry is determined by nodes, edges, faces, and normals, which can be visualized using renderer modules. diff --git a/mevislab.github.io/content/tutorials/dataobjects/surfaces/surfaceexample1.md b/mevislab.github.io/content/tutorials/dataobjects/surfaces/surfaceexample1.md index 6b60f9f60..bb0d15d56 100644 --- a/mevislab.github.io/content/tutorials/dataobjects/surfaces/surfaceexample1.md +++ b/mevislab.github.io/content/tutorials/dataobjects/surfaces/surfaceexample1.md @@ -19,22 +19,22 @@ menu: ## 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)](tutorials/dataobjects/surfaceobjects). -## Steps to do +## Steps to Do -### From image to surface: Generating WEMs out of voxel images +### 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`. Add and connect the shown modules. Load the image *$(DemoDataPath)/Bone.tiff* and set the *Iso Min. Value* in the panel of `WEMIsoSurface` to 1200. Tick the box *Use image max. value*. The module `WEMIsoSurface` creates surface objects out of all voxels with an Iso value equal or above 1200 (and smaller than the image max value). The module `SoWEMRenderer` can now be used to generate an Open Inventor scene, which can be displayed by the module `SoExaminerViewer`. +At first, we will create a WEM out of a voxel image using the module `WEMIsoSurface`. Add and connect the shown modules. Load the image *$(DemoDataPath)/Bone.tiff* and set the *Iso Min. Value* in the panel of `WEMIsoSurface` to 1200. Tick the box *Use image max. value*. The module `WEMIsoSurface` creates surface objects out of all voxels with an isovalue equal or above 1200 (and smaller than the image max value). The module `SoWEMRenderer` can now be used to generate an Open Inventor scene, which can be displayed by the module `SoExaminerViewer`. ![WEM](/images/tutorials/dataobjects/surfaces/DO6_01.png "WEM") -### From surface to image: Generating voxel images out of WEM +### From Surface to Image: Generating Voxel Images out of WEM It is not only possible to create WEMs out of voxel images. You can also transform WEMs into voxel images: Add and connect the modules `VoxelizeWEM` and `View2D` as shown and press the *Update* button of the module `VoxelizeWEM`. ![WEM](/images/tutorials/dataobjects/surfaces/DO6_02.png "WEM") ### From Contour to Surface: Generating WEMs out of CSOs -Now we like to create WEMs out of CSOs. To create CSOs load the network from [Contour Example 2](tutorials/dataobjects/contours/contourexample2) and create some CSOs. +Now we like to create WEMs out of CSOs. To create CSOs, load the network from [Contour Example 2](tutorials/dataobjects/contours/contourexample2) and create some CSOs. Next, add and connect the module `CSOToSurface` to convert CSOs into a surface object. To visualize the created WEM, add and connect the modules `SoWEMRenderer` and `SoExaminerViewer`. @@ -47,10 +47,10 @@ It is also possible to display the WEM in 2D in addition to the original image. If you like to transform WEMs back into CSOs, take a look at the module `WEMClipPlaneToCSO`. ## Summary -* Voxel images can be transformed into WEMs using `WEMIsoSurface` -* WEMs can be transformed into voxel images using `VoxelizeWEM` -* CSOs can be transformed into WEMS using `CSOToSurface` -* WEMs can be transformed into voxel images using `WEMClipPlaneToCSO` +* Voxel images can be transformed into WEMs using `WEMIsoSurface`. +* WEMs can be transformed into voxel images using `VoxelizeWEM`. +* CSOs can be transformed into WEMS using `CSOToSurface`. +* WEMs can be transformed into voxel images using `WEMClipPlaneToCSO`. {{}} Whenever converting voxel data to pixel data, keep the so called **Partial Volume Effect** in mind, see [wikipedia](https://en.wikipedia.org/wiki/Partial_volume_(imaging) "Partial Volume Effect") for details. diff --git a/mevislab.github.io/content/tutorials/dataobjects/surfaces/surfaceexample2.md b/mevislab.github.io/content/tutorials/dataobjects/surfaces/surfaceexample2.md index fd0269a25..de29133fe 100644 --- a/mevislab.github.io/content/tutorials/dataobjects/surfaces/surfaceexample2.md +++ b/mevislab.github.io/content/tutorials/dataobjects/surfaces/surfaceexample2.md @@ -19,25 +19,25 @@ menu: ## Introduction In this example, you will learn how to modify and process WEMs. -## Steps to do -### Develop your network +## 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. In its panel, change the scale and the size of the WEM. Now you see two times the `venus` next to each other. ![WEMModify](/images/tutorials/dataobjects/surfaces/DO7_01.png "WEMModify") #### Smoothing of WEMs -It is possible to smooth the WEM using the module `WEMSmooth`. Add this module to your network as shown. You can see the difference of the smoothed and the unsmoothed WEM in your viewer. There are more modules, which can modify WEMs, for example `WEMExtrude`. You can find them via search or in {{< menuitem "Modules" "Visualization" "Surface Meshes (WEM)" >}}. +It is possible to smooth the WEM using the module `WEMSmooth`. Add this module to your network as shown. You can see the difference of the smoothed and the unsmoothed WEM in your viewer. There are more modules that can modify WEMs, for example, `WEMExtrude`. You can find them via search or in {{< menuitem "Modules" "Visualization" "Surface Meshes (WEM)" >}}. ![WEMSmooth](/images/tutorials/dataobjects/surfaces/DO7_02.png "WEMSmooth") -#### Calculate distance between WEMs +#### Calculate Distance Between WEMs Now, we like to calculate the distance between our two WEMs. In order to do this, add and connect the module `WEMSurfaceDistance` as shown. ![Calculate surface distance](/images/tutorials/dataobjects/surfaces/DO7_03.png "Calculate surface distance") #### Annotations in 3D -As a last step, we like to draw the calculated distances as annotations into the image. This is a little bit tricky as we need the module `SoView2DAnnotation` to create annotations in a 3D viewer. Add and connect the following modules as shown. What is done here? We use the module `SoView2D` to display a 2D image in the `SoExaminerViewer`, in addition to the WEMs we already see in the viewer. We do not see an additional image in the viewer, as we chose no proper input image to the module `SoView2D` using the module `ConstantImage` with value 0. Thus, we pretend to have a 2D image, which we can annotate. Now, we use the module `SoView2DAnnotation` to annotate the pretended-2D-image, displayed in the viewer of `SoExaminerViewer`. We already used the module `SoView2DAnnotation` in [Contour Example 4](tutorials/dataobjects/contours/contourexample4/). +As a last step, we like to draw the calculated distances as annotations into the image. This is a little bit tricky as we need the module `SoView2DAnnotation` to create annotations in a 3D viewer. Add and connect the following modules as shown. What is done here? We use the module `SoView2D` to display a 2D image in the `SoExaminerViewer`, in addition to the WEMs we already see in the viewer. We do not see an additional image in the viewer, as we chose no proper input image to the module `SoView2D` using the module `ConstantImage` with value 0. Thus, we pretend to have a 2D image, which we can annotate. Now, we use the module `SoView2DAnnotation` to annotate the pretended 2D image, displayed in the viewer of `SoExaminerViewer`. We already used the module `SoView2DAnnotation` in [Contour Example 4](tutorials/dataobjects/contours/contourexample4/). In the `SoView2D` module, you need to uncheck the option *Draw image data*. @@ -63,9 +63,9 @@ Now, you can see the result in the viewer. If the annotations are not visible, p ![Display surface distance in viewer](/images/tutorials/dataobjects/surfaces/DO7_09.png "Display surface distance in viewer") ## Summary -* There are several modules to modify and process WEMs, e.g. `WEMModify`, `WEMSmooth`. +* There are several modules to modify and process WEMs, e.g., `WEMModify`, `WEMSmooth`. * To calculate the minimal and maximal surface distance between two WEMs, use the module `WEMSurfaceDistance`. -* To create annotations in 3D, the module `SoView2DAnnotation` can be used, when adapted to be used in combination with a 3D viewer. +* To create annotations in 3D, the module `SoView2DAnnotation` can be used when adapted to be used in combination with a 3D viewer. {{< networkfile "examples/data_objects/surface_objects/example2/SurfaceExample2.mlab" >}} diff --git a/mevislab.github.io/content/tutorials/dataobjects/surfaces/surfaceexample3.md b/mevislab.github.io/content/tutorials/dataobjects/surfaces/surfaceexample3.md index 361ac4c9d..431a84da2 100644 --- a/mevislab.github.io/content/tutorials/dataobjects/surfaces/surfaceexample3.md +++ b/mevislab.github.io/content/tutorials/dataobjects/surfaces/surfaceexample3.md @@ -17,28 +17,28 @@ menu: {{< youtube "YDOEqCOmUFw">}} ## Introduction -In these examples, we are showing 2 different possibilities to interact with a WEM: +In these examples, we are showing two 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 +### 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`. For a better understanding, you should also add a `SoCoordinateSystem` module and connect it to the viewer. Change the *User Transform Mode* to *User Transform Instead Of Input* and set *User Scale* to 2 for *x*, *y* and *z*. ![Initial Network](/images/tutorials/dataobjects/surfaces/WEMExample3_1.png "Initial Network") -The `SoExaminerViewer` shows your cube and the world coordinate system. You can interact with the camera (rotate, zoom and pan), the cube itself does not change and remains in the center of the coordinate system. +The `SoExaminerViewer` shows your cube and the world coordinate system. You can interact with the camera (rotate, zoom, and pan), the cube itself does not change and remains in the center of the coordinate system. ![Initial Cube](/images/tutorials/dataobjects/surfaces/WEMExample3_2.png "Initial Cube") -Scaling, rotation and translations on the cube itself can be done by using the module `SoTransformerDragger`. Additionally add a `SoTransform` module to your network. Add all modules but the `SoCoordinateSystem` to a `SoSeparator` so that transformations are not applied to the coordinate system. +Scaling, rotating, and translating the cube itself can be done by using the module `SoTransformerDragger`. Additionally, add a `SoTransform` module to your network. Add all modules but the `SoCoordinateSystem` to a `SoSeparator` so that transformations are not applied to the coordinate system. ![SoTransformerDragger and SoTransform](/images/tutorials/dataobjects/surfaces/WEMExample3_3.png "SoTransformerDragger and SoTransform") -Draw parameter connections from *Translation*, *Scale Factor* and *Rotation* of the `SoTransformerDragger` to the same fields of the `SoTransform` module. +Draw parameter connections from *Translation*, *Scale Factor*, and *Rotation* of the `SoTransformerDragger` to the same fields of the `SoTransform` module. -Opening your SoExaminerViewer now allows you to use handles of the `SoTransformerDragger` to scale, rotate and move the cube. You can additionally interact with the camera as already done before. +Opening your SoExaminerViewer now allows you to use handles of the `SoTransformerDragger` to scale, rotate, and move the cube. You can additionally interact with the camera as already done before. {{}} You need to change the active tool on the right side of the `SoExaminerViewer`. Use the *Pick Mode* for applying transformations and the *View Mode* for using the camera. @@ -50,14 +50,14 @@ You can also try the other `So*Dragger` modules in MeVisLab for variations of th {{< networkfile "examples/data_objects/surface_objects/example3/SurfaceExample3.mlab" >}} -### Interactively modify WEMs +### Interactively Modify WEMs We are using the `WEMBulgeEditor` module to interactively modify the WEM via mouse interactions. -Add a `WEMInitialize`, a `SoWEMRenderer` and a `SoBackground` module to your workspace and connect them to a `SoExaminerViewer` as seen below. Select model *Icosahedron* for the `WEMInitialize` module. +Add a `WEMInitialize`, a `SoWEMRenderer`, and a `SoBackground` module to your workspace and connect them to a `SoExaminerViewer` as seen below. Select model *Icosahedron* for the `WEMInitialize` module. ![WEMLoad and SoWEMRenderer](/images/tutorials/dataobjects/surfaces/WEMExample3_5.png "WEMLoad and SoWEMRenderer") -You can see the WEM and interact with it in the viewer (zoom, move and rotate). In case the object does not rotate around its center, trigger the field *viewAll* of the `SoExaminerViewer`. +You can see the WEM and interact with it in the viewer (zoom, move, and rotate). In the case the object does not rotate around its center, trigger the field *viewAll* of the `SoExaminerViewer`. Add a `WEMBulgeEditor` and a `SoWEMBulgeEditor` to your network and connect them as seen below. @@ -111,6 +111,6 @@ For other interaction possibilities, you can play around with the example networ ## Summary * MeVisLab provides multiple options to interact with 3D surfaces. -* Modules of the `So*Dragger` family allow to scale, rotate and translate a WEM. +* Modules of the `So*Dragger` family allow to scale, rotate, and translate a WEM. * You can always use a `SoCoordinateSystem` to see the current world coordinates. * The `WEMBulgeEditor` allows you to interactively modify a WEM via mouse. diff --git a/mevislab.github.io/content/tutorials/dataobjects/surfaces/surfaceexample4.md b/mevislab.github.io/content/tutorials/dataobjects/surfaces/surfaceexample4.md index 028506ee7..00074ee13 100644 --- a/mevislab.github.io/content/tutorials/dataobjects/surfaces/surfaceexample4.md +++ b/mevislab.github.io/content/tutorials/dataobjects/surfaces/surfaceexample4.md @@ -12,41 +12,41 @@ menu: weight: 720 parent: "surfaces" --- -# Surface Example 4: Interactively moving WEM +# Surface Example 4: Interactively Moving WEM {{< youtube "WKiCddNGKrw">}} ## Introduction -In this example, we like to interactively move WEMs using `SoDragger` modules insight a viewer. +In this example, we like to interactively move WEMs using `SoDragger` modules inside a viewer. -### Develop your network -### Interactively translating objects in 3D using SoDragger modules +### 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*. Now, you are able to click on the presented *Octaspehere* and move it alongside one axis. The following modules are involved in the interactions: +Add and connect the following modules as shown. On the panel of the module `WEMInitialize`, select the *Model* *Octasphere*. After that, open the viewer `SoExaminerViewer` and make sure to select the *Interaction Mode*. Now, you are able to click on the presented *Octasphere* and move it alongside one axis. The following modules are involved in the interactions: * `SoMITranslate1Dragger`: This module allows interactive translation of the object alongside one axis. You can select the axis for translation in the panel of the module. * `SoMIDraggerContainer`: This module is responsible for actually changing the translation values of the object. ![Interactive dragging of objects](/images/tutorials/dataobjects/surfaces/DO10_01.png "Interactive dragging of objects") -### Interactively translating a WEM alongside three axis -We like to be able to interactively move a WEM alongside all three axis. In MeVisLab exists the module `SoMITranslate2Dragger` which allows translations alongside two axis, but there is no module which allows object translation in all three directions. Therefore, we will create a network, which solves this task. The next steps will show you, how you create three planes intersecting the objects. Dragging one plane, will drag the object alongside one axis. In addition, these planes will only be visible when hovering over them. +### Interactively Translating a WEM Alongside Three Axes +We like to be able to interactively move a WEM alongside all three axes. In MeVisLab, there is the module `SoMITranslate2Dragger`, which allows translations alongside two axis, but there is no module which allows object translation in all three directions. Therefore, we will create a network that solves this task. The next steps will show you how you create three planes intersecting the objects. Dragging one plane, will drag the object alongside one axis. In addition, these planes will only be visible when hovering over them. -#### Creation of planes intersecting an object -We start creating a plane, which will allow dragging in x direction. In order to do that, modify your network as shown: Add the modules `WEMModify`, and `SoBackground` and connect the module `SoCube` to the dragger modules. You can select the translation direction in the panel of `SoMITranslate1Dragger`. +#### Creation of Planes Intersecting an Object +We start creating a plane that will allow dragging in x-direction. In order to do that, modify your network as shown: Add the modules `WEMModify`, and `SoBackground` and connect the module `SoCube` to the dragger modules. You can select the translation direction in the panel of `SoMITranslate1Dragger`. ![Interactive dragging of objects](/images/tutorials/dataobjects/surfaces/DO10_02.png "Interactive dragging of objects") -We will modify the cube to be able to use it as a dragger plane. In order to do this, open the panel of `SoCube` and reduce the *Width* to be 0. This sets a plane in Y and Z direction. +We will modify the cube to be able to use it as a dragger plane. In order to do this, open the panel of `SoCube` and reduce the *Width* to be 0. This sets a plane in y- and z-direction. ![Interactive dragging of objects](/images/tutorials/dataobjects/surfaces/DO10_02_1.png "Interactive dragging of objects") -We like to move the object, when dragging the plane. Thus, we need to modify the translation of our object, when moving the plane. Open the panels of the modules `WEMModify` and `SoMIDraggerContainer` and draw a parameter connection from one *Translation* vector to the other. +We want to move the object when dragging the plane. Thus, we need to modify the translation of our object when moving the plane. Open the panels of the modules `WEMModify` and `SoMIDraggerContainer` and draw a parameter connection from one *Translation* vector to the other. ![Interactive dragging of objects](/images/tutorials/dataobjects/surfaces/DO10_03.png "Interactive dragging of objects") -As a next step, we like to adapt the size of the plane, to the size of the object we have. Add the modules `WEMInfo` and `DecomposeVector3` to your workspace and open their panels. The module `WEMInfo` presents information about the given WEM, for example its position and size. The module `DecomposeVector3` splits a 3D vector into its components. Now, draw a parameter connection from *Size* of `WEMInfo` to the vector in `DecomposeVector3`. As a next step, open the panel of `SoCube` and draw parameter connections from the fields *Y* and *Z* of `DecomposeVector3` to *Height* and *Depth* of `SoCube`. Now, the size of the plane adapts to the size of the object. +As a next step, we want to adapt the size of the plane to the size of the object we have. Add the modules `WEMInfo` and `DecomposeVector3` to your workspace and open their panels. The module `WEMInfo` presents information about the given WEM, for example, its position and size. The module `DecomposeVector3` splits a 3D vector into its components. Now, draw a parameter connection from *Size* of `WEMInfo` to the vector in `DecomposeVector3`. As a next step, open the panel of `SoCube` and draw parameter connections from the fields *Y* and *Z* of `DecomposeVector3` to *Height* and *Depth* of `SoCube`. Now, the size of the plane adapts to the size of the object. ![Interactive dragging of objects](/images/tutorials/dataobjects/surfaces/DO10_04.png "Interactive dragging of objects") @@ -54,17 +54,17 @@ The result can be seen in the next image. You can now select the plane in the *I ![Interactive dragging of objects](/images/tutorials/dataobjects/surfaces/DO10_05.png "Interactive dragging of objects") -#### Modifying the appearance of the plane +#### Modifying the Appearance of the Plane -For changing the visualization of the dragger plane add the modules `SoGroup`, `SoSwitch` and `SoMaterial` to your network and connect them as shown. In addition, group together all the modules, which are responsible for the translation in X direction. +For changing the visualization of the dragger plane, add the modules `SoGroup`, `SoSwitch`, and `SoMaterial` to your network and connect them as shown. In addition, group together all the modules that are responsible for the translation in the x-direction. ![Interactive dragging of objects](/images/tutorials/dataobjects/surfaces/DO10_06.png "Interactive dragging of objects") -We like to switch the visualization of the plane, in dependence of the mouse position in the viewer. In other words, when hovering over the plane, the plane should be visible, when the mouse is in another position and the possibility to drag the object is not given, the plane should be invisible. We use the module `SoMaterial` to edit the appearance of the plane. Open the panel of the module `SoMITranslate1Dragger`. The box of the field *Highlighted* is ticked, when the mouse hovers over the plane. Thus, we can use the field's status to switch between different presentations of the plane. In order to do this, open the panel of `SoSwitch` and draw a parameter connection from *Highlighted* of `SoMITranslate1Dragger` to *Which Child* of `SoSwitch`. +We want to switch the visualization of the plane dependent on the mouse position in the viewer. In other words, when hovering over the plane, the plane should be visible, when the mouse is in another position and the possibility to drag the object is not given, the plane should be invisible. We use the module `SoMaterial` to edit the appearance of the plane. Open the panel of the module `SoMITranslate1Dragger`. The box of the field *Highlighted* is ticked when the mouse hovers over the plane. Thus, we can use the field's status to switch between different presentations of the plane. In order to do this, open the panel of `SoSwitch` and draw a parameter connection from *Highlighted* of `SoMITranslate1Dragger` to *Which Child* of `SoSwitch`. ![Interactive dragging of objects](/images/tutorials/dataobjects/surfaces/DO10_06_02.png "Interactive dragging of objects") -Open the panels of the modules `SoMaterial`. Change the *Transparency* of the first `SoMaterial` module to make the plane invisible, when not hovering over the plane. Furthermore, we changed the *Diffuse Color* of the module `SoMaterial1` to red, so that the plane appears in red, when hovering over it. +Open the panels of the modules `SoMaterial`. Change the *Transparency* of the first `SoMaterial` module to make the plane invisible when not hovering over the plane. Furthermore, we changed the *Diffuse Color* of the module `SoMaterial1` to red, so that the plane appears in red when hovering over it. ![Interactive dragging of objects](/images/tutorials/dataobjects/surfaces/DO10_07.png "Interactive dragging of objects") @@ -72,17 +72,17 @@ When hovering over the plane, the plane becomes visible and the option to move t ![Interactive dragging of objects](/images/tutorials/dataobjects/surfaces/DO10_08.png "Interactive dragging of objects") -#### Interactive object translation in three dimensions +#### Interactive Object Translation in Three Dimensions We do not only want to move the object in one direction, we like to be able to do interactive object translations in all three dimensions. For this, copy the modules responsible for the translation in one direction and change the properties to enable translations in other directions. -We need to change the size of `SoCube1` and `SoCube2` to form planes, which cover surfaces in X and Z as well as X and Y directions. To do that, draw the respective parameter connections from `DecomposeVector3` to the fields of the modules `SoCube`. In addition, we need to adapt the field *Direction* in the panels of the modules `SoMITranslate1Dragger`. +We need to change the size of `SoCube1` and `SoCube2` to form planes that cover surfaces in x- and z-, as well as x- and y-directions. To do that, draw the respective parameter connections from `DecomposeVector3` to the fields of the modules `SoCube`. In addition, we need to adapt the field *Direction* in the panels of the modules `SoMITranslate1Dragger`. ![Interactive dragging of objects](/images/tutorials/dataobjects/surfaces/DO10_09.png "Interactive dragging of objects") -Change width, height and depth of the 3 cubes so that each of them represents one plane. The values need to be set to (0, 2, 2), (2, 0, 2) and (2, 2, 0). +Change width, height, and depth of the three cubes so that each of them represents one plane. The values need to be set to (0, 2, 2), (2, 0, 2) and (2, 2, 0). -As a next step, we like to make sure, that all planes always intersect the object, even though the object is moved. To to this, we need to synchronize the field *Translation* of all `SoMIDraggerContainer` modules and the module `WEMModify`. Draw parameter connections from one *Translation* field to the next, as shown below. +As a next step, we like to make sure that all planes always intersect the object, even though the object is moved. To do this, we need to synchronize the field *Translation* of all `SoMIDraggerContainer` modules and the module `WEMModify`. Draw parameter connections from one *Translation* field to the next, as shown below. ![Interactive dragging of objects](/images/tutorials/dataobjects/surfaces/DO10_10.png "Interactive dragging of objects") @@ -96,7 +96,7 @@ To enable transformations in all directions, we need to connect the modules `SoM ![Interactive dragging of objects](/images/tutorials/dataobjects/surfaces/DO10_12.png "Interactive dragging of objects") -As a next step, we like to enlarge the planes, to make them exceed the object. For that, add the module `CalculateVectorFromVectors` to your network. Open its panel and connect the field *Size* of `WEMInfo` to *Vector 1*. We like to enlarge the size by one, so we add the vector (1,1,1), by editing the field *Vector 2*. Now, connect the *Result* to the field *V* of the module `DecomposeVector3`. +As a next step, we like to enlarge the planes to make them exceed the object. For that, add the module `CalculateVectorFromVectors` to your network. Open its panel and connect the field *Size* of `WEMInfo` to *Vector 1*. We like to enlarge the size by one, so we add the vector (1,1,1), by editing the field *Vector 2*. Now, connect the *Result* to the field *V* of the module `DecomposeVector3`. ![Interactive dragging of objects](/images/tutorials/dataobjects/surfaces/DO10_13.png "Interactive dragging of objects") @@ -104,13 +104,13 @@ At last, we can condense all the modules enabling the transformation into one lo ![Interactive dragging of objects](/images/tutorials/dataobjects/surfaces/DO10_14.png "Interactive dragging of objects") -The result can be seen in the next image. This module can now be used for interactive 3D transformations for all kind of WEMs. +The result can be seen in the next image. This module can now be used for interactive 3D transformations for all kinds of WEMs. ![Interactive dragging of objects](/images/tutorials/dataobjects/surfaces/DO10_15.png "Interactive dragging of objects") ## Summary -* A family of `SoDragger` modules is available, which can be used to interactively modify Open Inventor objects. +* A family of `SoDragger` modules is available that can be used to interactively modify Open Inventor objects. {{< networkfile "examples/data_objects/surface_objects/example4/SurfaceExample4.zip" >}} diff --git a/mevislab.github.io/content/tutorials/dataobjects/surfaces/surfaceexample5.md b/mevislab.github.io/content/tutorials/dataobjects/surfaces/surfaceexample5.md index 246bef2ab..553a40542 100644 --- a/mevislab.github.io/content/tutorials/dataobjects/surfaces/surfaceexample5.md +++ b/mevislab.github.io/content/tutorials/dataobjects/surfaces/surfaceexample5.md @@ -17,18 +17,18 @@ menu: {{< youtube "Rap1RY6l5Cc">}} ## 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. These information can be used for visualization or for further statistical analysis. +WEMs do not only contain the coordinates of nodes and surfaces, they can also contain additional information. That 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. This information can be used for visualization or for further statistical analysis. -In this example, we like to use PVLs to color-code and visualize the distance between two WEMs. +In this example we like to use PVLs to color-code and visualize the distance between two WEMs. -## Steps to do -### Develop your network +## Steps to Do +### Develop Your Network -We start our network by initializing two WEMs using `WEMInitialize`. We chose an *Octasphere* and a resized *Cube*. Use the modules `SoWEMRenderer`, `SoExaminerViewer` and `SoBackground` to visualize the WEMs. +We start our network by initializing two WEMs using `WEMInitialize`. We chose an *Octasphere* and a resized *Cube*. Use the modules `SoWEMRenderer`, `SoExaminerViewer`, and `SoBackground` to visualize the WEMs. ![WEMInitialize](/images/tutorials/dataobjects/surfaces/DO12_01.png "WEMInitialize") -#### Subdividing WEM edges +#### Subdividing WEM Edges As a next step, add and connect two modules `WEMSubdivide` to further divide edges and surfaces. With this step we increase the node density to have an accurate distance measurement. ![WEMSubdivide](/images/tutorials/dataobjects/surfaces/DO12_02.png "WEMSubdivide") @@ -37,27 +37,27 @@ The difference when selecting different maximum edge lengths can be seen in the {{< imagegallery 2 "images/tutorials/dataobjects/surfaces" "EdgeLength1" "EdgeLength01">}} -#### Distances between WEMs are stored in PVLs +#### Distances Between WEMs are Stored in PVLs Now, add the modules `WEMSurfaceDistance` and `WEMInfo` to your workspace and connect them as shown. `WEMSurfaceDistance` calculates the minimum distance between the nodes of both WEM. The distances are stored in the nodes' PVLs as LUT values. ![Distances between surfaces](/images/tutorials/dataobjects/surfaces/DO12_05.png "Distances between surfaces") -Open the panels of the modules `WEMSurfaceDistance` and `WEMInfo`. In the panel of `WEMInfo` select the tab *Statistics*. You can see, the statistics of the stored PVLs. The *Minimum Value* and the *Maximum Value* are similar to the calculated *Min Dist.* and *Max. Dist.* of `WEMSurfaceDistance`. +Open the panels of the modules `WEMSurfaceDistance` and `WEMInfo`. In the panel of `WEMInfo` select the tab *Statistics*. You can see the statistics of the stored PVLs. The *Minimum Value* and the *Maximum Value* are similar to the calculated *Min Dist.* and *Max. Dist.* of `WEMSurfaceDistance`. ![WEM information](/images/tutorials/dataobjects/surfaces/DO12_06.png "WEM information") -#### Color-coding the distance between WEMs -What can we do with these information? We can use the calculated distances, stored in LUT values, to color-code the distance between the WEMs. For this, add and connect the module `SoLUTEditor`. Each LUT value from the PVLs will in the next step be translated into a color. But first, open the panel of `SoWEMRenderer` to select the *Color Mode* *LUT Values*. Now, the module `SoLUTEditor` defines the coloring of the WEM. +#### Color-coding the Distance Between WEMs +What can we do with this information? We can use the calculated distances, stored in LUT values, to color-code the distance between the WEMs. For this, add and connect the module `SoLUTEditor`. Each LUT value from the PVLs will in the next step be translated into a color. But first, open the panel of `SoWEMRenderer` to select the *Color Mode* *LUT Values*. Now, the module `SoLUTEditor` defines the coloring of the WEM. ![SoWEMRenderer](/images/tutorials/dataobjects/surfaces/DO12_07.png "SoWEMRenderer") -To translate the LUT values from the PVLs into color, open the panel of `SoLUTEditor` and select the tab *Range*. We need to define the value range, we like to work with. As the distance and thus the PVL-value is expected to be 0 when the surfaces of both WEMs meet, we set the *New Range Min* to 0. As the size of the WEMs does not exceed 3, we set the *New Range Max* to 3. After that, press *Apply new Range*. +To translate the LUT values from the PVLs into color, open the panel of `SoLUTEditor` and select the tab *Range*. We need to define the value range we like to work with. As the distance and thus the PVL value is expected to be 0 when the surfaces of both WEMs meet, we set the *New Range Min* to 0. As the size of the WEMs does not exceed 3, we set the *New Range Max* to 3. After that, press *Apply New Range*. ![SoLUTEditor](/images/tutorials/dataobjects/surfaces/DO12_08.png "SoLUTEditor") -Our goal is to colorize faces of the *Octasphere* in red, if they are close to or even intersect the cubic WEM. And we like to colorize faces of the *Octasphere* in green, if these faces are far away from the cubic WEM. +Our goal is to colorize faces of the *Octasphere* in red if they are close to or even intersect the cubic WEM. And we like to colorize faces of the *Octasphere* in green if these faces are far away from the cubic WEM. -Open the tab *Editor* of the panel of `SoLUTEditor`. This tab allows to interactively select a color for each PVL-value. Select the color point on the left side. Its *Position* value is supposed to be 0, so we like to select the *Color* *red* in order to color-code small distances between the WEMs in red. In addition to that, increase the *Opacity* of this color point. Next, select the right color point. Its *Position* is supposed to be 3 and thus equals the value of the field *New Range Max*. As these color points colorize large distances between WEMs, select the *Color* *green*. You can add new color points by clicking on the colorized bar in the panel. Select for example the *Color* *yellow* for a color point in the middle. Select and shift the color points to get the desired visualization. +Open the tab *Editor* of the panel of `SoLUTEditor`. This tab allows to interactively select a color for each PVL value. Select the color point on the left side. Its *Position* value is supposed to be 0, so we like to select the *Color* *red* in order to color-code small distances between the WEMs in red. In addition to that, increase the *Opacity* of this color point. Next, select the right color point. Its *Position* is supposed to be 3 and thus equals the value of the field *New Range Max*. As these color points colorize large distances between WEMs, select the *Color* *green*. You can add new color points by clicking on the colorized bar in the panel. Select, for example, the *Color* *yellow* for a color point in the middle. Select and shift the color points to get the desired visualization. ![Changing the LUT](/images/tutorials/dataobjects/surfaces/DO12_09.png "Changing the LUT") @@ -65,10 +65,10 @@ Add the module `WEMModify` to your workspace and connect the module as shown. If ![WEMModify](/images/tutorials/dataobjects/surfaces/DO12_10.png "WEMModify") -### Interactive shift of WEMs +### Interactive Shift of WEMs As a next step, we like to implement the interactive shift of the WEM. Add the modules `SoTranslateDragger1` and `SyncVector`. Connect all translation vectors: Draw connections from the field *Translate* of `SoTranslateDragger1` to *Vector1* of `SyncVector`, from *Vector2* of `SyncVector` to *Translate* of `WEMModify`, and at last from *Translate* of `WEMModify` to *Translate* of `SoTranslateDragger1`. -You can now interactively drag the WEM insight the viewer. +You can now interactively drag the WEM inside the viewer. ![Dragging the WEM](/images/tutorials/dataobjects/surfaces/DO12_11.png "Dragging the WEM") @@ -81,8 +81,8 @@ The result can be seen in the next image. ![Your final result](/images/tutorials/dataobjects/surfaces/DO12_13.png "Your final result") ## Summary -* Additional information of WEMs can be stored in *Primitive Value Lists* (PVL), attached to nodes, edges or faces. -* The module `WEMSurfaceDistance` stores the minimum distance between nodes of different WEMs in PVLs, as LUT values. +* Additional information of WEMs can be stored in *Primitive Value Lists* (PVL), attached to nodes, edges, or faces. +* The module `WEMSurfaceDistance` stores the minimum distance between nodes of different WEMs in PVLs as LUT values. * PVLs containing LUT values can be used to color-code additional information on the WEM surface. diff --git a/mevislab.github.io/content/tutorials/image_processing/image_processing1.md b/mevislab.github.io/content/tutorials/image_processing/image_processing1.md index c355c9e49..91e17880e 100644 --- a/mevislab.github.io/content/tutorials/image_processing/image_processing1.md +++ b/mevislab.github.io/content/tutorials/image_processing/image_processing1.md @@ -13,28 +13,28 @@ menu: parent: "imageprocessing" --- -# Example 1: Arithmetic operations on two images +# Example 1: Arithmetic Operations on Two Images {{< youtube "ToTQ3XRPmlk" >}} ## Introduction -We are using the `Arithmetic2` module to apply basic scalar functions on two images. The module provides 2 inputs for images and 1 output image for the result. +We are using the `Arithmetic2` module to apply basic scalar functions on two images. The module provides two inputs for images and one output image for the result. -## Steps to do -### Develop your network +## Steps to Do +### Develop Your Network Add two `LocalImage` modules to your workspace for the input images. Select *$(DemoDataPath)/BrainMultiModal/ProbandT1.dcm* and *$(DemoDataPath)/BrainMultiModal/ProbandT2.dcm* from MeVisLab demo data and add a `SynchroView2D` to your network. In the end, add the `Arithmetic2` module and connect them as seen below. ![Example Network](/images/tutorials/image_processing/network_example1.png "Example Network") -Your `SynchroView2D` shows two images. On the left hand side, you can see the original image from your left `LocalImage` module. The right image shows the result of the arithmetic operation executed by the `Arithmetic2` module on the two input images. +Your `SynchroView2D` shows two images. On the left hand side, you can see the original image from your left `LocalImage` module. The right image shows the result of the arithmetic operation performed by the `Arithmetic2` module on the two input images. ![SynchroView2D](/images/tutorials/image_processing/arithmetic_viewer.png "SynchroView2D") -The `SynchroView2D` module automatically synchronizes the visible slice of both input images, you can see the same slice with and without applied filter. +The `SynchroView2D` module automatically synchronizes the visible slice of both input images; you can see the same slice with and without applied filter. -## Arithmetic operations +## Arithmetic Operations Double-click {{< mousebutton "left" >}} the `Arithmetic2` module to select different functions to be applied. ![Arithmetic2](/images/tutorials/image_processing/arithmetic2.png "Arithmetic2") diff --git a/mevislab.github.io/content/tutorials/image_processing/image_processing2.md b/mevislab.github.io/content/tutorials/image_processing/image_processing2.md index 5e32cb903..1e1bc83d9 100644 --- a/mevislab.github.io/content/tutorials/image_processing/image_processing2.md +++ b/mevislab.github.io/content/tutorials/image_processing/image_processing2.md @@ -13,19 +13,19 @@ menu: parent: "imageprocessing" --- -# Example 2: Masking images +# Example 2: Masking Images {{< youtube "k003ytr8ZQA" >}} ## Introduction -The background of medical images is black for most cases. In case an image is inverted or window/level values are adapted, these black pixels outside clinical relevant pixels might become very bright or even white. +The background of medical images is black for most cases. In the case an image is inverted or window/level values are adapted, these black voxels outside clinical relevant voxels might become very bright or even white. Being in a dark room using a large screen, the user might be blended by these large white regions. -Image masking is a very good way to select a defined region where image processing shall be applied. A mask allows to define a region (the masked region) to allow image modifications whereas pixels outside the mask remain unchanged. +Image masking is a very good way to select a defined region where image processing shall be applied. A mask allows to define a region (the masked region) to allow image modifications whereas voxels outside the mask remain unchanged. -## Steps to do -### Develop your network +## Steps to Do +### Develop Your Network Add a `LocalImage` and a `SynchroView2D` module to your network and connect the modules as seen below. ![Example Network](/images/tutorials/image_processing/network_example2a.png "Example Network") @@ -34,31 +34,31 @@ Open the Automatic Panel of the `SynchroView2D` module via context menu {{< mous ![Synchronize LUTs in SynchroView2D](/images/tutorials/image_processing/synchLUTs.png "Synchronize LUTs in SynchroView2D") -Double-click the `SynchroView2D` and change window/level values via right mouse button {{< mousebutton "right" >}}. You can see that the background of your images gets very bright and changes on the LUT are applied to all pixels of your input image - even on the background. Hovering your mouse over the image(s) shows the current gray value under your cursor in [Hounsfield Unit (HU)](https://en.wikipedia.org/wiki/Hounsfield_scale). +Double-click the `SynchroView2D` and change window/level values via right mouse button {{< mousebutton "right" >}}. You can see that the background of your images gets very bright and changes based on the LUT are applied to all voxels of your input image - even on the background. Hovering your mouse over the image(s) shows the current gray value under your cursor in [Hounsfield Unit (HU)](https://en.wikipedia.org/wiki/Hounsfield_scale). ![Without masking the image](/images/tutorials/image_processing/SynchroView2D_before.png "Without masking the image") -Hovering the mouse over black background pixels shows a value between 0 and about 60. This means we want to create a mask which only allows modifications on pixels having a grey value larger than 60. +Hovering the mouse over black background voxels shows a value between 0 and about 60. This means we want to create a mask that only allows modifications on voxels having a gray value larger than 60. Add a `Mask` and a `Threshold` module to your workspace and connect them as seen below. ![Example Network](/images/tutorials/image_processing/network_example2b.png "Example Network") -Changing the window/level values in your viewer still also changes background pixels. The `Thereshold` module still leaves the pixels as is because the threshold value is configured as larger than 0. Open the Automatic Panel of the modules `Threshold` and `Mask` via double-click {{< mousebutton "left" >}} and set the values as seen below. +Changing the window/level values in your viewer still also changes background voxels. The `Threshold` module still leaves the voxels as is because the threshold value is configured as larger than 0. Open the Automatic Panel of the modules `Threshold` and `Mask` via double-click {{< mousebutton "left" >}} and set the values as seen below. {{< imagegallery 2 "/images/tutorials/image_processing" "Threshold" "Mask">}} -Now all pixels having a HU value lower or equal 60 are set to 0, all others are set to 1. The resulting image from the `Threshold` module is a bit image which can now be used as a mask by the `Mask` module. +Now all voxels having a HU value lower or equal 60 are set to 0, all others are set to 1. The resulting image from the `Threshold` module is a binary image that can now be used as a mask by the `Mask` module. ![Output of the Threshold module](/images/tutorials/image_processing/OutputInspector_Threshold.png "Output of the Threshold module") -The `Mask` module is configured to use the *Masked Original* image. Changing the window/level values in your images now, you can see that the background pixels are not affected anymore (at least as long as you do not reach a very large value). +The `Mask` module is configured to use the *Masked Original* image. Changing the window/level values in your images now, you can see that the background voxels are not affected anymore (at least as long as you do not reach a very large value). ![After masking the image](/images/tutorials/image_processing/SynchroView2D_after.png "After masking the image") ## Summary -* The module `Threshold` applies a relative or an absolute threshold to a voxel image. It can be defined what should be written to those voxels which pass or which fail the adjustable comparison. +* The module `Threshold` applies a relative or an absolute threshold to a voxel image. It can be defined what should be written to those voxels that pass or fail the adjustable comparison. * The module `Mask` masks the image of input one with the mask at input two. -* A mask can be used to filter pixels inside images +* A mask can be used to filter voxels inside images. {{< networkfile "examples/image_processing/example2/ImageMask.mlab" >}} diff --git a/mevislab.github.io/content/tutorials/image_processing/image_processing3.md b/mevislab.github.io/content/tutorials/image_processing/image_processing3.md index 83f41b394..099e69bca 100644 --- a/mevislab.github.io/content/tutorials/image_processing/image_processing3.md +++ b/mevislab.github.io/content/tutorials/image_processing/image_processing3.md @@ -22,22 +22,22 @@ A very simple approach to segment parts of an image is the region growing method In this example, you will segment the brain of an image and show the segmentation results as an overlay on the original image. -## Steps to do -### Develop your network +## Steps to Do +### Develop Your Network Add a `LocalImage` module to your workspace and select load *$(DemoDataPath)/BrainMultiModal/ProbandT1.dcm*. Add a `View2D` module and connect both as seen below. ![Example Network](/images/tutorials/image_processing/network_example3.png "Example Network") -### Add the RegionGrowing module -Add the `RegionGrowing` module and connect the input with the `LocalImage` module. You will see a message *results invalid*. The reason is, that a region growing always needs a starting point for getting similar pixels. The output of the module does not show a result in *Output Inspector*. +### Add the RegionGrowing Module +Add the `RegionGrowing` module and connect the input with the `LocalImage` module. You will see a message *results invalid*. The reason is that a region growing always needs a starting point for getting similar voxels. The output of the module does not show a result in *Output Inspector*. ![Results Invalid](/images/tutorials/image_processing/network_example3a.png "Results Invalid") -Add a `SoView2DMarkerEditor` to your network and connect it with your `RegionGrowing` and with the `View2D`. Clicking into your viewer now creates markers which can be used for the region growing. +Add a `SoView2DMarkerEditor` to your network and connect it with your `RegionGrowing` and with the `View2D`. Clicking into your viewer now creates markers that can be used for the region growing. ![SoView2DMarkerEditor](/images/tutorials/image_processing/SoView2DMarkerEditor.png "SoView2DMarkerEditor") -The region growing starts on manually clicking *Update* or automatically if *Update Mode* is set to *Auto-Update*. We recommend to set update mode to automatic update. Additionally you should set the *Neighborhood Relation* to *3D-6-Neighborhood (x,y,z)*, because then your segmentation will also affect the z-axis. +The region growing starts on manually clicking *Update* or automatically if *Update Mode* is set to *Auto-Update*. We recommend to set update mode to automatic update. Additionally, you should set the *Neighborhood Relation* to *3D-6-Neighborhood (x,y,z)*, because then your segmentation will also affect the z-axis. Set *Threshold Computation* to *Automatic* and define *Interval Size* as 1.600 % for relative, automatic threshold generation. @@ -57,8 +57,8 @@ In order to visualize your segmentation mask as an overlay in the `View2D`, you Your segmentation is now shown in the `View2D`. You can change the color and transparency of the overlay via SoView2DOverlay. -### Close gaps -Scrolling through the slices, you will see that your segmentation is not closed. There are lots of gaps where the grey value of your image differs more than your threshold. You can simply add a `CloseGap` module to resolve this issue. Configure *Filter Mode* as *Binary Dilatation*, *Border Handling* as *Pad Src Fill* and set *KernelZ* to 3. +### Close Gaps +Scrolling through the slices, you will see that your segmentation is not closed. There are lots of gaps where the gray value of your image differs more than your threshold. You can simply add a `CloseGap` module to resolve this issue. Configure *Filter Mode* as *Binary Dilatation*, *Border Handling* as *Pad Src Fill* and set *KernelZ* to 3. The difference before and after closing the gaps can be seen in the Output Inspector. @@ -72,7 +72,7 @@ You can now also add a `View3D` to show your segmentation in 3D. Your final resu ![Final Result](/images/tutorials/image_processing/network_example3c.png "Final Result") ## Summary -* The module `RegionGrowing` allows a very simple segmentation of similar grey values. +* The module `RegionGrowing` allows a very simple segmentation of similar gray values. * Gaps in a segmentation mask can be closed by using the `CloseGap` module. * Segmentation results can be visualized in 2D and 3D. diff --git a/mevislab.github.io/content/tutorials/image_processing/image_processing4.md b/mevislab.github.io/content/tutorials/image_processing/image_processing4.md index 11ad7aef3..f9a42ee39 100644 --- a/mevislab.github.io/content/tutorials/image_processing/image_processing4.md +++ b/mevislab.github.io/content/tutorials/image_processing/image_processing4.md @@ -13,25 +13,25 @@ menu: parent: "imageprocessing" --- -# Example 4: Subtract 3D objects +# Example 4: Subtract 3D Objects {{< youtube "VdvErVvoq2k" >}} ## 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. +In this example, we load an image and render it as `WEMIsoSurface`. Then, we create a three-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. Make sure to configure the `WEMIsoSurface` to use a *Iso Min. Value* of 420 and a *Voxel Sampling* 1. +## 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. Make sure to configure the `WEMIsoSurface` to use a *Iso Min. Value* of 420 and a *Voxel Sampling* 1. ![Example Network](/images/tutorials/image_processing/network_example4.png "Example Network") -The `SoExaminerViewer` now shows the head as a 3-dimensional rendering. +The `SoExaminerViewer` now shows the head as a three-dimensional rendering. ![SoExaminerViewer](/images/tutorials/image_processing/SoExaminerViewer_initial.png "SoExaminerViewer") -### Add a 3D sphere to your scene -We now want to add a 3-dimensional sphere to our scene. Add a `SoMaterial` and a `SoSphere` to your network, connect them to a `SoSeparator` and then to the `SoExaminerViewer`. Set your material to use a *Diffuse Color* red and adapt the size of the sphere to *Radius* 50. +### Add a 3D Sphere to your Scene +We now want to add a three-dimensional sphere to our scene. Add a `SoMaterial` and a `SoSphere` to your network, connect them to a `SoSeparator` and then to the `SoExaminerViewer`. Set your material to use a *Diffuse Color* red and adapt the size of the sphere to *Radius* 50. ![Example Network](/images/tutorials/image_processing/network_example4b.png "Example Network") @@ -39,13 +39,13 @@ The `SoExaminerViewer` now shows the head and the red sphere inside. ![SoExaminerViewer](/images/tutorials/image_processing/SoExaminerViewer_sphere.png "SoExaminerViewer") -### Set location of your sphere -In order to define the best possible location of the sphere, we additionally add a `SoTranslation` Module and connect it to the `SoSeparator` between the material and the sphere. Define a translation of x=0, y=20 and z=80. +### Set Location of your Sphere +In order to define the best possible location of the sphere, we additionally add a `SoTranslation` module and connect it to the `SoSeparator` between the material and the sphere. Define a translation of x=0, y=20 and z=80. ![Example Network](/images/tutorials/image_processing/network_example4c.png "Example Network") -### Subtract the sphere from the head -We now want to subtract the sphere from the head to get a hole. Add another `SoWEMRenderer`, a `WEMLevelSetBoolean` and a `SoWEMConvertInventor` to the network and connect them to a `SoSwitch` as seen below. The `SoSwitch` also needs to be connected to the `SoWEMRenderer` of the head. Set your `WEMLevelSetBoolean` to use the *Mode* **Difference**. +### Subtract the Sphere from the Head +We now want to subtract the sphere from the head to get a hole. Add another `SoWEMRenderer`, a `WEMLevelSetBoolean`, and a `SoWEMConvertInventor` to the network and connect them to a `SoSwitch` as seen below. The `SoSwitch` also needs to be connected to the `SoWEMRenderer` of the head. Set your `WEMLevelSetBoolean` to use the *Mode* **Difference**. ![Example Network](/images/tutorials/image_processing/network_example4d.png "Example Network") @@ -62,7 +62,7 @@ What happens in your network now? You can now toggle the hole to be shown or not, depending on your setting for the `SoSwitch`. ## Summary -* The module `WEMLevelSetBoolean` allows to subtract or add 3-dimensional WEM objects. -* The `SoSwitch` can toggle multiple inventor scenes as input +* The module `WEMLevelSetBoolean` allows to subtract or add three-dimensional WEM objects. +* The `SoSwitch` can toggle multiple Open Inventor scenes as input. {{< networkfile "/examples/image_processing/example4/Subtract3DObjects.mlab" >}} \ No newline at end of file diff --git a/mevislab.github.io/content/tutorials/image_processing/image_processing5.md b/mevislab.github.io/content/tutorials/image_processing/image_processing5.md index 2b69d0fdc..ad54976ea 100644 --- a/mevislab.github.io/content/tutorials/image_processing/image_processing5.md +++ b/mevislab.github.io/content/tutorials/image_processing/image_processing5.md @@ -20,11 +20,11 @@ menu: ## 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 +## 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. -Add the modules `OrthoReformat3`, `Switch`, `SoView2D`, `View2DExtensions` and `SoRenderArea` and connect them as seen below. +Add the modules `OrthoReformat3`, `Switch`, `SoView2D`, `View2DExtensions`, and `SoRenderArea` and connect them as seen below. ![Example Network](/images/tutorials/image_processing/network_example5.png "Example Network") @@ -33,52 +33,52 @@ In previous tutorials, we already learned that it is possible to show 2D slices * Coronal * Sagittal -The `Switch` takes multiple input images and you can toggle between them to show one of the orthogonal transformations to be used as output. +The `Switch` module takes multiple input images and you can toggle between them to show one of the orthogonal transformations to be used as output. The `SoRenderArea` now shows the 2D images in a view defined by the `Switch`. {{< imagegallery 3 "/images/tutorials/image_processing" "View0" "View1" "View2" >}} -### Current 2D slice in 3D +### Current 2D Slice in 3D We now want to visualize the slice visible in the 2D images as a 3D plane. Add a `SoGVRDrawOnPlane` and a `SoExaminerViewer` to your workspace and connect them. We should also add a `SoBackground` and a `SoLUTEditor`. The viewer remains empty because no source image is selected to display. Add a `SoGVRVolumeRenderer` and connect it to your viewer and the `LocalImage`. ![Example Network](/images/tutorials/image_processing/network_example5b.png "Example Network") -A 3-dimensional plane of the image is shown. Adapt the LUT as seen below. +A three-dimensional plane of the image is shown. Adapt the LUT as seen below. ![SoLUTEditor](/images/tutorials/image_processing/tutorial5_lut.png "SoLUTEditor") -We now have a single slice of the image in 3D, but the slice is static and cannot be changed. In order to use the currently visible slice from the 2D viewer, we need to create a parameter connection from the `SoView2D` Position *Slice as plane* to the `SoGVRDrawOnPlane` Plane vector. +We now have a single slice of the image in 3D, but the slice is static and cannot be changed. In order to use the currently visible slice from the 2D viewer, we need to create a parameter connection from the `SoView2D` position *Slice as plane* to the `SoGVRDrawOnPlane` plane vector. ![SoView2D Position](/images/tutorials/image_processing/SoView2D_Position.png "SoView2D Position") ![SoGVRDrawOnPlane Plane](/images/tutorials/image_processing/SoGVRDrawOnPlane_Plane.png "SoGVRDrawOnPlane Plane") -Now the plane representation of the visible slice is synchronized to the plane of the 3D view. Scrolling through your 2D slices changes the plane in 3D. +Now, the plane representation of the visible slice is synchronized to the plane of the 3D view. Scrolling through your 2D slices changes the plane in 3D. ![Visible slice in 3D](/images/tutorials/image_processing/2DSlice_3D.png "Visible slice in 3D") -### Current 2D slice as clip plane in 3D -This slice shall now be used as a clip plane in 3D. In order to achieve this, you need another `SoExaminerViewer` and a `SoClipPlane`. Add them to your workspace and connect them as seen below. You can also use the same `SoLUTEditor` and `SoBackground` for the 3D view. Also use the same `SoGVRVolumeRenderer`, the 3D volume does not change. +### Current 2D Slice as Clip Plane in 3D +This slice shall now be used as a clip plane in 3D. In order to achieve this, you need another `SoExaminerViewer` and a `SoClipPlane`. Add them to your workspace and connect them as seen below. You can also use the same `SoLUTEditor` and `SoBackground` for the 3D view. Also use the same `SoGVRVolumeRenderer`; the 3D volume does not change. ![Example Network](/images/tutorials/image_processing/network_example5c.png "Example Network") -Now your 3D scene shows a 3-dimensional volume cut by a plane in the middle. Once again, the clipping is not the same slice as your 2D view shows. +Now your 3D scene shows a three-dimensional volume cut by a plane in the middle. Once again, the clipping is not the same slice as your 2D view shows. ![Clip plane in 3D](/images/tutorials/image_processing/3D_ClipPlane.png "Clip plane in 3D") -Again create a parameter connection from the `SoView2D` Position *Slice as plane*, but this time to the `SoClipPlane`. +Again create a parameter connection from the `SoView2D` position *Slice as plane*, but this time to the `SoClipPlane`. ![SoClipPlane Plane](/images/tutorials/image_processing/SoClipPlane_Plane.png "SoClipPlane Plane") -If you now open all 3 viewers and scroll through the slices in 2D, the 3D viewers are both synchronized with the current slice. You can even toggle the view in the `Switch` and the plane is adapted automatically. +If you now open all three viewers and scroll through the slices in 2D, the 3D viewers are both synchronized with the current slice. You can even toggle the view in the `Switch` and the plane is adapted automatically. ![Final 3 views](/images/tutorials/image_processing/Final3Views.png "Final 3 views") ## Summary -* The module `OthoReformat3` transforms input images to the three viewing directions: coronal, axial and sagittal -* A `Switch` can be used to toggle through multiple input images -* The `SoGVRDrawOnPlane` module renders a single slice as a 3-dimensional plane -* 3-dimensional clip planes on volumes can be created by using a `SoClipPlane` module +* The module `OthoReformat3` transforms input images to the three viewing directions: coronal, axial, and sagittal. +* A `Switch` can be used to toggle through multiple input images. +* The `SoGVRDrawOnPlane` module renders a single slice as a three-dimensional plane. +* Three-dimensional clip planes on volumes can be created by using a `SoClipPlane` module. {{< networkfile "/examples/image_processing/example5/ImageProcessingExample5.mlab" >}} \ No newline at end of file diff --git a/mevislab.github.io/content/tutorials/image_processing/image_processing6.md b/mevislab.github.io/content/tutorials/image_processing/image_processing6.md index c51091b48..01f461ab3 100644 --- a/mevislab.github.io/content/tutorials/image_processing/image_processing6.md +++ b/mevislab.github.io/content/tutorials/image_processing/image_processing6.md @@ -25,12 +25,12 @@ This tutorial explains how to load and visualize DICOM RT (Radiotherapy) data in *DICOM RT* files are essential in radiotherapy treatment planning. They include: -* **RT Structure Set**, containing information related to patient anatomy, for example structures, markers, and isocenters. These entities are typically identified on devices such as CT scanners, physical or virtual simulation workstations, or treatment planning systems. -* **RT Plan**, containing geometric and dosimetric data specifying a course of external beam and/or brachytherapy treatment, for example beam angles, collimator openings, beam modifiers, and brachytherapy channel and source specifications. The RT Plan entity may be created by a simulation workstation, and subsequently enriched by a treatment planning system before being passed on to a record and verify system or treatment device. An instance of the RT Plan object usually references an RT Structure Set instance to define a coordinate system and set of patient structures. +* **RT Structure Set**, containing information related to patient anatomy, for example, structures, markers, and isocenters. These entities are typically identified on devices such as CT scanners, physical or virtual simulation workstations, or treatment planning systems. +* **RT Plan**, containing geometric and dosimetric data specifying a course of external beam and/or brachytherapy treatment, for example, beam angles, collimator openings, beam modifiers, and brachytherapy channel and source specifications. The RT Plan entity may be created by a simulation workstation, and subsequently enriched by a treatment planning system before being passed on to a record and verify system or treatment device. An instance of the RT Plan object usually references an RT Structure Set instance to define a coordinate system and set of patient structures. * **RT Dose**, containing dose data generated by a treatment planning system in one or more of several formats: three-dimensional dose data, isodose curves, DVHs, or dose points. Additional objects not used in this tutorial are: -* **RT Image**, specifying radiotherapy images which have been obtained on a conical imaging geometry, such as those found on conventional simulators and portal imaging devices. It can also be used for calculated images using the same geometry, such as digitally reconstructed radiographs (DRRs). +* **RT Image**, specifying radiotherapy images that have been obtained on a conical imaging geometry, such as those found on conventional simulators and portal imaging devices. It can also be used for calculated images using the same geometry, such as digitally reconstructed radiographs (DRRs). * **RT Beams Treatment Record**, **RT Brachy Treatment Record**, and **RT Treatment Summary Record**, containing data obtained from actual radiotherapy treatments. These objects are the historical record of treatment, and are linked with the other „planning” objects to form a complete picture of the treatment. ## Precondition @@ -43,7 +43,7 @@ This data is FOR EDUCATIONAL AND SCIENTIFIC EXCHANGE ONLY – NOT FOR SALES OR P Extract the ZIP file into a new folder named *DICOM_FILES*. -## Prepare your network +## Prepare Your Network Add the module `DicomImport` to your workspace. @@ -59,7 +59,7 @@ The dataset contains an anonymized patient with four series: In order to see the images, add a `View2D` module and connect it to the `DicomImport` module. -The *RTPLAN* and *RTSTRUCT* files do not contain pixel data. Therefore the `DicomImport` module informs that there is no image data available. The *CT* series contains the original CT data and the *RTDOSE* series contains a mask providing three-dimensional dose data. +The *RTPLAN* and *RTSTRUCT* files do not contain pixel data. Therefore, the `DicomImport` module informs that there is no image data available. The *CT* series contains the original CT data and the *RTDOSE* series contains a mask providing three-dimensional dose data. {{< imagegallery 4 "/images/tutorials/image_processing/" "RTPLAN" "RTSTRUCT" "CT512" "RTDOSE">}} @@ -71,7 +71,7 @@ You have to select the correct index for the *RTSTRUCT*. In our example it is in ![RTSTRUCT in DicomImportExtraOutput](/images/tutorials/image_processing/Example6_2.png "RTSTRUCT in DicomImportExtraOutput") -### Visualize RTSTRUCTs as colored CSOs +### Visualize RTSTRUCTs as Colored CSOs Add an `ExtractRTStruct` module to the `DicomImportExtraOutput` to convert *RTSTRUCT* data into MeVisLab contours (CSOs). CSOs allow to visualize the contours on the CT scan and to interact with them in MeVisLab. @@ -110,7 +110,7 @@ Add a `SoCSO3DRenderer` and a `SoExaminerViewer` module and connect them to the ![CSOs in 3D](/images/tutorials/image_processing/Example6_8.png "CSOs in 3D") -### Visualizing RTDOSE as a colored overlay +### Visualizing RTDOSE as a Colored Overlay We now want to show the *RTDOSE* data as provided for the patient as a semi-transparent, colored overlay. Add another `DicomImportExtraOutput` module to get the *RTDOSE* object. Again, select the correct index. In this case, we select index 4. @@ -141,7 +141,7 @@ If you want to visualize the RT Struct contours together with the RT Dose overla ## Summary * DICOM RT data can be loaded and processed in MeVisLab. -* RT Structure Sets can be converted to MeVisLab contours and visualized using `ExtractRTStruct` and `CSOLabelRenderer` modules +* RT Structure Sets can be converted to MeVisLab contours and visualized using `ExtractRTStruct` and `CSOLabelRenderer` modules. * Anatomical information can be shown using the module `CSOLabelRenderer`. * RT Dose files can be shown as a semi-transparent colored overlay using `SoView2DOverlay`. diff --git a/mevislab.github.io/content/tutorials/openinventor.md b/mevislab.github.io/content/tutorials/openinventor.md index 50e36bcea..d27f4ea05 100644 --- a/mevislab.github.io/content/tutorials/openinventor.md +++ b/mevislab.github.io/content/tutorials/openinventor.md @@ -13,7 +13,7 @@ menu: parent: "tutorials" --- -# Open Inventor modules {#TutorialOpenInventorModules} +# Open Inventor Modules {#TutorialOpenInventorModules} ## Introduction In total, there are three types of modules: @@ -27,10 +27,10 @@ An exemplary Open Inventor scene will be implemented in the following paragraph. ## Open Inventor Scenes and Execution of Scene Graphs{#sceneGraphs} -Inventor scenes are organized in structures called scene graphs. A scene graph is made up of nodes, which represent 3D objects to be drawn, properties of the 3D objects, nodes that combine other nodes and are used for hierarchical grouping, and others (cameras, lights, etc.). These nodes are accordingly called shape nodes, property nodes, group nodes and so on. Each node contains one or more pieces of information stored in fields. For example, the Sphere node contains only its radius, stored in its *radius* field. Open Inventor modules function as Inventor nodes, so they may have input connectors to add Inventor child nodes (modules) and output connectors to link themselves to Inventor parent nodes (modules). +Inventor scenes are organized in structures called scene graphs. A scene graph is made up of nodes, which represent 3D objects to be drawn, properties of the 3D objects, nodes that combine other nodes and are used for hierarchical grouping, and others (cameras, lights, etc.). These nodes are accordingly called shape nodes, property nodes, group nodes, and so on. Each node contains one or more pieces of information stored in fields. For example, the Sphere node contains only its radius, stored in its *radius* field. Open Inventor modules function as Inventor nodes, so they may have input connectors to add Inventor child nodes (modules) and output connectors to link themselves to Inventor parent nodes (modules). {{}} -The model below depicts the order in which the modules are executed. The red arrow indicates the traversal order, from top to bottom and from left to right. The modules are numbered accordingly, from 1 to 8. Knowing about the traversal order can be crucial to achieve a certain ouput. +The model below depicts the order in which the modules are executed. The red arrow indicates the traversal order: from top to bottom and from left to right. The modules are numbered accordingly, from 1 to 8. Knowing about the traversal order can be crucial to achieve a certain ouput. ![Traversing in Open Inventor](/images/tutorials/openinventor/OI1_13.png "Traversing through a network of Open Inventor modules") {{}} @@ -39,7 +39,7 @@ The `SoGroup` and `SoSeparator` modules can be used as containers for child node ![SoGroup vs. SoSeparator](/images/tutorials/openinventor/SoGroup_SoSeparator.png "SoGroup vs. SoSeparator") -In the network above, we render four `SoCone` objects. The left side uses the `SoSeparator` modules, the right side uses the `SoGroup` ones. There is a `SoMaterial` module defining one of the left cone objects to be yellow. As you can see, the `SoMaterial` module is only applied to that cone, the other left cone remains in its default grey color, because the `SoSeparator` module isolates the separator's children from the rest of the scene graph. +In the network above, we render four `SoCone` objects. The left side uses the `SoSeparator` modules, the right side uses the `SoGroup` ones. There is a `SoMaterial` module defining one of the left cone objects to be yellow. As you can see, the `SoMaterial` module is only applied to that cone, the other left cone remains in its default gray color, because the `SoSeparator` module isolates the separator's children from the rest of the scene graph. On the right side, we are using `SoGroup` ({{< docuLinks "/Standard/Documentation/Publish/ModuleReference/SoGroup.html" "SoGroup module reference" >}}). The material of the cone is set to red. As the `SoGroup` module does not alter the traversal state in any way, the second cone in this group is also red. @@ -50,5 +50,5 @@ Details on these can be found in the {{< docuLinks "/Standard/Documentation/Publ {{< networkfile "examples/open_inventor/SoGroupSoSeparator.mlab" >}} -More Information about Open Inventor and Scene Graphs can be found {{< docuLinks "/Resources/Documentation/Publish/SDK/GettingStarted/ch07.html" "here" >}} , in the {{< docuLinks "/Standard/Documentation/Publish/Overviews/OpenInventorOverview.html" "Open Inventor Overview" >}} or the [Open Inventor Reference](https://mevislabdownloads.mevis.de/docs/current/MeVis/ThirdParty/Documentation/Publish/OpenInventorReference/index.html). +More information about Open Inventor and Scene Graphs can be found {{< docuLinks "/Resources/Documentation/Publish/SDK/GettingStarted/ch07.html" "here" >}} , in the {{< docuLinks "/Standard/Documentation/Publish/Overviews/OpenInventorOverview.html" "Open Inventor Overview" >}} or the [Open Inventor Reference](https://mevislabdownloads.mevis.de/docs/current/MeVis/ThirdParty/Documentation/Publish/OpenInventorReference/index.html). diff --git a/mevislab.github.io/content/tutorials/shorts.md b/mevislab.github.io/content/tutorials/shorts.md index bef4c13fb..ab0a76635 100644 --- a/mevislab.github.io/content/tutorials/shorts.md +++ b/mevislab.github.io/content/tutorials/shorts.md @@ -15,7 +15,7 @@ menu: # MeVisLab Tips and Tricks -This chapter shows some features and functionalities which are helpful but do not provide its own tutorial. +This chapter shows some features and functionalities that are helpful but do not provide its own tutorial. * [Keyboard Shortcuts](/tutorials/shorts#shortcuts) * [Using Snippets](/tutorials/shorts#snippets) @@ -25,7 +25,7 @@ This chapter shows some features and functionalities which are helpful but do no * [Module suggestion of module in- and output](/tutorials/shorts#modulesuggest) ## Keyboard Shortcuts {#shortcuts} -This is a collection of useful keyboard shortcuts in MeVisLab, hopefully it grows continuously. +This is a collection of useful keyboard shortcuts in MeVisLab.
@@ -111,7 +111,7 @@ If you are new to Python or don't have experiences in accessing fields in MeVisL Open {{< menuitem "View" "Views" "Scripting Assistant">}}. A new panel is shown. -If you now interact with a network, module or macro module, your user interactions are converted into Python calls. You can see the calls in the panel of the Scripting Assistant and copy and paste them for your Python script. +If you now interact with a network, module, or macro module, your user interactions are converted into Python calls. You can see the calls in the panel of the Scripting Assistant and copy and paste them for your Python script. ![Scripting Assistant](/images/tutorials/ScriptingAssistant_Panel.png "Scripting Assistant") @@ -171,11 +171,11 @@ QApplication.setPalette(palette) ``` {{}} -This script defines the color of the MeVisLab user interface elements. You can define other colors and more items, this is just an example of what you can do with user scripts. +This script defines the color of the MeVisLab user interface elements. You can define other colors and more items; this is just an example of what you can do with user scripts. Switch back to the MeVisLab IDE and select the menu item {{< menuitem "Extras" "Reload Module Database (Clear Cache)">}} again. The colors of the MeVisLab IDE change as defined in our Python script. This change persists until you restart MeVisLab and can always be repeated by selecting the menu entry or the keyboard shortcut {{< keyboard "ctrl+F9" >}}. -## Show status of module in- and output {#mlimagestate} +## Show Status of Module Input and Output {#mlimagestate} Especially in large networks it is useful to see the state of the input and output connectors of a module. By default, the module connectors do not show if data is available. Below image shows a `DicomImport` module and a `View2D` module where no data is loaded. @@ -193,7 +193,7 @@ After loading a valid DICOM directory, the connectors providing a valid ML image ![No data on connector](/images/tutorials/LMIMageState_On_2.png "No data on connector") -## Module suggestion of module in- and output {#modulesuggest} +## Module Suggestion of Module Input and Output {#modulesuggest} {{< youtube "q_cw583EE_s" >}} diff --git a/mevislab.github.io/content/tutorials/summary.md b/mevislab.github.io/content/tutorials/summary.md index e63971832..c19d45254 100644 --- a/mevislab.github.io/content/tutorials/summary.md +++ b/mevislab.github.io/content/tutorials/summary.md @@ -28,8 +28,8 @@ Free evaluation licenses of the **MeVisLab ApplicationBuilder**, time-limited to ## Prototype ### Step 1: Develop your network {#DevelopNetwork} In the first step, you are developing an application based on the following requirements: -* **Requirement 1**: The application shall be able to load DICOM data. -* **Requirement 2**: The application shall provide a 2D and a 3D viewer. +* **Requirement 1**: The application shall be able to load DICOM data +* **Requirement 2**: The application shall provide a 2D and a 3D viewer * **Requirement 3**: The 2D viewer shall display the loaded images * **Requirement 4**: The 2D viewer shall provide the possibility to segment parts of the image based on a RegionGrowing algorithm * **Requirement 4.1**: It shall be possible to click into the image for defining a marker position for starting the RegionGrowing @@ -44,26 +44,26 @@ In the first step, you are developing an application based on the following requ * **Requirement 9.2**: Segmentation results * **Requirement 9.3**: All -### Step 2: Create your macro module +### Step 2: Create Your Macro Module Your network will be encapsulated in a macro module for later application development. For details about macro modules, see [Example 2.2: Global macro modules](/tutorials/basicmechanisms/macromodules/globalmacromodules/). -### Step 3: Develop a User Interface and add Python Scripting {#UIDesign} +### Step 3: Develop a User Interface and Add Python Scripting {#UIDesign} Develop the UI and Python Scripts based on your requirements from Step 1. The resulting UI will look like below mockup: ![User Interface Design](/images/tutorials/summary/UIMockUp.png "User Interface Design") ## Review -### Step 4: Write automated tests for your macro module +### Step 4: Write Automated Tests for Your Macro Module Test your macro module in MeVisLab. Your requirements from Step 1 are translated into test cases written in Python. The fields accessible via Python as defined in Step 2 shall be used to test your application. -### Step 5: Create an installable executable +### Step 5: Create an Installable Executable Create a standalone application by using the **MeVisLab ApplicationBuilder** and install the application on another system. ## Refine -### Step 6: Update your network and macro module +### Step 6: Update Your Network and Macro Module Integrate feedback from customers having installed your executable and adapt your test cases from Step 4. -### Step 7: Update your installable executable +### Step 7: Update Your Installable Executable Re-build your executable and release a new version of your application. The above loop can easily be repeated until your product completely fulfills your defined requirements. diff --git a/mevislab.github.io/content/tutorials/testing.md b/mevislab.github.io/content/tutorials/testing.md index 55dee67c9..1b257696f 100644 --- a/mevislab.github.io/content/tutorials/testing.md +++ b/mevislab.github.io/content/tutorials/testing.md @@ -14,9 +14,9 @@ menu: --- # MeVisLab Tutorial Chapter VI {#TutorialChapter6} -## Testing, Profiling and Debugging in MeVisLab {#TutorialTesting} +## Testing, Profiling, and Debugging in MeVisLab {#TutorialTesting} -The MeVisLab Integrated Development Environment (IDE) provides tools to write automated tests in Python, profile your network performance and to debug your Python code. +The MeVisLab Integrated Development Environment (IDE) provides tools to write automated tests in Python, to profile your network performance, and to debug your Python code. All of these funtionalities will be addressed in this chapter. ### Testing @@ -27,7 +27,7 @@ The MeVisLab TestCenter is the starting point of your tests. Select {{}}. You can define break points in Python, add variables to your watchlist and walk through your break points just like in other editors and debuggers. +Debugging can be enabled whenever the integrated text editor MATE is opened. Having a Python file opened, you can enable debugging via {{}}. You can define break points in Python, add variables to your watchlist, and walk through your break points just like in other editors and debuggers. ![MeVisLab Debugging](/images/tutorials/testing/MATE_debugging.png "MeVisLab Debugging") diff --git a/mevislab.github.io/content/tutorials/thirdparty.md b/mevislab.github.io/content/tutorials/thirdparty.md index f41e26ae6..6e07eb433 100644 --- a/mevislab.github.io/content/tutorials/thirdparty.md +++ b/mevislab.github.io/content/tutorials/thirdparty.md @@ -15,10 +15,10 @@ menu: # MeVisLab Tutorial Chapter VIII {#TutorialChapter8} -## Using ThirdParty software integrated into MeVisLab {#TutorialThirdParty} +## Using ThirdParty Software Integrated into MeVisLab {#TutorialThirdParty} MeVisLab is equipped with a lot of useful software right out of the box, like the Insight Segmentation and Registration Toolkit (ITK) or the Visualization Toolkit (VTK). This chapter works as a guide on how to use some of the third party components integrated in MeVisLab for your projects via Python scripting. {{}} -You will also find instructions to install and use any Python package (e.g. PyTorch) in MeVisLab using the `PythonPip` module. +You will also find instructions to install and use any Python package (e.g., PyTorch) in MeVisLab using the `PythonPip` module. {{}} ### OpenCV @@ -52,6 +52,6 @@ The tutorials available here shall provide examples on how to integrate AI into [Matplotlib](https://matplotlib.org/) is a library for creating static, animated, and interactive visualizations in Python. * create publication quality plots -* Make interactive figures that can be zoomed, panned and updated +* Make interactive figures that can be zoomed, panned, and updated * Customize visual style and layout * Export to many file formats diff --git a/mevislab.github.io/content/tutorials/thirdparty/MONAI/monaiexample2.md b/mevislab.github.io/content/tutorials/thirdparty/MONAI/monaiexample2.md index a4c01db11..b2b3161b5 100644 --- a/mevislab.github.io/content/tutorials/thirdparty/MONAI/monaiexample2.md +++ b/mevislab.github.io/content/tutorials/thirdparty/MONAI/monaiexample2.md @@ -201,7 +201,7 @@ Reload your macro module and enter the following values for your new fields: * sizeY = 160 * sizeZ = 160 -Next, we change the grey values of the image, because the algorithm has been trained on values between -57 and 164. Again, the values can be found in the *inference.json* file in your *configs* directory. +Next, we change the gray values of the image, because the algorithm has been trained on values between -57 and 164. Again, the values can be found in the *inference.json* file in your *configs* directory. Open the *\*.script* file and add the following fields to your local macro module `MonaiDemo`: @@ -224,7 +224,7 @@ As already done before, we can now defined the threshold values for our module v * thresholdMin = -57 * thresholdMax = 164 -As defined in the *inference.json* file in your *configs* directory, the grey values in the image must be between 0 and 1. +As defined in the *inference.json* file in your *configs* directory, the gray values in the image must be between 0 and 1. Open the *\*.script* file and add the following fields to your local macro module `MonaiDemo`: diff --git a/mevislab.github.io/content/tutorials/thirdparty/assimp.md b/mevislab.github.io/content/tutorials/thirdparty/assimp.md index b10fd24df..621c031d7 100644 --- a/mevislab.github.io/content/tutorials/thirdparty/assimp.md +++ b/mevislab.github.io/content/tutorials/thirdparty/assimp.md @@ -16,13 +16,13 @@ menu: ## Introduction [Assimp](http://www.assimp.org "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. +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](/images/tutorials/thirdparty/SoSceneLoader.png "SoSceneLoader") -You can also use the `SoSceneWriter` module to export your 3D scenes from MeVisLab into any of the output formats listed below. +You can also use the `SoSceneWriter` module to export your 3D scenes from MeVisLab in a number of output formats. -## File formats +## File Formats The Assimp-Lib currently supports the following [file formats](https://assimp-docs.readthedocs.io/en/v5.1.0/about/introduction.html): * 3D Manufacturing Format (.3mf) diff --git a/mevislab.github.io/content/tutorials/thirdparty/matplotlib.md b/mevislab.github.io/content/tutorials/thirdparty/matplotlib.md index b216d96be..0d360693d 100644 --- a/mevislab.github.io/content/tutorials/thirdparty/matplotlib.md +++ b/mevislab.github.io/content/tutorials/thirdparty/matplotlib.md @@ -14,20 +14,20 @@ menu: --- # 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. +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. {{}} -The documentation on Matplotlib along with general examples, cheat sheets and a starting guide can be found [here](https://matplotlib.org/). +The documentation on Matplotlib along with general examples, cheat sheets, and a starting guide can be found [here](https://matplotlib.org/). {{}} -As MeVisLab supports the integration of Python scripts e. g. for test automation, Matplotlib can be used to visualize any data you might want to see. And as it is directly integrated into MeVisLab, you don't have to install it (via `PythonPip` module) first. +As MeVisLab supports the integration of Python scripts, e.g., for test automation, Matplotlib can be used to visualize any data you might want to see. And as it is directly integrated into MeVisLab, you don't have to install it (via `PythonPip` module) first. -In the following tutorial pages on Matplotlib, you will be shown how to create a module in MeVisLab, that helps you plot grayscale distributions of single slices or defined sequences of slices of a DICOM image and layer the grayscale distributions of two chosen slices for comparison. +In the following tutorial pages on Matplotlib, you will be shown how to create a module in MeVisLab that helps you plot greyscale distributions of single slices or defined sequences of slices of a DICOM image and layer the grayscale distributions of two chosen slices for comparison. + The module that is adapted during the tutorials is set up in the [Example 1: Module Setup](/tutorials/thirdparty/matplotlib/modulesetup) tutorial. + The panel and two dimensional plotting functionality is added in [Example 2: 2D Plotting](/tutorials/thirdparty/matplotlib/2dplotting). -+ In [Example 3: Slice Comparison](/tutorials/thirdparty/matplotlib/slicecomparison) the comparison between two chosen slices is enabled by overlaying their grayscale distributions. -+ [Example 4: 3D Plotting](/tutorials/thirdparty/matplotlib/3dplotting) adds an additional three dimensional plotting functionality to the panel. ++ In [Example 3: Slice Comparison](/tutorials/thirdparty/matplotlib/slicecomparison), the comparison between two chosen slices is enabled by overlaying their grayscale distributions. ++ [Example 4: 3D Plotting](/tutorials/thirdparty/matplotlib/3dplotting) adds an additional three-dimensional plotting functionality to the panel. {{}} Notice that for the Matplotlib tutorials, the previous tutorial always works as a foundation for the following one. diff --git a/mevislab.github.io/content/tutorials/thirdparty/matplotlib/3Dplotting.md b/mevislab.github.io/content/tutorials/thirdparty/matplotlib/3Dplotting.md index faaf016a7..a8e1f133c 100644 --- a/mevislab.github.io/content/tutorials/thirdparty/matplotlib/3Dplotting.md +++ b/mevislab.github.io/content/tutorials/thirdparty/matplotlib/3Dplotting.md @@ -16,7 +16,7 @@ menu: ## Introduction -In this tutorial, we will equip the macro module we created in the [Example 1: Module Setup](/tutorials/thirdparty/matplotlib/modulesetup) and later on adapted by enabling it to plot grayscale distributions of single slices and sequences in 2D in [Example 2: 2D Plotting](/tutorials/thirdparty/matplotlib/2dplotting) with a three dimensional plotting functionality. +In this tutorial, we will equip the macro module we created in the [Example 1: Module Setup](/tutorials/thirdparty/matplotlib/modulesetup) and later on adapted by enabling it to plot grayscale distributions of single slices and sequences in 2D in [Example 2: 2D Plotting](/tutorials/thirdparty/matplotlib/2dplotting) with a three-dimensional plotting functionality. ## Steps to do diff --git a/mevislab.github.io/content/tutorials/thirdparty/pytorch.md b/mevislab.github.io/content/tutorials/thirdparty/pytorch.md index 90f170157..fcf08e18b 100644 --- a/mevislab.github.io/content/tutorials/thirdparty/pytorch.md +++ b/mevislab.github.io/content/tutorials/thirdparty/pytorch.md @@ -28,12 +28,12 @@ We are not explaining PyTorch itself. These tutorials are examples for how to in {{}} ## Available Tutorials -### Install PyTorch by using the PythonPip module +### Install PyTorch by Using the PythonPip Module The first example shows how to install *torch* and *torchvision* by using the MeVisLab module `PythonPip`. This module can be used to install Python packages not integrated into MeVisLab. -### Use trained PyTorch networks in MeVisLab +### Use Trained PyTorch Networks in MeVisLab In this example, we are using a pre-trained network from [torch.hub](https://pytorch.org/hub/) to generate an AI based image overlay of a brain parcellation map. -### Segment persons in webcam videos +### Segment Persons in Webcam Videos The second tutorial adapts the [Example 2: Face Detection with OpenCV](/tutorials/thirdparty/opencv/thirdpartyexample2/ "Example 2: Face Detection with OpenCV") to segment a person shown in a webcam stream. The network has been taken from [torchvision](https://pytorch.org/vision/stable/index.html). diff --git a/mevislab.github.io/content/tutorials/visualization.md b/mevislab.github.io/content/tutorials/visualization.md index 69811d8ed..c08ddb608 100644 --- a/mevislab.github.io/content/tutorials/visualization.md +++ b/mevislab.github.io/content/tutorials/visualization.md @@ -32,11 +32,11 @@ An easy way to display data and images in 2D and 3D is by using the Modules `Vie 1. Scroll through the slices using the mouse wheel {{< mousebutton "middle" >}} and/or middle mouse button {{< mousebutton "middle" >}}. -2. Change the contrast of the image by clicking the right mouse button {{< mousebutton "right" >}} and move the mouse +2. Change the contrast of the image by clicking the right mouse button {{< mousebutton "right" >}} and moving the mouse. -3. Zoom in and out by pressing {{< keyboard "CTRL" >}} and middle mouse button {{< mousebutton "middle" >}} +3. Zoom in and out by pressing {{< keyboard "CTRL" >}} and middle mouse button {{< mousebutton "middle" >}}. -4. Toggle between multiple timepoints (if available) via {{< keyboard "ArrowLeft" >}} and {{< keyboard "ArrowRight" >}} +4. Toggle between multiple timepoints (if available) via {{< keyboard "ArrowLeft" >}} and {{< keyboard "ArrowRight" >}}. 5. More features can be found on the help page. @@ -46,18 +46,18 @@ The `View2DExtensions` module provides additional ways to interact with an image ### View3D -1. Zoom in and out using the mouse wheel {{< mousebutton "middle" >}} +1. Zoom in and out using the mouse wheel {{< mousebutton "middle" >}}. -2. Drag the 3D objects using the middle mouse button {{< mousebutton "middle" >}} +2. Drag the 3D objects using the middle mouse button {{< mousebutton "middle" >}}. -3. Change the contrast of the image by clicking the right mouse button {{< mousebutton "right" >}} and moving the mouse +3. Change the contrast of the image by clicking the right mouse button {{< mousebutton "right" >}} and moving the mouse. 4. Rotate the object by pressing the left mouse button {{< mousebutton "left" >}} and moving the object around. The present orientation is displayed by a cube in the bottom right corner. 5. More features, like recording movies, can be found on the help page. -6. Toggle between multiple timepoints (if available) via {{< keyboard "ArrowLeft" >}} and {{< keyboard "ArrowRight" >}} +6. Toggle between multiple timepoints (if available) via {{< keyboard "ArrowLeft" >}} and {{< keyboard "ArrowRight" >}}. {{}} -More Information on Image Processing in MeVisLab can be found {{< docuLinks "/Resources/Documentation/Publish/SDK/GettingStarted/ch12.html" "here" >}} +More information on Image Processing in MeVisLab can be found {{< docuLinks "/Resources/Documentation/Publish/SDK/GettingStarted/ch12.html" "here" >}} {{}} diff --git a/mevislab.github.io/content/tutorials/visualization/pathtracer/pathtracerexample1.md b/mevislab.github.io/content/tutorials/visualization/pathtracer/pathtracerexample1.md index d46447a1f..2a7ae84f2 100644 --- a/mevislab.github.io/content/tutorials/visualization/pathtracer/pathtracerexample1.md +++ b/mevislab.github.io/content/tutorials/visualization/pathtracer/pathtracerexample1.md @@ -17,7 +17,7 @@ menu: {{< youtube "E0H87Cimu_M">}} ## 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. +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. {{}} 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. You will see a message if your hardware does not support CUDA: @@ -26,20 +26,20 @@ The MeVis Path Tracer requires an NVIDIA graphics card with CUDA support. In ord *Handling cudaGetDeviceCount returned 35 (CUDA driver version is insufficient for CUDA runtime version)* {{}} -## Steps to do -As a first step for comparison, you are creating a 3D scene with 2 spheres using the already known volume rendering. +## Steps to Do +As a first step for comparison, you are creating a 3D scene with two spheres using the already known volume rendering. ### Volume Rendering #### Create 3D objects -Add 3 `WEMInitialize` modules for 1 *Cube* and 2 *Icosphere* to your workspace and connect each of them to a `SoWEMRenderer`. Set *instanceName* of the `WEMInitialize` modules to *Sphere1*, *Sphere2* and *Cube*. Set *instanceName* of the `SoWEMRenderer` modules to *RenderSphere1*, *RenderSphere2* and *RenderCube*. +Add three `WEMInitialize` modules for one *Cube* and two *Icosphere* to your workspace and connect each of them to a `SoWEMRenderer`. Set *instanceName* of the `WEMInitialize` modules to *Ccube*, *Sphere1*, and *Sphere2*. Set *instanceName* of the `SoWEMRenderer` modules to and *RenderCube*, *RenderSphere1*, and *RenderSphere2*. -For *RenderSphere1* define a *Diffuse Color* *yellow* and set *Face Alpha* to *0.5*. The *RenderCube* remains as is and the *RenderSphere2* is defined as *Diffuse Color* *red* and *Face Alpha* *0.5*. +For *RenderSphere1*, define a *Diffuse Color* *yellow* and set *Face Alpha* to *0.5*. The *RenderCube* remains as is and the *RenderSphere2* is defined as *Diffuse Color* *red* and *Face Alpha* *0.5*. Group your modules and name the group *Initialization*. Your network should now look like this: ![Example Initialization](/images/tutorials/visualization/pathtracer/Example1_1.png "Example Initialization") -Use the Output Inspector for your `SoWEMRenderer` outputs and inspect the 3D rendering. You should have a yellow and a red sphere and a grey cube. +Use the Output Inspector for your `SoWEMRenderer` outputs and inspect the 3D rendering. You should have a yellow and a red sphere, and a grey cube. {{< imagegallery 3 "/images/tutorials/visualization/pathtracer" "Sphere1" "Sphere2" "Cube" >}} @@ -52,21 +52,21 @@ If you now inspect the output of the `SoGroup`, you will see an orange sphere. ![Missing Translation](/images/tutorials/visualization/pathtracer/Example1_3.png "Missing Translation") -You did not translate the locations of our 3 objects, they are all located at the same place in world coordinates. Open the `WEMInitialize` panels of your 3D objects and define the following translations and scalings: +You did not translate the locations of the three objects; they are all located at the same place in world coordinates. Open the `WEMInitialize` panels of your 3D objects and define the following translations and scalings: {{< imagegallery 3 "/images/tutorials/visualization/pathtracer" "WEMInitializeSphere1" "WEMInitializeSphere2" "WEMInitializeCube" >}} -The result of the `SoGroup` now shows 2 spheres on a rectangular cube. +The result of the `SoGroup` now shows two spheres on a rectangular cube. ![Objects Translated and Scaled](/images/tutorials/visualization/pathtracer/Example1_4.png "Objects Translated and Scaled") -For the viewer, you now add a `SoCameraInteraction`, a `SoDepthPeelRenderer` and a `SoRenderArea` module to your network and connect them. +For the viewer, you now add a `SoCameraInteraction`, a `SoDepthPeelRenderer`, and a `SoRenderArea` module to your network and connect them. ![Network with Viewer](/images/tutorials/visualization/pathtracer/Example1_5.png "Network with Viewer") -You now have a 3D volume rendering of our 3 objects. +You now have a 3D volume rendering of our three objects. -In order to distinguish between the 2 viewers, you now add a label to the `SoRenderArea` describing that this is the *Volume Rendering*. Add a `SoMenuItem`, a `SoBorderMenu` and a `SoSeparator` to your `SoRenderArea`. +In order to distinguish between the two viewers, you now add a label to the `SoRenderArea` describing that this is the *Volume Rendering*. Add a `SoMenuItem`, a `SoBorderMenu`, and a `SoSeparator` to your `SoRenderArea`. ![SoMenuItem](/images/tutorials/visualization/pathtracer/Example1_6.png "SoMenuItem") @@ -82,11 +82,11 @@ Finally, you should group all modules belonging to your volume rendering. For the Path Tracer, you can just re-use our 3D objects from volume rendering. This helps us to compare the rendering results. #### Rendering -Path Tracer modules fully integrate into MeVisLab Open Inventor, therefore the general principles and the necessary modules are not completely different. Add a `SoGroup` module to your workspace and connect it to your 3D objects from `SoWemRenderer`. A `SoBackground` as in volume rendering network is not necessary but you add a `SoPathTracerMaterial` and connect it to the `SoGroup`. You can leave all settings as default for now. +Path Tracer modules fully integrate into MeVisLab Open Inventor, therefore the general principles and the necessary modules are not completely different. Add a `SoGroup` module to your workspace and connect it to your 3D objects from `SoWEMRenderer`. A `SoBackground` as in volume rendering network is not necessary but you add a `SoPathTracerMaterial` and connect it to the `SoGroup`. You can leave all settings as default for now. ![Path Tracer Material](/images/tutorials/visualization/pathtracer/Example1_9.png "Path Tracer Material") -Add a `SoPathTracerAreaLight`, a `SoPathTracerMesh` and a `SoPathTracer` to a `SoSeparator` and connect the `SoPathTracerMesh` to your `SoGroup`. This adds your 3D objects to a Path Tracer Scene. +Add a `SoPathTracerAreaLight`, a `SoPathTracerMesh`, and a `SoPathTracer` to a `SoSeparator` and connect the `SoPathTracerMesh` to your `SoGroup`. This adds your 3D objects to a Path Tracer Scene. ![Path Tracer](/images/tutorials/visualization/pathtracer/Example1_10.png "Path Tracer") @@ -98,7 +98,7 @@ Add a `SoCameraInteraction` and a `SoRenderArea` to your network and connect the ![SoCameraInteraction](/images/tutorials/visualization/pathtracer/Example1_12.png "SoCameraInteraction") -You can now use both `SoRenderArea` modules to visualize the differences side by side. You should also add the `SoMenuItem`, a `SoBorderMenu` and a `SoSeparator` to your `SoRenderArea` in order to have a label for Path Tracing inside the viewer. +You can now use both `SoRenderArea` modules to visualize the differences side by side. You should also add the `SoMenuItem`, a `SoBorderMenu`, and a `SoSeparator` to your `SoRenderArea` in order to have a label for Path Tracing inside the viewer. Define the *Label* of the `SoMenuItem` as *Path Tracing* and set *Border Alignment* to *Top Right* and *Menu Direction* to *Horizontal* for the `SoBorderMenu`. @@ -110,13 +110,13 @@ Finally, group your Path Tracer modules to another group named *Path Tracing*. ![Side by Side](/images/tutorials/visualization/pathtracer/Example1_15.png "Side by Side") -### Share the same camera +### Share the Same Camera Finally, you want to have the same camera perspective in both viewers so that you can see the differences. Add a `SoPerspectiveCamera` module to your workspace and connect it to the volume rendering and the Path Tracer network. The Path Tracer network additionally needs a SoGroup, see below for connection details. You have to toggle *detectCamera* in both of your `SoCameraInteraction` modules in order to synchronize the view for both `SoRenderArea` viewers. ![Camera Synchronization](/images/tutorials/visualization/pathtracer/Example1_16.png "Camera Synchronization") {{}} -Path Tracing requires a lot of iterations through the image before reaching the best possible result. You can see the maximum number of iterations defined and the current iteration in the `SoPathTracer` panel. The more iterations, the better the result but the more time it takes to finalize your image. +Path Tracing requires a lot of iterations before reaching the best possible result. You can see the maximum number of iterations defined and the current iteration in the `SoPathTracer` panel. The more iterations, the better the result but the more time it takes to finalize your image. {{}} {{< imagegallery 3 "/images/tutorials/visualization/pathtracer" "PathTracer_1_Iteration" "PathTracer_100_Iterations" "PathTracer_1000_Iterations" >}} @@ -125,13 +125,13 @@ Path Tracing requires a lot of iterations through the image before reaching the Path Tracing provides a much more realistic way to visualize the behavior of light in a scene. It simulates the scattering and absorption of light within the volume. ## Exercises -1. Play around with different `SoPathTracerMaterial` settings and define different materials -2. Change the maximum number of iterations in `SoPathTracer` module -3. Change the configurations in `SoPathTracerAreaLight` module +1. Play around with different `SoPathTracerMaterial` settings and define different materials. +2. Change the maximum number of iterations in `SoPathTracer` module. +3. Change the configurations in `SoPathTracerAreaLight` module. ## Summary -* Path Tracer modules can be used the same way as Open Inventor modules -* A `SoPerspectiveCamera` can be used for multiple viewers to synchronize camera position -* Path Tracing produces beautiful, photorealistic renderings, but can be computationally expensive +* Path Tracer modules can be used the same way as Open Inventor modules. +* A `SoPerspectiveCamera` can be used for multiple viewers to synchronize camera position. +* Path Tracing produces beautiful, photorealistic renderings, but can be computationally expensive. {{< networkfile "examples/visualization/example6/pathtracer1.mlab" >}} diff --git a/mevislab.github.io/content/tutorials/visualization/pathtracer/pathtracerexample2.md b/mevislab.github.io/content/tutorials/visualization/pathtracer/pathtracerexample2.md index 0d2d6b889..9539ca0d4 100644 --- a/mevislab.github.io/content/tutorials/visualization/pathtracer/pathtracerexample2.md +++ b/mevislab.github.io/content/tutorials/visualization/pathtracer/pathtracerexample2.md @@ -12,7 +12,7 @@ menu: weight: 579 parent: "visualization_example6" --- -# Example 6.2: Visualization using SoPathTracer +# 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. @@ -24,8 +24,8 @@ The MeVis Path Tracer requires an NVIDIA graphics card with CUDA support. In ord *Handling cudaGetDeviceCount returned 35 (CUDA driver version is insufficient for CUDA runtime version)* {{}} -## Steps to do -### Develop your network +## Steps to Do +### Develop Your Network Download and open the [images](/examples/visualization/example6/Volume_1.mlimage) by using a `LocalImage` module. Connect it to a `View2D` to visually inspect its contents. ![MR Image of Knee](/images/tutorials/visualization/pathtracer/V6.2_1.png "MR Image of Knee in 2D") @@ -40,15 +40,15 @@ It's essential to consistently position the `SoPathTracer `module on the right s ![SoPathTracerVolume & SoPathTracer](/images/tutorials/visualization/pathtracer/V6.2_2.png "SoPathTracerVolume & SoPathTracer") -If you check your `SoExaminerViewer` you will see a black box. We need to define a LUT for the grey values first. +If you check your `SoExaminerViewer` you will see a black box. We need to define a LUT for the gray values first. ![SoExaminerViewer](/images/tutorials/visualization/pathtracer/V6.2_3.png "SoExaminerViewer") -Now connect the `SoLUTEditor` module to your `SoPathTracerVolume` as illustrated down bellow and you will be able to see the knee. +Now connect the `SoLUTEditor` module to your `SoPathTracerVolume` as illustrated down below and you will be able to see the knee. ![SoLUTEditor](/images/tutorials/visualization/pathtracer/SoLUTEditor1.png "SoLUTEditor") -Add a `MinMaxScan` module to the `LocalImage` module and open the panel. The module shows the minimal and maximal grey values of the volume. +Add a `MinMaxScan` module to the `LocalImage` module and open the panel. The module shows the minimal and maximal gray values of the volume. Open the panel of the `SoLUTEditor` module and define Range between *0* and *2047* as calculated by the `MinMaxScan`. @@ -56,9 +56,9 @@ Open the panel of the `SoLUTEditor` module and define Range between *0* and *204 Next, add lights to your scene. Connect a `SoPathTracerAreaLight` and a `SoPathTracerBackgroundLight` module to your `SoExaminerViewer` to improve scene lighting. -The `SoPathTracerAreaLight` module provides a physically based area light that illuminates the scene of a `SoPathTracer`. The lights can be rectangular or discs and have an area, color and intensity. They can be positioned with spherical coordinates around the bounding box of the renderer, or they can be position in world or camera space. +The `SoPathTracerAreaLight` module provides a physically based area light that illuminates the scene of a `SoPathTracer`. The lights can be rectangular or discs and have an area, color, and intensity. They can be positioned with spherical coordinates around the bounding box of the renderer, or they can be position in world or camera space. -The `SoPathTracerBackgroundLight` module provides a background light for the `SoPathTracer`. It supports setting a top, middle and bottom color or alternatively it support image based lighting (IBL) using a sphere or cube map. Only one background light can be active for a given `SoPathTracer`. +The `SoPathTracerBackgroundLight` module provides a background light for the `SoPathTracer`. It supports setting a top, middle, and bottom color or alternatively, it support image based lighting (IBL) using a sphere or cube map. Only one background light can be active for a given `SoPathTracer`. ![Lights](/images/tutorials/visualization/pathtracer/Lights2.png "Lights") @@ -66,24 +66,24 @@ Open the panel of the `SoPathTracerBackgroundLight` module and choose your three ![SoPathTracerBackgroundLight](/images/tutorials/visualization/pathtracer/BackgroundLight.png "SoPathTracerBackgroundLight") -#### Manually define LUT +#### Manually Define LUT Either define your desired colors for your LUT in the *Editor* tab manually as shown down below. ![LUT](/images/tutorials/visualization/pathtracer/V6.2_LUTandSoExaminerViewer.png "LUT") -#### Load example LUT from file +#### Load Example LUT from File As an alternative, you can replace the `SoLUTEditor` with a `LUTLoad` and load this [XML file](/examples/visualization/example6/LUT_Original.xml) to use a pre-defined LUT. ![LUTLoad](/images/tutorials/visualization/pathtracer/LUTLoad.png "LUTLoad") Now, let's enhance your rendering further by using the `SoPathTracerMaterial` module. This module provides essential material properties for geometry and volumes within the `SoPathTracer` scene. -Add a `SoPathTracerMaterial` module to your `SoPathTracerVolume`. Open it’s panel and navigate to the tab *Surface Brdf*. Change the *Diffuse* color for altering the visual appearance of surfaces. The *Diffuse* color determines how light interacts with the surface, influencing its overall color and brightness. Set *Specular* to *0.5*, *Shininess* to *1.0* and *Specular Intensity* to *0.5*. +Add a `SoPathTracerMaterial` module to your `SoPathTracerVolume`. Open it’s panel and navigate to the tab *Surface Brdf*. Change the *Diffuse* color for altering the visual appearance of surfaces. The *Diffuse* color determines how light interacts with the surface, influencing its overall color and brightness. Set *Specular* to *0.5*, *Shininess* to *1.0*, and *Specular Intensity* to *0.5*. ![SoPathTracerMaterial](/images/tutorials/visualization/pathtracer/SoPathTracerMaterial_Knee.png "SoPathTracerMaterial") {{}} -The resulting rendering in `SoExaminerViewer` might look different, depending on your defined LUT. +The resulting rendering in `SoExaminerViewer` might look different depending on your defined LUT. {{}} ## Visualize Bones @@ -99,31 +99,31 @@ Load the [Bones mask](/examples/visualization/example6/edited_Bones.mlimage) by Start by disabling the visibility of your first volume by toggeling `SoPathTracerVolume` *Enabled* field to off. This helps improve the rendering of the bones itself and makes it easier to define colors for your LUT. -#### Load example LUT from file +#### Load Example LUT from File Once again, you can decide to define the LUT yourself in `SoLUTEditor` module, or load a prepared XML File in a `LUTLoad` module as provided [here](/examples/visualization/example6/LUT_Bones.xml). -#### Manually define LUT +#### Manually Define LUT If you want to define your own LUT, connect a `MinMaxScan` module to your `LocalImage1` and define Range for the `SoLUTEditor` as already done before. ![MinMaxScan of Bones mask](/images/tutorials/visualization/pathtracer/MinMaxScan_Bones.png "MinMaxScan of Bones mask") -Open the panel of `SoLUTEditor1` for the bones and go to tab *Range* and set *New Range Min* to *0* and *New Range Max* to *127*. Define the following colors in tab *Editor*. +Open the panel of `SoLUTEditor1` for the bones and go to tab *Range* and set *New Range Min* to *0* and *New Range Max* to *127*. Define the following colors in the tab *Editor*. ![SoLUTEditor1](/images/tutorials/visualization/pathtracer/V6.2_11_LUT_Bones.png "SoLUTEditor1") -You can increase the *Shininess* of the bones and change the *Diffuse* color in the *Surface Brdf* tab within the `SoPathTracerMaterial1`. Also set *Specular* to *0.5*, *Shininess* to *0.904* and *Specular Intensity* to *0.466*. +You can increase the *Shininess* of the bones and change the *Diffuse* color in the *Surface Brdf* tab within the `SoPathTracerMaterial1`. Also set *Specular* to *0.5*, *Shininess* to *0.904*, and *Specular Intensity* to *0.466*. ![SoPathTracerMaterial1](/images/tutorials/visualization/pathtracer/V6.2_SoPathTracerMaterial.png "SoPathTracerMaterial1") ## Visualize Vessels -Repeat the process for the vessels. Add another `LocalImage`, `SoPathTracerVolume`, `SoLUTEditor` (or `LUTLoad`) and `View2D` module as seen below. Load this [Vessels mask](/examples/visualization/example6/edited_Vessels.mlimage) and check it using `View2D`. +Repeat the process for the vessels. Add another `LocalImage`, `SoPathTracerVolume`, `SoLUTEditor` (or `LUTLoad`), and `View2D` module as seen below. Load this [Vessels mask](/examples/visualization/example6/edited_Vessels.mlimage) and check it using `View2D`. ![Vessels mask](/images/tutorials/visualization/pathtracer/View2D_Vessels.png "Vessels mask") -#### Load example LUT from file +#### Load Example LUT from File Load a prepared XML File in a `LUTLoad` module as provided [here](/examples/visualization/example6/LUT_Vessels.xml) -#### Manually define LUT +#### Manually Define LUT Connect the `MinMaxScan` to your `LocalImage2`. Access the `SoLUTEditor2` panel in the tab *Range* and set the *New Range Min* to *0* and the *New Range Max* to *255*. Additionally, modify the illustrated color settings within the *Editor* tab. @@ -132,12 +132,12 @@ Access the `SoLUTEditor2` panel in the tab *Range* and set the *New Range Min* t ![SoLUTEditor2](/images/tutorials/visualization/pathtracer/V6.2_SoLUTEditor1_Vessels.png "SoLUTEditor2") -Now you should set your first volume visible again by toggeling `SoPathTracerVolume` *Enabled* field to on. +Now you should set your first volume visible again by toggling `SoPathTracerVolume` *Enabled* field to on. ![Final Resul](/images/tutorials/visualization/pathtracer/FinalResult.png "Final Result") {{}} -The resulting rendering in `SoExaminerViewer` might look different, depending on your defined LUTs. +The resulting rendering in `SoExaminerViewer` might look different depending on your defined LUTs. {{}} ![Final Resul](/images/tutorials/visualization/pathtracer/FinalResult2.png "Final Result with Enhanced Visualization") diff --git a/mevislab.github.io/content/tutorials/visualization/visualizationexample1.md b/mevislab.github.io/content/tutorials/visualization/visualizationexample1.md index a070abe96..537f056e1 100644 --- a/mevislab.github.io/content/tutorials/visualization/visualizationexample1.md +++ b/mevislab.github.io/content/tutorials/visualization/visualizationexample1.md @@ -8,11 +8,11 @@ tags: ["Beginner", "Tutorial", "Visualization", "2D"] menu: main: identifier: "visualization_example1" - title: "Use the SynchroView2D Module for visualizing the same slice(s) of two images" + title: "Use the SynchroView2D module for visualizing the same slice(s) of two images" weight: 555 parent: "visualization" --- -# Example 1: Synchronous view of two images {#VisualizationExample1} +# Example 1: Synchronous View of Two Images {#VisualizationExample1} ## Introduction In this example we like to use the module `SynchroView2D` to be able to inspect two different images simultaneously. @@ -28,8 +28,8 @@ The `SynchroView2D` module is explained {{< docuLinks "/Standard/Documentation/P {{}} -## Steps to do -### Develop your network +## Steps to Do +### Develop Your Network Start the example by adding the module `LocalImage` to your workspace to load the example image *Tumor1_Head_t1.small.tif*. Next, add and connect the following modules as shown. ![SynchroView2D](/images/tutorials/visualization/V1_01.png "SynchroView2D Viewer") diff --git a/mevislab.github.io/content/tutorials/visualization/visualizationexample2.md b/mevislab.github.io/content/tutorials/visualization/visualizationexample2.md index 615e640b6..887840147 100644 --- a/mevislab.github.io/content/tutorials/visualization/visualizationexample2.md +++ b/mevislab.github.io/content/tutorials/visualization/visualizationexample2.md @@ -12,24 +12,24 @@ menu: weight: 560 parent: "visualization" --- -# Example 2: Creating a magnifier {#TutorialVisualizationExample2} +# Example 2: Creating a Magnifier {#TutorialVisualizationExample2} {{< youtube "lfq_TkWOuCo" >}} ## Introduction -Medical images are typically displayed in three different viewing directions (see image): coronal, axial and sagittal. +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. +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. ![Body Planes](/images/tutorials/visualization/V2_00.png "Body Planes") -## Steps to do -### Develop your network +## Steps to Do +### Develop Your Network In this example, use the module `LocalImage` to load the example *image MRI_Head.tif*. Now, connect the module `OrthoView2D` with the loaded image. The image is displayed in three orthogonal viewing directions. The yellow marker displays the same voxel in all three images. You can scroll through the slices in all three viewing directions. {{}} -In case your image is black, change the *Window* and *Center* values by moving the mouse with right mouse button {{< mousebutton "right" >}} pressed. +In the case your image is black, change the *Window* and *Center* values by moving the mouse with right mouse button {{< mousebutton "right" >}} pressed. {{}} ![OrthoView2D](/images/tutorials/visualization/V2_01.png "OrthoView2D") @@ -37,7 +37,7 @@ In case your image is black, change the *Window* and *Center* values by moving t ### SoView2DPosition Next, we add the module `SoView2DPosition` (an Open Inventor module). -The module enables the selection of an image position via mouse-click {{< mousebutton "left" >}}. The last-clicked location in the Viewer is marked in white. If you now scroll through the slices, both, the last-clicked location and the current image location are shown. +The module enables the selection of an image position via mouse click {{< mousebutton "left" >}}. The last clicked location in the viewer is marked in white. If you now scroll through the slices, both, the last clicked location and the current image location are shown. ![SoView2DPosition](/images/tutorials/visualization/V2_02.png "SoView2DPosition") @@ -48,27 +48,27 @@ Instead of points, we like to mark areas. In order to do that, replace the modul ### Using a rectangle to build a magnifier -We like to use the module `SoView2DRectangle` to create a magnifier. In order to do that add the following modules to your workspace and connect them as shown below. We need to connect the module `SoView2DRectangle` to a hidden input connector of the module `SynchroView2D`. To be able to do this, click on your workspace and afterwards press {{< keyboard "SPACE" >}}. You can see, that `SynchroView2D` possesses Open Inventor input connectors. You can connect your module `SoView2DRectangle` to one of these connectors. +We like to use the module `SoView2DRectangle` to create a magnifier. In order to do that add the following modules to your workspace and connect them as shown below. We need to connect the module `SoView2DRectangle` to a hidden input connector of the module `SynchroView2D`. To be able to do this, click on your workspace and afterwards press {{< keyboard "SPACE" >}}. You can see that `SynchroView2D` possesses Open Inventor input connectors. You can connect your module `SoView2DRectangle` to one of these connectors. ![Hidden Inputs of SynchroView2D](/images/tutorials/visualization/V2_05.png "Hidden Inputs of SynchroView2D") ![Connect Hidden Inputs of SynchroView2D](/images/tutorials/visualization/V2_06.png "Connect Hidden Inputs of SynchroView2D") -In addition to that, add two types of the module `DecomposeVector3` to your network. In MeVisLab exist different data types, for example vectors, or single variable, which contain the data type float or integer. This module can be used to convert field values of type vector (in this case a vector consisting of three entries) into three single coordinates. You will see in the next step, why this module can be useful. +In addition to that, add two types of the module `DecomposeVector3` to your network. In MeVisLab, different data types exist, for example, vectors, or single variables, which contain the data type float or integer. This module can be used to convert field values of type vector (in this case a vector consisting of three entries) into three single coordinates. You will see in the next step why this module can be useful. ![DecomposeVector3](/images/tutorials/visualization/V2_07.png "DecomposeVector3") -We like to use the module `SubImage` to select a section of a slice, which is then displayed in the Viewer. The idea is to display a magnified section of one slice next to the whole slice in the module `SynchroView2D`. In order to do that, we need to tell the module `SubImage` which section to display in the Viewer. The section is selected using the module `SoView2DRectangle`. As a last step, we need to transmit the coordinates of the chosen rectangle to the module `SubImage`. To do that, we will build some parameter connections. +We like to use the module `SubImage` to select a section of a slice, which is then displayed in the viewer. The idea is to display a magnified section of one slice next to the whole slice in the module `SynchroView2D`. In order to do that, we need to tell the module `SubImage` which section to display in the viewer. The section is selected using the module `SoView2DRectangle`. As a last step, we need to transmit the coordinates of the chosen rectangle to the module `SubImage`. To do that, we will build some parameter connections. ![SubImage](/images/tutorials/visualization/V2_08.png "SubImage") -Now, open the panels of the modules `SoView2DRectangle` and `DecomposeVector3` and `DecomposeVector31`. +Now, open the panels of the modules `SoView2DRectangle`, `DecomposeVector3`, and `DecomposeVector31`. -We here rename the `DecomposeVector3` modules (press {{< keyboard "F2" >}} to do that), for a better overview. +We rename the `DecomposeVector3` modules (press {{< keyboard "F2" >}} to do that) here for a better overview. In the panel of the module `Rectangle` in the box Position you can see the position of the rectangle given in two 3D vectors. -We like to use the modules `DecomposeVector3` to extract the single x, y and z values of the vector. For that, create a parameter connection from the field *Start Wold Pos* to the vector of the module we named `StartWorldPos_Rectangle` and create a connection from the field *End World Pos* to the vector of module `EndWorldPos_Rectangle`. The decomposed coordinates can be now used for further parameter connections. +We like to use the modules `DecomposeVector3` to extract the single x, y, and z values of the vector. For that, create a parameter connection from the field *Start Wold Pos* to the vector of the module we named `StartWorldPos_Rectangle` and create a connection from the field *End World Pos* to the vector of module `EndWorldPos_Rectangle`. The decomposed coordinates can be now used for further parameter connections. ![Parameter Connections](/images/tutorials/visualization/V2_09.png "Parameter Connections") @@ -84,7 +84,7 @@ Now, create parameter connections from the fields *X*, *Y*, *Z* of the module `S ![Another Parameter Connection](/images/tutorials/visualization/V2_11.png "Another Parameter Connection") -With this, you finished your magnifier. Open the Viewer and draw a rectangle on one slice, to see the result. +With this, you finished your magnifier. Open the viewer and draw a rectangle on one slice to see the result. ![Final Magnifier with SubImage](/images/tutorials/visualization/V2_12.png "Final Magnifier with SubImage") @@ -92,9 +92,9 @@ With this, you finished your magnifier. Open the Viewer and draw a rectangle on Invert the image inside your magnified `SubImage` without changing the original image. You can use `Arithmetic*` modules for inverting. ## Summary -* The module `OrthoView2D` provides coronal, axial and sagittal views of an image. +* The module `OrthoView2D` provides coronal, axial, and sagittal views of an image. * The `SubImage` module allows to define a region of an input image to be treated as a separate image. -* Single x, y and z coordinates can be transferred to a 3-dimensional vector and vice versa by using `ComposeVector3` and `DecomposeVector3` -* Some modules provide hidden in- and outputs which can be shown via {{< keyboard "SPACE" >}} +* Single x, y, and z coordinates can be transferred to a 3-dimensional vector and vice versa by using `ComposeVector3` and `DecomposeVector3`. +* Some modules provide hidden inputs and outputs that can be shown via {{< keyboard "SPACE" >}}. {{< networkfile "examples/visualization/example2/VisualizationExample2.mlab" >}} diff --git a/mevislab.github.io/content/tutorials/visualization/visualizationexample3.md b/mevislab.github.io/content/tutorials/visualization/visualizationexample3.md index d4390e5b8..c06cd3354 100644 --- a/mevislab.github.io/content/tutorials/visualization/visualizationexample3.md +++ b/mevislab.github.io/content/tutorials/visualization/visualizationexample3.md @@ -12,15 +12,15 @@ menu: weight: 565 parent: "visualization" --- -# Example 3: How to blend images over each other {#TutorialVisualizationExample3} +# Example 3: How to Blend Images Over Each Other {#TutorialVisualizationExample3} {{< youtube "e8iFGp-St0c" >}} ## 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 +## 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. @@ -33,14 +33,14 @@ The `Threshold` module is explained {{< docuLinks "/Standard/Documentation/Publi [//]: <> (MVL-653) -The 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). +The module `Threshold` compares the value of each voxel of the image with a customized threshold. In this case: If the value of the chosen voxel is lower than the threshold, the voxel value is replaced by the minimum value of the image. If the value of the chosen voxel is higher than the threshold, the voxel value is replaced by the maximum value of the image. With this, we can construct a binary image that divides the image into bone (white) and no bone (black). Select output of the `Threshold` module to see the binary image in Output Inspector. ![Image Threshold](/images/tutorials/visualization/V3_01.png "Image Threshold") ### 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. +The module `SoView2DOverlay` blends a 2D image over another one in a 2D viewer. In this case, all voxels with a value 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](/images/tutorials/visualization/V3_02.png "SoView2DOverlay") @@ -54,12 +54,12 @@ The `SoView2DOverlay` module is explained {{< docuLinks "/Standard/Documentation ## Exercises 1. Play around with different `Threshold` values and `SoView2DOverlay` colors. -2. Visualize your generated threshold mask in 3D by using the `View3D` module +2. Visualize your generated threshold mask in 3D by using the `View3D` module. ## Summary * The module `Threshold` applies a relative or an absolute threshold to a voxel image. * The module `SoView2DOverlay` blends an 2D image over another one in a 2D viewer. -* You can also use a 3D `SoRenderArea` for the same visualizations. An example can be seen in the next [Example 4](/tutorials/visualization/visualizationexample4 "Display images converted to Open Inventor scene objects") +* You can also use a 3D `SoRenderArea` for the same visualizations. An example can be seen in the next [Example 4](/tutorials/visualization/visualizationexample4 "Display images converted to Open Inventor scene objects"). {{}} The `SoView2DOverlay` module is not intended to work with `OrthoView2D`; in this case, use a `GVROrthoOverlay`. diff --git a/mevislab.github.io/content/tutorials/visualization/visualizationexample4.md b/mevislab.github.io/content/tutorials/visualization/visualizationexample4.md index 36fef54ae..c80e4a391 100644 --- a/mevislab.github.io/content/tutorials/visualization/visualizationexample4.md +++ b/mevislab.github.io/content/tutorials/visualization/visualizationexample4.md @@ -12,29 +12,29 @@ menu: weight: 570 parent: "visualization" --- -# Example 4: Display images converted to Open Inventor scene objects {#TutorialVisualizationExample4} +# 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`, ...). 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. In this example, you will get to know some members of the `SoView2D`-family. +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. In this example, you will get to know some members of the `SoView2D` family. {{}} -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" >}} +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" >}}. {{}} [//]: <> (MVL-653) -## 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`. +## 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](/images/tutorials/visualization/V4_01.png "SoRenderArea") ### Add Extension -You may have noticed, that you are not able to scroll through the slices. This functionality is not yet 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. +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](/images/tutorials/visualization/V4_02.png "View2DExtensions") @@ -43,16 +43,16 @@ With the help of the module `SoRenderArea` you can record screenshots and movies ![Screenshot Gallery](/images/tutorials/visualization/V4_03.png "Screenshot Gallery") -### Create screenshots and movies +### 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](/images/tutorials/visualization/V4_05.png "Record Movies and Snapshots") ## Exercises -1. Create movies of a 3D Scene +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 +* 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" >}} diff --git a/mevislab.github.io/content/tutorials/visualization/visualizationexample5.md b/mevislab.github.io/content/tutorials/visualization/visualizationexample5.md index e6fe3a8a3..55b3f9391 100644 --- a/mevislab.github.io/content/tutorials/visualization/visualizationexample5.md +++ b/mevislab.github.io/content/tutorials/visualization/visualizationexample5.md @@ -12,15 +12,15 @@ menu: weight: 575 parent: "visualization" --- -# Example 5: Volume rendering and interactions {#TutorialVisualizationExample6} +# Example 5: Volume Rendering and Interactions {#TutorialVisualizationExample6} {{< youtube "QViPqXs2LHc" >}} ## 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. +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 +## Steps to Do +### Develop Your Network Implement the following network and open the image *$(DemoDataPath)/BrainMultiModal/ProbandT1.tif*. ![SoGVRVolumeRenderer](/images/tutorials/visualization/V6_01.png "SoGVRVolumeRenderer") @@ -34,24 +34,24 @@ Additional information about Volume Rendering can be found here: {{< docuLinks " [//]: <> (MVL-653) ### Change LUT -We like to add a surface color to the head. In order to do that, we add the module `SoLUTEditor`, which adds an RGBA Look up table (LUT) to the scene. Connecting this module to `SoExaminerViewer` left to the connection between `SoGVRRenderer` and `SoExaminerViewer` (remember the order in which Open Inventor modules are executed) allows you to set the surface color of the head. +We like to add a surface color to the head. In order to do that, we add the module `SoLUTEditor`, which adds an RGBA lookup table (LUT) to the scene. Connecting this module to `SoExaminerViewer` left to the connection between `SoGVRRenderer` and `SoExaminerViewer` (remember the order in which Open Inventor modules are executed) allows you to set the surface color of the head. ![SoLUTEditor](/images/tutorials/visualization/V6_02.png "SoLUTEditor") -To change the color, open the panel of `SoLUTEditor`. In this editor we can change color and transparency interactively (for more information take a look at the {{< docuLinks "/Standard/Documentation/Publish/ModuleReference/SoLUTEditor.html" "help page">}}). Here, we have a range from black to white and from complete transparency to full opacity. +To change the color, open the panel of `SoLUTEditor`. In this editor we can change color and transparency interactively (for more information, see the {{< docuLinks "/Standard/Documentation/Publish/ModuleReference/SoLUTEditor.html" "help page">}}). Here, we have a range from black to white and from complete transparency to full opacity. ![SoLUTEditor change colors](/images/tutorials/visualization/V6_03.png "SoLUTEditor change colors") -We now like to add color. New color-points can be added by clicking on the color bar at the bottom side of the graph and existing points can be moved by dragging. You can change the color of each point under Color. +We now like to add color. New color points can be added by clicking on the color bar at the bottom side of the graph and existing points can be moved by dragging. You can change the color of each point under *Color*. ![SoLUTEditor add colors](/images/tutorials/visualization/V6_04.png "SoLUTEditor add colors") ### Interactions -As a next step, we add some dynamics to the 3D scene: We like to rotate the head. In Order to do this, add the modules `SoRotationXYZ` and `SoElapsedTime` to the workspace and connect the modules as shown. +As a next step, we add some dynamics to the 3D scene: We like to rotate the head. In order to do this, add the modules `SoRotationXYZ` and `SoElapsedTime` to the workspace and connect the modules as shown. ![SoRotationXYZ](/images/tutorials/visualization/V6_05.png "SoRotationXYZ") -Open the panels of both modules and select the axis the image should rotate around. In this case the z-axis was selected. Now, build a parameter connection from the parameter *Time* out of the module `SoElapsedTime` to the parameter *Angle* of the module `SoRotationXYZ`. The angle changes with time and the head starts turning. +Open the panels of both modules and select the axis the image should rotate around. In this case, the z-axis was selected. Now, build a parameter connection from the parameter *Time* out of the module `SoElapsedTime` to the parameter *Angle* of the module `SoRotationXYZ`. The angle changes with time and the head starts turning. ![Time and Angle](/images/tutorials/visualization/V6_06.png "Time and Angle") @@ -62,6 +62,6 @@ Open the panels of both modules and select the axis the image should rotate arou ## Summary * The module `SoGVRVolumeRenderer` renders paged images like DICOM files in a GVR. -* Lookup Tables (LUT) allow you to modify the color of your renderings +* Lookup tables (LUT) allow you to modify the color of your renderings. {{< networkfile "examples/visualization/example5/VisualizationExample5.mlab" >}} diff --git a/mevislab.github.io/content/tutorials/visualization/visualizationexample6.md b/mevislab.github.io/content/tutorials/visualization/visualizationexample6.md index f000fb0d5..ee526ab5c 100644 --- a/mevislab.github.io/content/tutorials/visualization/visualizationexample6.md +++ b/mevislab.github.io/content/tutorials/visualization/visualizationexample6.md @@ -32,13 +32,13 @@ CUDA is a parallel computing platform and programming model created by NVIDIA. F The `SoPathTracer` module implements the main renderer (like the `SoGVRVolumeRenderer`). It collects all `SoPathTracer*` extensions (on its left side) in the scene and renders them. Picking is also supported, but currently only the first hit position. It supports an arbitrary number of objects with different orientation and bounding boxes. ## Path Tracing -Path Tracing allows interactive, photorealistic 3D environments with dynamic light and shadow, reflections and refractions. +Path Tracing allows interactive, photorealistic 3D environments with dynamic light and shadow, reflections, and refractions. Traditional volume rendering is a technique used to visualize 3D volumetric data by rendering 2D images of the data from different viewpoints. It typically uses a transfer function that maps the scalar values of the volume to colors and opacities, which are then used to create a 2D image of the volume. This technique can produce visually pleasing images of volumetric data, but it can struggle with complex lighting and shadow effects, and it may not accurately capture the scattering and absorption of light within the volume. Monte Carlo path tracing is a technique used to simulate the behavior of light in a scene by tracing rays of light as they bounce around the scene and interact with objects. It uses statistical methods to simulate the behavior of light, making it more accurate than traditional volume rendering for simulating the scattering and absorption of light within the volume. However, path tracing can be computationally expensive, as it requires many iterations to produce a high-quality image. -[Ray tracing](https://en.wikipedia.org/wiki/Ray_tracing_(graphics)) is a technique for modeling light transport. It follows all light rays throughout the entire scene. Depending on the scene this takes a lot of time to fully compute the resulting pixels. Other than ray tracing, path tracing only traces the most likely path of the light by using the [Monte Carlo method](https://en.wikipedia.org/wiki/Monte_Carlo_method). Computation is much faster but the results are comparable. +[Ray tracing](https://en.wikipedia.org/wiki/Ray_tracing_(graphics)) is a technique for modelling light transport. It follows all light rays throughout the entire scene. Depending on the scene, this takes a lot of time to fully compute the resulting pixels. In contrast to ray tracing, path tracing only traces the most likely path of the light by using the [Monte Carlo method](https://en.wikipedia.org/wiki/Monte_Carlo_method). Computation is much faster but the results are comparable. {{}} For more information about Path Tracing, see the [NVIDIA website](https://blogs.nvidia.com/blog/2022/03/23/what-is-path-tracing/). @@ -49,7 +49,7 @@ The [SoPathTracer](https://mevislabdownloads.mevis.de/docs/current/MeVisLab/Stan There are various extensions that can be used. ### Volumes -* [SoPathTracerVolume](https://mevislabdownloads.mevis.de/docs/current/MeVisLab/Standard/Documentation/Publish/ModuleReference/SoPathTracerVolume.html#SoPathTracerVolume) loads and renders a volume, multiple volumes with arbitrary world coordinates are supported +* [SoPathTracerVolume](https://mevislabdownloads.mevis.de/docs/current/MeVisLab/Standard/Documentation/Publish/ModuleReference/SoPathTracerVolume.html#SoPathTracerVolume) loads and renders a volume, multiple volumes with arbitrary world coordinates are supported. * Volumes support: * Diffuse/emissive/material LUT * Shading options @@ -57,15 +57,15 @@ There are various extensions that can be used. * Additional transformation matrix * Material selection -* [SoPathTracerMaskVolume](https://mevislabdownloads.mevis.de/docs/current/MeVisLab/Standard/Documentation/Publish/ModuleReference/SoPathTracerMaskVolume.html#SoPathTracerMaskVolume) can be used to mask voxels in [SoPathTracerVolume](https://mevislabdownloads.mevis.de/docs/current/MeVisLab/Standard/Documentation/Publish/ModuleReference/SoPathTracerVolume.html#SoPathTracerVolume) volumes - * Allows to load a 8bit mask volume +* [SoPathTracerMaskVolume](https://mevislabdownloads.mevis.de/docs/current/MeVisLab/Standard/Documentation/Publish/ModuleReference/SoPathTracerMaskVolume.html#SoPathTracerMaskVolume) can be used to mask voxels in [SoPathTracerVolume](https://mevislabdownloads.mevis.de/docs/current/MeVisLab/Standard/Documentation/Publish/ModuleReference/SoPathTracerVolume.html#SoPathTracerVolume) volumes. + * Allows to load a 8-bit mask volume * The mask volume can be used by any volume or instance * It allows to: * Change the alpha and color of inside/outside voxels * Change the tag value (see `SoPathTracerVolume`) * Very useful in combination with `SoVolumeCutting` -* [SoPathTracerTagVolume](https://mevislabdownloads.mevis.de/docs/current/MeVisLab/Standard/Documentation/Publish/ModuleReference/SoPathTracerTagVolume.html#SoPathTracerTagVolume) can be used to tag voxels in [SoPathTracerVolume](https://mevislabdownloads.mevis.de/docs/current/MeVisLab/Standard/Documentation/Publish/ModuleReference/SoPathTracerVolume.html#SoPathTracerVolume) volumes - * Allows to load a 8bit tag volume +* [SoPathTracerTagVolume](https://mevislabdownloads.mevis.de/docs/current/MeVisLab/Standard/Documentation/Publish/ModuleReference/SoPathTracerTagVolume.html#SoPathTracerTagVolume) can be used to tag voxels in [SoPathTracerVolume](https://mevislabdownloads.mevis.de/docs/current/MeVisLab/Standard/Documentation/Publish/ModuleReference/SoPathTracerVolume.html#SoPathTracerVolume) volumes. + * Allows to load a 8-bit tag volume * The tags are used to select a per-object LUT and/or material * A 2D LUT can be provided using `LUTConcat` or `SoLUTEditor2D` * Per-tag materials can be provided by adding multiple materials to the *inMaterial* scene @@ -79,46 +79,46 @@ There are various extensions that can be used. * Change subvolume * Change transformation matrix * Different material selection -* [SoPathTracerSlice](https://mevislabdownloads.mevis.de/docs/current/MeVisLab/Standard/Documentation/Publish/ModuleReference/SoPathTracerSlice.html#SoPathTracerSlice) renders a slice at the given plane, showing the volume data of the given volume +* [SoPathTracerSlice](https://mevislabdownloads.mevis.de/docs/current/MeVisLab/Standard/Documentation/Publish/ModuleReference/SoPathTracerSlice.html#SoPathTracerSlice) renders a slice at the given plane, showing the volume data of the given volume. * Allows to render a cut slice through a volume * Allows to set an arbitrary plane and works on volumes and instances * Has its own LUT and can be opaque or transparent -* [SoPathTracerIsoSurface](https://mevislabdownloads.mevis.de/docs/current/MeVisLab/Standard/Documentation/Publish/ModuleReference/SoPathTracerIsoSurface.html#SoPathTracerIsoSurface) renders an iso surface (with first hit refinement) on the given base volume - * Allows to render an ISO surface of a volume +* [SoPathTracerIsoSurface](https://mevislabdownloads.mevis.de/docs/current/MeVisLab/Standard/Documentation/Publish/ModuleReference/SoPathTracerIsoSurface.html#SoPathTracerIsoSurface) renders an iso surface (with first hit refinement) on the given base volume. + * Allows to render an isosurface of a volume * Works on volumes and instances * Supports opaque and transparent surfaces - * ISO surface is rendered on-the-fly + * Isosurface is rendered on-the-fly * Hit refinement is used to provide high-quality surfaces * Arbitrary material can be specified ### Geometry -* [SoPathTracerMesh](https://mevislabdownloads.mevis.de/docs/current/MeVisLab/Standard/Documentation/Publish/ModuleReference/SoPathTracerMesh.html#SoPathTracerMesh) scans the input scene for triangle meshes and ray traces them +* [SoPathTracerMesh](https://mevislabdownloads.mevis.de/docs/current/MeVisLab/Standard/Documentation/Publish/ModuleReference/SoPathTracerMesh.html#SoPathTracerMesh) scans the input scene for triangle meshes and ray traces them. * Allows to render arbitrary triangle meshes * Scans the input scene for triangle meshes and converts them to a bounding volume hierarchy (BVH) * Supports different materials by adding `SoPathTracerMaterials` * Objects can be turned on/off via material nodes (without BVH rebuilding) * Supports opaque and transparent meshes -* [SoPathTracerLines](https://mevislabdownloads.mevis.de/docs/current/MeVisLab/Standard/Documentation/Publish/ModuleReference/SoPathTracerLines.html#SoPathTracerLines) scans the input scene for line sets and ray traces them as cylinders with round caps +* [SoPathTracerLines](https://mevislabdownloads.mevis.de/docs/current/MeVisLab/Standard/Documentation/Publish/ModuleReference/SoPathTracerLines.html#SoPathTracerLines) scans the input scene for line sets and ray traces them as cylinders with round caps. * Allows to render thick lines (capsules) * Scans the input scene for `SoLineSet`/`SoIndexedLineSet` and converts them to a BVH * Different materials are supported by adding `SoPathTracerMaterial` nodes * Supports opaque and transparent lines * Useful to render fibers or stream lines -* [SoPathTracerSpheres](https://mevislabdownloads.mevis.de/docs/current/MeVisLab/Standard/Documentation/Publish/ModuleReference/SoPathTracerSpheres.html#SoPathTracerSpheres) renders a marker list as ray traced spheres +* [SoPathTracerSpheres](https://mevislabdownloads.mevis.de/docs/current/MeVisLab/Standard/Documentation/Publish/ModuleReference/SoPathTracerSpheres.html#SoPathTracerSpheres) renders a marker list as ray traced spheres. * Allows to render markers as spheres * Converts marker list to spheres and creates a BVH * Currently only supports single material ### Lights -* [SoPathTracerAreaLight](https://mevislabdownloads.mevis.de/docs/current/MeVisLab/Standard/Documentation/Publish/ModuleReference/SoPathTracerAreaLight.html#SoPathTracerAreaLight) provides a realistic area light with attenuation, area and distance +* [SoPathTracerAreaLight](https://mevislabdownloads.mevis.de/docs/current/MeVisLab/Standard/Documentation/Publish/ModuleReference/SoPathTracerAreaLight.html#SoPathTracerAreaLight) provides a realistic area light with attenuation, area, and distance. * Provides an area light * Multiple area lights are supported * Lights can be placed: * Around the scene bounding box using polar coordinates * At absolute camera or world position (as head or local light) * Light intensity is automatically adapted to the scene size - * Otherwise it would be hard to select an intensity that works on different scales -* [SoPathTracerBackgroundLight](https://mevislabdownloads.mevis.de/docs/current/MeVisLab/Standard/Documentation/Publish/ModuleReference/SoPathTracerBackgroundLight.html#SoPathTracerBackgroundLight) provides a background light, using image based lighting from a sphere or cube map + * Otherwise, it would be hard to select an intensity that works on different scales +* [SoPathTracerBackgroundLight](https://mevislabdownloads.mevis.de/docs/current/MeVisLab/Standard/Documentation/Publish/ModuleReference/SoPathTracerBackgroundLight.html#SoPathTracerBackgroundLight) provides a background light, using image based lighting from a sphere or cube map. * Provides environmental lighting * It supports: * Specifying environment light colors diff --git a/mevislab.github.io/content/tutorials/visualization/visualizationexample8.md b/mevislab.github.io/content/tutorials/visualization/visualizationexample8.md index b76fbceb4..1ea4f1a96 100644 --- a/mevislab.github.io/content/tutorials/visualization/visualizationexample8.md +++ b/mevislab.github.io/content/tutorials/visualization/visualizationexample8.md @@ -19,8 +19,8 @@ menu: ## 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 +## Steps to Do +### Develop Your Network Load the example [tree mask](/examples/visualization/example8/EditedImage.mlimage) by using the `LocalImage` module. Connect the output to a `DtfSkeletonization` module as seen below. The initial output of the `DtfSkeletonization` module is empty. Press the *Update* button to calculate the skeleton and the erosion distances. @@ -30,7 +30,7 @@ Below you can see the output of the original image taken from the `LocalImage` m ![Output comparison](/images/tutorials/visualization/V8_1b.png "Output comparison") -The output *DtfSkeletonization.outBase1* shows nothing. Here you can find the 3-dimensional graph of the vascular structures. To generate it, open the panel of the `DtfSkeletonization` module, set *Update Mode* to *Auto Update* and select *Update skeleton graph*. Now the output additionally provides a 3D graph. Additionally, enable the *Compile Graph Voxels* to provide all object voxels at the output. +The output *DtfSkeletonization.outBase1* shows nothing. Here you can find the three-dimensional graph of the vascular structures. To generate it, open the panel of the `DtfSkeletonization` module, set *Update Mode* to *Auto Update*, and select *Update skeleton graph*. Now the output additionally provides a 3D graph. Additionally, enable the *Compile Graph Voxels* to provide all object voxels at the output. ![DtfSkeletonization](/images/tutorials/visualization/V8_02.png "DtfSkeletonization") @@ -38,7 +38,7 @@ You can use the *Output Inspector* to see the 3D graph. ![Graph output of DtfSkeletonization](/images/tutorials/visualization/V8_MLImage.png "Graph output of DtfSkeletonization") -If you want to visualize your graph, you should connect a `GraphToVolume` module to the `DtfSkeletonization` module. The result is a 2D or 3D volume of your graph which you can connect to any 2D or 3D viewer. Add a `View2D` and a `View3D` module to the `GraphToVolume` module and update the volume. +If you want to visualize your graph, you should connect a `GraphToVolume` module to the `DtfSkeletonization` module. The result is a 2D or 3D volume of your graph that you can connect to any 2D or 3D viewer. Add a `View2D` and a `View3D` module to the `GraphToVolume` module and update the volume. ![GraphToVolume](/images/tutorials/visualization/V8_03.png "GraphToVolume") @@ -48,7 +48,7 @@ Use the `SoLUTEditor` for the `View2D`, too. ![Network](/images/tutorials/visualization/V8_04.png "Network") - Open the output of the `GraphToVolume` module and inspect the images in Output Inspector. You will see that the HU value of the black background is defined as *-1*, the vessel tree is defined as *0*. + Open the output of the `GraphToVolume` module and inspect the images in Output Inspector. You will see that the HU value of the black background is defined as *-1* while the vessel tree is defined as *0*. ![Output Inspector](/images/tutorials/visualization/V8_04_OutputInspector.png "Output Inspector") @@ -114,7 +114,7 @@ ctx.field("GraphToVolume.update").touch() ``` {{}} -In case the graph is valid, we now define a static text for the label. Instead of printing the edge ID, we also walk through each skeleton of the edge and define the property for the label using the ID of the edge as value. +In the case the graph is valid, we now define a static text for the label. Instead of printing the edge ID, we also walk through each skeleton of the edge and define the property for the label using the ID of the edge as value. Your viewers now show a different color for each skeleton, based on our LUT. @@ -147,7 +147,7 @@ To establish connections between fields with the type *Float*, you can use the * Camera interactions are now synchronized between both `SoExaminerViewer` modules. -Now you can notice the difference between the two modules. We use `SoVascularSystem` for a smoother visualization of the vascular structures by using the graph as reference. The `SoGVRVolumeRenderer` renders the volume from the `GraphToVolume` module, including the visible stairs from pixel representations in the volume. +Now you can notice the difference between the two modules. We use `SoVascularSystem` for a smoother visualization of the vascular structures by using the graph as reference. The `SoGVRVolumeRenderer` renders the volume from the `GraphToVolume` module, including the visible stairs from voxel representations in the volume. ![ SoVascularSystem & SoGVRVolumeRenderer](/images/tutorials/visualization/V8_Difference1.png " SoVascularSystem & SoGVRVolumeRenderer") @@ -201,9 +201,9 @@ Instead of using the ID of each edge for the label property, we are now using th ![Radius based Visualization](/images/tutorials/visualization/V8_010new.png "Radius based Visualization") {{}} -If you have a NIFTI file, convert it into an ML image. Load your tree mask NIfTI file using the `itkImageFileReader` module. Connect the output to a `BoundingBox` module, which removes black pixels and creates a volume without unmasked parts. In the end, add a `MLImageFormatSave` module to save it as *\*.mlimage* file. They are much smaller than a NIFTI file. +If you have a NIfTI file, convert it into an ML image. Load your tree mask NIfTI file using the `itkImageFileReader` module. Connect the output to a `BoundingBox` module, which removes black pixels and creates a volume without unmasked parts. In the end, add a `MLImageFormatSave` module to save it as *.mlimage* file. They are much smaller than a NIfTI file. -![NIFTI file conversion](/images/tutorials/visualization/V8_ConvertToMlImage.png "NIFTI file conversion") +![NIfTI file conversion](/images/tutorials/visualization/V8_ConvertToMlImage.png "NIfTI file conversion") {{}} ### Mouse Clicks on Vessel Graph @@ -212,9 +212,9 @@ Open the *Interaction* tab of the `SoVascularSystem` module. In `SoExaminerViewe ![Getting the click point in a vascular tree](/images/tutorials/visualization/V8_Interactions.png "Getting the click point in a vascular tree") ## Summary -* Vessel centerlines can be created using a `DtfSkeletonization` module -* Vascular structures can be visualized using a `SoVascularSystem` module, which provides several vessel specific display modes -* The `SoVascularSystem` module provides information about mouse clicks into a vascular tree -* The labels of a skeleton can be used to store additional information for visualization +* Vessel centerlines can be created using a `DtfSkeletonization` module. +* Vascular structures can be visualized using a `SoVascularSystem` module, which provides several vessel-specific display modes. +* The `SoVascularSystem` module provides information about mouse clicks into a vascular tree. +* The labels of a skeleton can be used to store additional information for visualization. {{< networkfile "examples/visualization/example8/VisualizationExample8.mlab" >}} diff --git a/mevislab.github.io/content/tutorials/visualization/visualizationexample9.md b/mevislab.github.io/content/tutorials/visualization/visualizationexample9.md index d908573e7..ae5996d8c 100644 --- a/mevislab.github.io/content/tutorials/visualization/visualizationexample9.md +++ b/mevislab.github.io/content/tutorials/visualization/visualizationexample9.md @@ -17,7 +17,7 @@ menu: {{< youtube "Sxfwwm6BGnA" >}} ## 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`. +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 @@ -33,7 +33,7 @@ Define the following LUTs in `SoLUTEditor` of the knee or load this [XML file](/ ![ SoLUTEditor](/images/tutorials/visualization//pathtracer/V9_LUT.png " SoLUTEditor") -Open the `AnimationRecorder` module and click on *New* to initiate a new animation, selecting a filename for the recorded key frames (*\*.mlmov*). +Open the `AnimationRecorder` module and click on *New* to initiate a new animation, selecting a filename for the recorded key frames (*.mlmov*). At the bottom of the `AnimationRecorder` panel, you'll find the key frame editor, which is initially enabled. It contains the camera track with a key frame at position *0*. The key frame editor at the bottom serves as a control hub for playback and recording. @@ -43,27 +43,27 @@ Close the SoExaminerViewer while using the AnimationRecorder to prevent duplicat ![AnimationRecorder](/images/tutorials/visualization//pathtracer/V9_AnimationRecorder.png " AnimationRecorder") -Key Frames in the `AnimationRecorder` mark specific field values at defined timepoints. You can add key frames on the timeline by double-clicking at the chosen timepoint or right-clicking and selecting *Insert Key Frame*. Between these key frames, values of the field are interpolated (linear or spline), or not. Selecting a key frame, a dialog *Edit Camera Key Frame* will open. +Key frames in the `AnimationRecorder` mark specific field values at defined timepoints. You can add key frames on the timeline by double-clicking at the chosen timepoint or right-clicking and selecting *Insert Key Frame*. Between these key frames, values of the field are interpolated (linear or spline) or not. Selecting a key frame, a dialog *Edit Camera Key Frame* will open. When adding a key frame at a specific timepoint, you can change the camera dynamically in the viewer. This involves actions such as rotating to left or right, zooming in and out, and changing the camera's location. Within the *Edit Camera Key Frame* dialog save each key frame by clicking on the *Store Current Camera State* button. Preview the video to observe the camera's movement. The video settings in the `AnimationRecorder` provide essential parameters for configuring the resulting animation. You can control the *Framerate*, determining the number of frames per second in the video stream. It's important to note that altering the framerate may lead to the removal of key frames, impacting the animation's smoothness. -Additionally, the *Duration* of the animation, specified as videoLength, defines how long the animation lasts in seconds. The *Video Size* determines the resolution of the resulting video. +Additionally, the *Duration* of the animation, specified as *videoLength*, defines how long the animation lasts in seconds. The *Video Size* determines the resolution of the resulting video. Repeat this process for each timepoint where adjustments to the camera position are needed, thus creating a sequence of key frames. Before proceeding further, use the playback options situated at the base of the key frame editor. This allows for a quick preview of the initial camera sequence, ensuring the adjustments align seamlessly for a polished transition between key frames. {{}} -Decrease the number of iterations in the SoPathTracer module for a quicker preview if you like. Make sure to increase again, before recording the final video. +Decrease the number of iterations in the SoPathTracer module for a quicker preview if you like. Make sure to increase again before recording the final video. {{}} ![ AnimationRecorder](/images/tutorials/visualization//pathtracer/V9_AnimationRecorder1.png " AnimationRecorder") ## Modulating Knee Visibility with LUTRescale in Animation -We want to show and hide the single segmentations during camera movements. Add two `LUTRescale` modules to your workspace and connect them as illustrated down below. The rationale behind using `LUTRescale` is to control the transparency or visibility of elements in the scene at different timepoints. +We want to show and hide the single segmentations during camera movements. Add two `LUTRescale` modules to your workspace and connect them as illustrated down below. The rationale behind using `LUTRescale` is to control the transparency and by that the visibility of elements in the scene at different timepoints. ![ LUTRescale](/images/tutorials/visualization//pathtracer/V9_3.png " LUTRescale") @@ -79,7 +79,7 @@ To initiate the animation sequence, start by adding a key frame at position *0* Next, proceed to add key frames at the same timepoints as the desired key frames of the *Perspective Camera* field's first sequence. For each selected key frame, progressively set values for the *Target Max* field, gradually increasing to *10*. This ensures specific synchronization between the visibility adjustments controlled by the `LUTRescale` module and the camera movements in the animation, creating a seamless transition. This gradual shift visually reveals the bones and vessels while concealing the knee structures and muscles. -To seamlessly incorporate the new key frame at the same timepoints as the *Perspective Camera* field, you have two efficient options. Simply click on the key frame of the first sequence, and the line will automatically appear in the middle of the key frame. A quick double-click will effortlessly insert a key frame at precisely the same position. If you prefer more accurate adjustments, you can also set your frame manually using the *Edit Key Frame - [LUTRescale.targetMax]* window. This flexibility allows for precise control over the animation timeline, ensuring key frames align precisely with your intended moments. +To seamlessly incorporate the new key frame at the same timepoints as the *Perspective Camera* field, you have two efficient options. Simply click on the key frame of the first sequence, and the line will automatically appear in the middle of the key frame. A double-click will effortlessly insert a key frame at precisely the same position. If you prefer more accurate adjustments, you can also set your frame manually using the *Edit Key Frame - [LUTRescale.targetMax]* window. This flexibility allows for precise control over the animation timeline, ensuring key frames align precisely with your intended moments. ![ LUTRescale & AnimationRecorder](/images/tutorials/visualization//pathtracer/V9_7.png " LUTRescale & AnimationRecorder")