Skip to content

Commit 3272c84

Browse files
authored
Changes after review (#133)
* Windows Explorer mentioned * Professional and Standard SDK mentioned * SBOM file missing * ASSERT is always used, no explanation for EXPECT was given.
1 parent 55f0353 commit 3272c84

File tree

7 files changed

+47
-13
lines changed

7 files changed

+47
-13
lines changed

mevislab.github.io/content/tutorials/dataobjects/curves.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,3 @@ menu:
1919
Curves can be used in MeVisLab to print the results of a function as two-dimensional mathematical curves into a diagram.
2020

2121
![Curves in MeVisLab](images/tutorials/dataobjects/curves/Curves.png "Curves in MeVisLab")
22-
23-
In the given example, only modules available in commercial **MeVisLab Professional SDK** have been used. The non-commercial **MeVisLab Standard SDK** provides more modules for curves.

mevislab.github.io/content/tutorials/dataobjects/surfaces/surfaceexample3.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,32 @@ menu:
1818
{{< youtube "YDOEqCOmUFw">}}
1919

2020
## Introduction
21-
In these examples, we are showing two different possibilities to interact with a WEM:
22-
* Scale, rotate, and move a WEM in a scene
21+
In these examples, we are showing two different possibilities to interact with the visualization of the WEM:
22+
* Scale, rotate, and move a WEM's visualization in a scene
2323
* Modify a WEM in a scene
2424

2525
### Scale, Rotate, and Move a WEM in a Scene
26-
We are using a `SoTransformerDragger` module to apply transformations on a 3D WEM object via mouse interactions.
26+
We are using a `SoTransformerDragger` module to apply transformations to the visualization of a 3D WEM object via mouse interactions.
2727

2828
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*.
2929

3030
![Initial Network](images/tutorials/dataobjects/surfaces/WEMExample3_1.png "Initial Network")
3131

32-
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.
32+
The `SoExaminerViewer` shows your cube and the world coordinate system. You can interact with the camera (rotate, zoom, and pan), the visualization of the cube itself does not change. It remains in the center of the coordinate system.
3333

3434
![Initial Cube](images/tutorials/dataobjects/surfaces/WEMExample3_2.png "Initial Cube")
3535

36-
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 except the `SoCoordinateSystem` to a `SoSeparator`, so that transformations are not applied to the coordinate system.
36+
Scaling, rotating, and translating the visualization of the cube can be done by using the module `SoTransformerDragger`.
37+
38+
Additionally, add a `SoTransform` module to your network. Add all modules except the `SoCoordinateSystem` to a `SoSeparator`, so that transformations are not applied to the coordinate system.
3739

3840
![SoTransformerDragger and SoTransform](images/tutorials/dataobjects/surfaces/WEMExample3_3.png "SoTransformerDragger and SoTransform")
3941

4042
Draw parameter connections from *Translation*, *Scale Factor*, and *Rotation* of the `SoTransformerDragger` to the same fields of the `SoTransform` module.
4143

42-
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.
44+
Opening your SoExaminerViewer now allows you to use handles of the `SoTransformerDragger` to scale, rotate, and move the visualization of the cube. The cube itself remains unchanged in memory, a matrix for translation is applied to the original 3D object's visualization.
45+
46+
You can additionally interact with the camera as already done before.
4347

4448
{{<alert class="info" caption="Info">}}
4549
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 adjusting the camera.
@@ -52,6 +56,8 @@ You can also try the other `So*Dragger` modules in MeVisLab for variations of th
5256
{{< networkfile "examples/data_objects/surface_objects/example3/SurfaceExample3.mlab" >}}
5357

5458
### Interactively Modify WEMs
59+
The big difference to the previously described scenario, where we modified the visualization of the WEM, is that this example modifies the WEM itself.
60+
5561
We are using the `WEMBulgeEditor` module to interactively modify the WEM via mouse interactions.
5662

5763
Add the modules `WEMInitialize`, `SoWEMRenderer`, and `SoBackground` to your workspace and connect them to a `SoExaminerViewer` as seen below. Select model *Icosahedron* for the `WEMInitialize` module.

mevislab.github.io/content/tutorials/summary/summary2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Select your *.mlab* file from [Step 1](tutorials/summary/summary1/) and check *A
4545

4646
![Macro module wizard](images/tutorials/summary/Example2_4.png "Macro module wizard")
4747

48-
You do not have to define fields of your macro module now, we will do that later. Click *Create*. The Windows Explorer opens showing the directory of your macro module. It should be the same directory you selected for your Package.
48+
You do not have to define fields of your macro module now, we will do that later. Click *Create*. The file explorer opens showing the directory of your macro module. It should be the same directory you selected for your Package.
4949

5050
### Directory Structure of a Macro Module
5151
The directory structure for a macro module is as follows:

mevislab.github.io/content/tutorials/summary/summary4.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ MATE automatically opens the Python file of your test case and it appears in MeV
6464

6565
### Write Test Functions in Python
6666

67+
{{<alert class="info" caption="Info">}}
68+
In this example, we are using the **ASSERT*** functionalities, becase they throw an exception in case the expected value does not match the actual value. Your test execution stops in this case.
69+
70+
You can also use **EXPECT*** functions. They return *true* or *false* and you can decide yourself ho your test continues.
71+
72+
For details, see {{< docuLinks "/Resources/Documentation/Publish/SDK/TestCenterReference/namespaceTestSupport_1_1Macros.html" "TestCenter Reference" >}}
73+
{{</alert>}}
74+
6775
#### Preparations
6876
Before writing a test case, we need some helper functions in Python, which we will use in our test cases. The first thing we need is a function to load images.
6977

mevislab.github.io/content/tutorials/summary/summary5.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ The directory contains the following files (and some more maybe):
7777
* Installer (*.exe*) file
7878
* MeVisLab Install (*.mlinstall*) file
7979
* Shell (*.sh*) script
80-
* Third-party list (*.csv*)
80+
* Software Bill of Materials [SBOM] (*_sbom.json*)
8181

8282
#### Batch File
8383
The batch file allows you to generate the executable again via a Windows batch file. You do not need the Project Wizard anymore now.
@@ -93,8 +93,8 @@ The file is initially generated by the Project Wizard. Having a valid file alrea
9393
#### Shell Skript
9494
The shell skript allows you to generate the executable again via a Unix shell like bash. You do not need the Project Wizard anymore now.
9595

96-
#### Third-party File
97-
The third-party file contains all third-party software tools MeVisLab integrated into your installer from dependency analysis. The file contains the tool name, version, license, and general information about the tool.
96+
#### Software Bill of Materials [SBOM]
97+
The SBOM file includes a list of all third-party components, libraries, and dependencies included into your installer by MeVisLab. We use the standard format *CycloneDX* that allows to import this file to standard evaluation tools like [Dependency-Track](https://dependencytrack.org).
9898

9999
### Install Your Executable
100100
You can now execute the installer of your application.

mevislab.github.io/content/tutorials/testing/testingexample1.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,20 @@ menu:
2020
## Introduction
2121
In this example you will learn how to write an automated test for a simple network using the `DicomImport`, `MinMaxScan`, and `View3D` modules. Afterward, you will be able to write test cases for any other module and network yourself.
2222

23+
MeVisLab provides two options to compare a test result with an expected result:
24+
#### ASSERT
25+
Multiple **ASSERT_*** functions to compare expected and actual result are available, for example **ASSERT_EQ()** (check if two values are equal) or **ASSERT_GT()** (check if value is greater than another value).
26+
27+
In case an assertion fails, an exception is thrown and the test execution stops.
28+
#### EXPECT
29+
The same comparisons can be done by using **EXPECT_***. The functions return *true* or *false* and depending on the result you can decide how to proceed.
30+
31+
Make sure to use the right comparison methods depending on your needs.
32+
33+
{{<alert class="info" caption="Info">}}
34+
Additional information can be found in {{< docuLinks "/Resources/Documentation/Publish/SDK/TestCenterReference/namespaceTestSupport_1_1Macros.html" "TestCenter Reference" >}}
35+
{{</alert>}}
36+
2337
## Steps to Do
2438

2539
### Creating the Network to be Used for Testing
@@ -87,6 +101,8 @@ When *ready* is true, the test touches the *selectNextItem* trigger, so that the
87101

88102
The value of our `DicomImport`s *progress* field is saved as the *currentValue* variable and compared to the *expectedValue* variable by calling *ASSERT_FLOAT_EQ(expectedValue,currentValue)* to determine if the DICOM import has finished (*currentValue* and *expectedValue* are equal) or not.
89103

104+
You can play around with the differences between **ASSERT_FLOAT_EQ()** and **EXPECT_FLOAT_EQ()** and le your test fail to see the differences.
105+
90106
### Run Your Test Case
91107
Open the TestCase Manager und run your test by selecting your test case and clicking on the *Play* button in the bottom right corner.
92108

@@ -126,5 +142,7 @@ Create a global macro module and implement the following test objectives for bot
126142
* MeVisLab provides a TestCenter for writing automated tests in Python.
127143
* Tests can be executed on networks and macro modules.
128144
* The test results are shown in a ReportViewer.
145+
* **ASSERT*** functions throw an exception if the expected result differs from the actual result. The test run is aborted in such a case.
146+
* **EXPECT*** functions return *true* or *false*. You can decide yoursel how to continue your test.
129147

130148
{{< networkfile "examples/testing/example1/TestCases.zip" >}}

mevislab.github.io/content/tutorials/testing/testingexample3.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,11 @@ def testPatient(path, windowCenter):
8585
4. The final test functions *ASSERT_EQ* evaluate if the given values are equal.
8686

8787
{{<alert class="info" caption="Info">}}
88-
You can use many other *ASSERT** possibilities, just try using the MATE autocompletion and play around with them.
88+
You can use many other **ASSERT*** possibilities, just try using the MATE autocompletion and play around with them. **ASSERT*** functions throw an exception in case expected and actul values do not fit. Your test execution stops in this case.
89+
90+
You can also use **EXPECT*** functions. They return *true* or *false* and you can decide yourself ho your test continues.
91+
92+
For details, see {{< docuLinks "/Resources/Documentation/Publish/SDK/TestCenterReference/namespaceTestSupport_1_1Macros.html" "TestCenter Reference" >}}
8993
{{</alert>}}
9094

9195
### Run Your Iterative Test

0 commit comments

Comments
 (0)