Skip to content

Commit b9fa2a3

Browse files
committed
MLAB-6184: fixes after review
1 parent 4b56dc4 commit b9fa2a3

File tree

6 files changed

+33
-27
lines changed

6 files changed

+33
-27
lines changed

mevislab.github.io/content/tutorials/dataobjects/contours/contourexample6.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ We now want to customize the details to be shown for each distance line. Open th
4646
Enter the following to the panel of the `CSOLabelRenderer` module:
4747
{{< highlight filename="CSOLabelRenderer" >}}
4848
```Python
49-
labelString = f'Length: {cso.getLength()} mm'
50-
labelName = f'ID: {cso.getId()}'
49+
labelString = f"Length: {cso.getLength()} mm"
50+
labelName = f"ID: {cso.getId()}"
5151
deviceOffsetX = 0
5252
deviceOffsetY = 0
5353
```
@@ -60,15 +60,15 @@ We are setting the *labelName* to a static text showing the type of the CSO and
6060
You can also round the length by using:
6161
{{< highlight filename="CSOLabelRenderer" >}}
6262
```Python
63-
labelString = f'Length: {cso.getLength():.2f} mm'
63+
labelString = f"Length: {cso.getLength():.2f} mm"
6464
```
6565
{{</highlight>}}
6666

6767
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.
6868

6969
![CSOInfo](images/tutorials/dataobjects/contours/Ex6_CSOInfo.png "CSOInfo")
7070

71-
For labels shown on gray value 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.
71+
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.
7272

7373
{{< imagegallery 2 "images/tutorials/dataobjects/contours/" "Ex6_NoShadow" "Ex6_Shadow" >}}
7474

@@ -84,13 +84,13 @@ We currently defined the *labelName* and *labelString* for the distance line. If
8484

8585
{{< highlight filename="CSOLabelRenderer" >}}
8686
```Python
87-
if cso.getSubType() == 'distanceLine':
88-
labelString = f'{userData0} {cso.getLength():.2f} mm'
87+
if cso.getSubType() == "distanceLine":
88+
labelString = f"{userData0} {cso.getLength():.2f} mm"
8989
labelName = userData1
9090
labelName += str(cso.getId())
91-
elif cso.getSubType() == 'rectangle':
92-
labelString = f'{userData0} {cso.getLength():.2f} mm\n'
93-
labelString += f'{userData2} {cso.getArea():.2f} mm^2'
91+
elif cso.getSubType() == "rectangle":
92+
labelString = f"{userData0} {cso.getLength():.2f} mm\n"
93+
labelString += f"{userData2} {cso.getArea():.2f} mm^2"
9494
labelName = userData3
9595
labelName += str(cso.getId())
9696
deviceOffsetX = 0

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ Next, open the tab *Input* and draw parameter connections from the results of th
5454

5555
![Define annotation parameters](images/tutorials/dataobjects/surfaces/DO7_07.png "Define annotation parameters")
5656

57-
You can design the annotation overlay as you like in the tab *User*. We decided to only display the minimal (the minimum minimum) and maximal (the maximum minimum) distance between both WEMs.
57+
You can design the annotation overlay as you like in the tab *User*. We decided to only display the minimal and maximal distance between both WEMs.
58+
59+
{{<alert class="info" caption="Extra Infos">}}
60+
The `WEMSurfaceDistance` module measures minimal distances only; when talking about the maximal distance, we mean the maximal minimal distance: this is the maximum of all minimum distances.
61+
{{</alert>}}
5862

5963
![Annotation design](images/tutorials/dataobjects/surfaces/DO7_04.png "Annotation design")
6064

mevislab.github.io/content/tutorials/openinventor/posteffectsinopeninventor.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ menu:
1818
## Introduction
1919
Up to this point, we practiced constructing Open Inventor scenes and placed three-dimensional Open Inventor objects of different colors and shapes within them.
2020

21-
In this tutorial, we will go over the steps to add shadows to our 3D objects, make them glow, and vary their opacity to make them transparent. We will also incorporate WEMs from multiframe DICOMs and render them as scene objects to see how different post effects can be used on them.
21+
In this tutorial, we will go over the steps to add shadows to our 3D objects, make them glow, and vary their opacity to make them transparent. We will also incorporate WEMs from multi-frame DICOMs and render them as scene objects to see how different post effects can be used on them.
2222

2323
## Steps to Follow
2424

@@ -30,7 +30,7 @@ To incorporate DICOMs into your Open Inventor Scene, they have to be rendered as
3030
We don't recommend using single-frame DICOMs for this example as a certain depth is required to interact with the scene objects as intended. Also make sure that the pixel data of the DICOM file you choose contains all slices of the study, as it might be difficult to arrange scene objects of individual slices to resemble the originally captured study.
3131
{{</alert>}}
3232

33-
![From DICOM to SO](images/tutorials/openinventor/multiframetoso.PNG "How to create a scene object out of a multiframe DICOM")
33+
![From DICOM to SO](images/tutorials/openinventor/multiframetoso.PNG "How to create a scene object out of a multi-frame DICOM")
3434

3535
{{<alert class="info" caption="Info">}}
3636
Consider adding a `View2D` and an `Info` module to your `LocalImage` module's output connector to be able to compare the rendered object with the original image and adapt the isovalues to minimize noise.
@@ -79,7 +79,7 @@ To put a soft glow on the geometrical scene objects, the module `SoPostEffectGlo
7979
![Glow](images/tutorials/openinventor/WorkspaceWithGlow.PNG "Applied SoPostEffectGlow")
8080

8181
## Summary
82-
* Multiframe DICOM images can be rendered to be scene objects by converting them into WEMs first.
82+
* Multi-frame DICOM images can be rendered to be scene objects by converting them into WEMs first.
8383
* Open Inventor scenes can be augmented by adding PostEffects to scene objects.
8484

8585
{{< networkfile "examples/open_inventor/PostEffectTutorial.mlab" >}}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,9 @@ The following shall be accessible as *Field* for our macro module:
170170
* Filename to be opened
171171
* Color of the 2D overlay and 3D segmentation
172172
* Transparency of the 3D image
173-
* Threshold to be used for RegionGrowing
173+
* Threshold to be used for `RegionGrowing`
174174
* Isovalue of the 3D surface to use for rendering
175-
* Position of the marker to use for RegionGrowing
175+
* Position of the marker to use for `RegionGrowing`
176176
* Selection for 3D visualization (image, segmentation, or both)
177177
* Trigger to reset the application to its initial state
178178

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

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def reset():
141141

142142
For a reset, we just touch the *resetApplication* field of our macro module `TutorialSummary`.
143143

144-
#### Requirement 1: The Application Shall be Able to Load DICOM Data
144+
#### Requirement 1: The application shall be able to load DICOM data
145145
The first requirement we want to test is the possibility to load DICOM data. After setting the file to be loaded, the output provides a valid image. Resetting the application shall unload the image.
146146

147147
{{< highlight filename="<TEST_CASE_NAME>.py" >}}
@@ -159,8 +159,9 @@ def TEST_LoadDICOMData():
159159
```
160160
{{</highlight>}}
161161

162-
#### Requirement 4: The 2D Viewer Shall Provide the Possibility to Segment Parts of the Image Based on a RegionGrowing Algorithm
163-
##### Requirement 4.1: It Shall be Possible to Click Into the Image for Defining a Marker Position for Starting the RegionGrowing
162+
#### Requirement 4: The 2D viewer shall provide the possibility to segment parts of the image based on a region growing algorithm
163+
164+
##### Requirement 4.1: It shall be possible to click into the image for defining a marker position for starting the region growing algorithm
164165
This test case shall make sure the `RegionGrowing` module calculates the total volume and number of voxels to be larger than 0 in the case a marker has been set. Without loading an image or after resetting the application, the values shall be 0.
165166

166167
{{< highlight filename="<TEST_CASE_NAME>.py" >}}
@@ -192,7 +193,7 @@ def TEST_RegionGrowing():
192193
```
193194
{{</highlight>}}
194195

195-
##### Requirement 4.2: It Shall be Possible to Define a Threshold for the RegionGrowing Algorithm
196+
##### Requirement 4.2: It shall be possible to define a threshold for the region growing algorithm
196197
For the threshold of the region growing it makes sense to extend the previous test case instead of writing a new one. We already have a segmentation based on the default threshold value and can just change the threshold and compare the resulting volumes.
197198

198199
Increasing the threshold shall result in larger volumes, decreasing shall result in smaller values.
@@ -240,8 +241,9 @@ def TEST_RegionGrowing():
240241
```
241242
{{</highlight>}}
242243

243-
#### Requirement 5: The 2D Viewer Shall Display the Segmentation Results as a Semitransparent Overlay
244-
##### Requirement 5.1: It Shall be Possible to Define the Color of the Overlay
244+
#### Requirement 5: The 2D viewer shall display the segmentation results as a semitransparent overlay
245+
246+
##### Requirement 5.1: It shall be possible to define the color of the overlay
245247
The requirement 5 cannot be tested automatically. Transparencies should be tested by a human being.
246248

247249
Nevertheless, we can write an automated test checking the possibility to define the color of the overlay and the 3D segmentation.
@@ -279,13 +281,13 @@ Finally, an image comparison is done for the 3D rendering using the old and the
279281

280282
The call *MLAB.processInventorQueue()* is sometimes necessary if an Open Inventor scene changed via Python scripting, because the viewers might not update immediately after changing the field. MeVisLab is now forced to process the queue in Open Inventor and to update the renderings.
281283

282-
#### Requirement 8: The Total Volume of the Segmented Area Shall be Calculated and Shown (in ml)
284+
#### Requirement 8: The total volume of the segmented volume shall be calculated and shown (in ml)
283285
For the correctness of the volume calculation, we added the `CalculateVolume` module to our test network. The volume given by our macro is compared to the volume of the segmentation from output *outSegmentationMask* calculated by the `CalculateVolume` module.
284286

285287
{{< highlight filename="<TEST_CASE_NAME>.py" >}}
286288
```Python
287289
...
288-
# Requirement 8: The total volume of the segmented area shall be calculated and shown (in ml)
290+
# Requirement 8: The total volume of the segmented volume shall be calculated and shown (in ml)
289291
def TEST_VolumeCalculation():
290292
# Reset and expect all volumes and number of voxels to be 0
291293
reset()
@@ -312,11 +314,11 @@ def TEST_VolumeCalculation():
312314
```
313315
{{</highlight>}}
314316

315-
#### Requirement 9: It Shall be Possible to Toggle the Visible 3D Objects
317+
#### Requirement 9: It shall be possible to toggle the visible 3D objects
316318

317-
##### Requirement 9.1: Original Data
319+
##### Requirement 9.1: Original data
318320

319-
##### Requirement 9.2: Segmentation Results
321+
##### Requirement 9.2: Segmentation results
320322

321323
##### Requirement 9.3: All
322324
In the end, we want to develop a testcase for the 3D toggling of the view. We cannot exactly test if the rendering is correct; therefore, we will check if the 3D rendering image changes when toggling the 3D view. We will use the modules `OffscreenRenderer`, `ImageCompare`, and `SoCameraInteraction`, which we added to our test network.

mevislab.github.io/content/tutorials/visualization/visualizationexample1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ In this example we like to use the module `SynchroView2D` to be able to inspect
2020

2121
The module `SynchroView2D` provides two 2D viewers that are synchronized.
2222

23-
As in tutorial [Chapter 1 - Basic Mechanics of MeVisLab](tutorials/basicmechanisms/#TutorialParameterConnection), the processed and the unprocessed image can be displayed simultaneously. Scrolling through one image automatically changes the slices of both viewers, so slices with the same slice number are shown in both images.
23+
As in the tutorial [Chapter 1 - Basic Mechanics of MeVisLab](tutorials/basicmechanisms/#TutorialParameterConnection), the processed and the unprocessed image can be displayed simultaneously. Scrolling through one image automatically changes the slices of both viewers, so slices with the same slice number are shown in both images.
2424

2525
The difference is that we are now using an already existing module named `SynchroView2D`.
2626

0 commit comments

Comments
 (0)