You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: mevislab.github.io/content/tutorials/image_processing/cpp_1.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ Make sure to have [cmake](https://cmake.org/download) installed. This example ha
22
22
In this example, we develop our own C++ ML module, which adds a constant value to each voxel of the given input image.
23
23
24
24
## Steps to Do
25
-
### Create a new ML Module
25
+
### Create a New ML Module
26
26
Before creating the module, make sure to have your own user package available. See [Package creation](tutorials/basicmechanisms/macromodules/package/) for details about Packages.
27
27
28
28
Use the *Project Wizard* via the menu entry {{< menuitem "File" "Run Project Wizard ..." >}} to create a new ML module. Select *ML Module* and click *Run Wizard*.
@@ -60,7 +60,7 @@ The Project Wizard creates a *CMakeLists.txt* file that describes the typical pr
60
60
61
61
Just make sure that the MLAB_ROOT environment variable is set on your system and points to the packages directory of your MeVisLab installation, because this is used to resolve the reference to the 'MeVisLab' project.
62
62
63
-
Open a commandline and change to your current module directory (the directory containing your *CMakeLists.txt* file). Enter **cmake . -G "Visual Studio 17"**. After execution, a lot of files are generated by CMake.
63
+
Open a command line and change to your current module directory (the directory containing your *CMakeLists.txt* file). Enter **cmake . -G "Visual Studio 17"**. After execution, a lot of files are generated by CMake.
64
64
65
65
For further documentation about our use of CMake, see: [CMake for MeVisLab - Documentation](https://mevislabdownloads.mevis.de/docs/current/MeVisLab/Resources/Documentation/Publish/SDK/CMakeManual/#mainBook).
66
66
@@ -124,7 +124,7 @@ Next, we are going to finally change the voxel values of the image. Open the fil
124
124
```
125
125
{{</highlight>}}
126
126
127
-
Then, change the inner line of the loop, so that the constant value is added to the value of the input voxel:
127
+
Then, change the inner line of the loop so that the constant value is added to the value of the input voxel:
@@ -141,9 +141,9 @@ Compile the project in the development environment. Make sure to select a *Relea
141
141
### Use Your Module in MeVisLab
142
142
Your compiled **.dll* is available in your project directory under *Sources/lib*. In order to use it in MeVisLab, it needs to be copied to the *lib* folder of your user package.
143
143
144
-
You can either do this manually or via PostBuild step.
144
+
This only works in a post-build step.
145
145
146
-
In the case MeVisLab was running during development, restart MeVisLab and use your new module.
146
+
If the environment variable *MLAB_AUTOMATIC_POSTBUILD_COPY* is set, the newly compiled DLLs and .lib files are copied to the correct location when MeVisLab restarts. Otherwise, they must be copied manually.
147
147
148
148
For testing purposes, you can use a `LocalImage` module and two `View2D` modules. Connect the `SimpleAdd` module to the second `View2D` and change the <field>Constant Value</field> field.
Make sure to use a compiler that is compatible to your currently installed MeVisLab version.
21
+
Make sure to use a compiler that is compatible with your currently installed MeVisLab version.
22
22
{{</alert>}}
23
23
24
24
### ML Modules on the C++ Level
@@ -27,9 +27,9 @@ Make sure to use a compiler that is compatible to your currently installed MeVis
27
27
* Inputs and outputs for abstract data structures are connectors to pointers of objects derived from class Base and are called Base objects.
28
28
29
29
### Open Inventor Modules on the C++ Level
30
-
* Most Open Inventor modules are objects derived from class SoNode defined in the Open Inventor library.
31
-
* Open Inventor inputs and outputs are connectors to objects derived from class SoNode defined in the Open Inventor library. Many Open Inventor modules will return themselves as outputs (“self”). On inputs, they may have connectors to child Open Inventor modules.
32
-
* Some Open Inventor modules are objects derived from class SoEngine. They are used for calculations and return their output not via output connectors but via fields.
30
+
* Most Open Inventor modules are objects derived from class SoNode, defined in the Open Inventor library.
31
+
* Open Inventor inputs and outputs are connectors to objects derived from class SoNode, defined in the Open Inventor library. Many Open Inventor modules will return themselves as outputs (“self”). On inputs, they may have connectors to child Open Inventor modules.
32
+
* Some Open Inventor modules are objects derived from class SoEngine. They are used for calculations and return their output not via output connectors but via parameter fields.
33
33
* Open Inventor modules may also have input and output connectors to Base objects and Image objects.
34
34
* All standard Open Inventor nodes defined in the Open Inventor library are available in MeVisLab as Open Inventor modules.
0 commit comments