Skip to content

Commit

Permalink
MVL-589: Review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Heckmann committed Oct 26, 2023
1 parent 77696ff commit d451a84
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ right-click {{< mousebutton "right" >}} the macro module to open the context men

{{<alert class="info" caption="Info">}}
Make sure to chose *Directory Structure* as *self-contained*. This makes sure that all files of your module are stored in a single directory.

Also keep in mind that Python files are only created automatically if selected in the Project Wizard. Converting a local macro to a global macro does NOT create a Python file automatically.
{{</alert>}}

![Create global macro module](/images/tutorials/basicmechanics/GUI_04.png "Create global macro module")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ You can see 2 curves. The second and third columns are printed as separate 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
Let's do this. Open the panel of the `SoDiagram2D` module and check *Draw legend*. Enter *"Curve1 Curve2"* into the *Title(s)* text box and click *Update* {{<mousebutton "left">}}.
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* {{<mousebutton "left">}}.

![SoRenderArea with Legend](/images/tutorials/dataobjects/curves/SoRenderArea2.png "SoRenderArea with Legend")

Expand Down Expand Up @@ -139,4 +139,8 @@ For more complex visualizations, you can also use Matplotlib. See examples at [T
* The `StylePalette` allows you to define the appearance of a curve
* Details of the different curves can be visualized by using the `SoDiagram2D` module

{{<alert class="info" caption="Additional Information">}}
The attached example network shows the curves after clicking *Update* on `CurveCreator` module.
{{</alert>}}

{{< networkfile "examples/data_objects/curves/example1/Curves.mlab" >}}
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ It is, for example, possible to set markers by using the `MaskToMarkers`-module

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.

{{<alert class="info" caption="Info">}}
Make sure to set *Lower Threshold* of the `MaskToMarkers` module to 1000 so that the 3D object is rendered correctly.
{{</alert>}}

![Convert Markers](/images/tutorials/dataobjects/markers/DO_Markers_02.png "Convert Markers")

## Exercise
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ We need to change the size of `SoCube1` and `SoCube2` to form planes, which cove

![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).

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.

![Interactive dragging of objects](/images/tutorials/dataobjects/surfaces/DO10_10.png "Interactive dragging of objects")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ You can now interactively drag the WEM insight the viewer.

![Dragging the WEM](/images/tutorials/dataobjects/surfaces/DO12_11.png "Dragging the WEM")

At last, exchange the module `WEMInitialize` with `WEMLoad` and load *venus.off*. You can decrease the *Face Alpha* in the panel of `SoWEMRenderer1` to make that WEM transparent.
At last, exchange the `WEMInitialize` module showing the cube with `WEMLoad` and load *venus.off*. You can decrease the *Face Alpha* in the panel of `SoWEMRenderer1` to make that WEM transparent.

![WEM transparency](/images/tutorials/dataobjects/surfaces/DO12_12.png "WEM transparency")

Expand Down
12 changes: 6 additions & 6 deletions mevislab.github.io/content/tutorials/summary/summary3.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,9 @@ Python scripting is always necessary in case you do not want to re-use an existi
Events can be raised by the user (i.e. by clicking a button) or by the application itself (i.e. when the window is opened).

#### 3D visualization selection
You will now add a selection possibility for the 3D viewer. This allows you to define the visibility of the 3D objects Image, Segmentation or Both.
You will now add a selection possibility for the 3D viewer. This allows you to define the visibility of the 3D objects File, Segmented or Both.

Add another field to your *Parameters* section. Define the field as *selected3DView* and set *type = Enum* and *values =Segmentation,Image,Both*.
Add another field to your *Parameters* section. Define the field as *selected3DView* and set *type = Enum* and *values =Segmented,File,Both*.

Add a *ComboBox* to your *Settings* and use the field name defined above. Set *alignX = Left* and *editable = False* and open the *Window* of the Macro module in MeVisLab.

Expand All @@ -349,9 +349,9 @@ Right-click {{< mousebutton "right" >}} the command select {{< menuitem "Create
from mevis import *

def viewSelectionChanged(field):
if field.value == "Segmentation":
if field.value == "Segmented":
ctx.field("SoSwitch.whichChild").value = 0
if field.value == "Image":
if field.value == "File":
ctx.field("SoSwitch.whichChild").value = 1
if field.value == "Both":
ctx.field("SoSwitch.whichChild").value = 2
Expand Down Expand Up @@ -667,9 +667,9 @@ Window {
from mevis import *

def viewSelectionChanged(field):
if field.value == "Segmentation":
if field.value == "Segmented":
ctx.field("SoSwitch.whichChild").value = 0
if field.value == "Image":
if field.value == "File":
ctx.field("SoSwitch.whichChild").value = 1
if field.value == "Both":
ctx.field("SoSwitch.whichChild").value = 2
Expand Down
3 changes: 2 additions & 1 deletion mevislab.github.io/content/tutorials/summary/summary4.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ def TEST_RegionGrowing():
ASSERT_EQ(region_growing_voxels, 0)
ASSERT_EQ(region_growing_volume, 0)
# Set marker and expect volumes and voxels to be larger than 0
reset()
setMarkerPosition(marker_location)
region_growing_voxels = ctx.field("TutorialSummary.RegionGrowing.numSegmentedVoxels").value
region_growing_volume = ctx.field("TutorialSummary.RegionGrowing.segmentedVolume_ml").value
Expand Down Expand Up @@ -386,7 +387,7 @@ The results of your tests are shown in a Report Viewer. You can also export the
![ReportViewer](/images/tutorials/summary/Example4_8.png "ReportViewer")

### Screenshots
You can also add screenshots of your inventor scene to the report. Add the following to your Python script and a Snapshot of your 3D scene is attached to your test report:
You can also add screenshots of your inventor scene to the report. Add the following to your Python script wherever you want to capture the content of the `SoCameraInteraction` module and a Snapshot of your 3D scene is attached to your test report:

{{< highlight filename="<TEST_CASE_NAME>.py" >}}
```Python
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Add a list for test data to be used as input and a prefix for the path of the te
{{< highlight filename="IterativeTestCase.py" >}}
```Python
from mevis import *
from TestSupport import Base, Fields, ScreenShot
from TestSupport import Base, Fields, ScreenShot, Logging
from TestSupport.Macros import *

patientPathPrefix = "$(DemoDataPath)/BrainMultiModal/"
Expand Down

0 comments on commit d451a84

Please sign in to comment.