From d451a8478143895d00e5dcd619c8a0b22546b9aa Mon Sep 17 00:00:00 2001 From: Heckmann Date: Thu, 26 Oct 2023 12:34:19 +0200 Subject: [PATCH] MVL-589: Review comments --- .../macromodules/globalmacromodules.md | 2 ++ .../tutorials/dataobjects/curves/curvesexample1.md | 6 +++++- .../content/tutorials/dataobjects/markerobjects.md | 4 ++++ .../dataobjects/surfaces/surfaceexample4.md | 2 ++ .../dataobjects/surfaces/surfaceexample5.md | 2 +- .../content/tutorials/summary/summary3.md | 12 ++++++------ .../content/tutorials/summary/summary4.md | 3 ++- .../content/tutorials/testing/testingexample3.md | 2 +- 8 files changed, 23 insertions(+), 10 deletions(-) diff --git a/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/globalmacromodules.md b/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/globalmacromodules.md index 1b937c063..e97d64152 100644 --- a/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/globalmacromodules.md +++ b/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/globalmacromodules.md @@ -49,6 +49,8 @@ right-click {{< mousebutton "right" >}} the macro module to open the context men {{}} 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. {{}} ![Create global macro module](/images/tutorials/basicmechanics/GUI_04.png "Create global macro module") diff --git a/mevislab.github.io/content/tutorials/dataobjects/curves/curvesexample1.md b/mevislab.github.io/content/tutorials/dataobjects/curves/curvesexample1.md index 96c922a21..2b010b998 100644 --- a/mevislab.github.io/content/tutorials/dataobjects/curves/curvesexample1.md +++ b/mevislab.github.io/content/tutorials/dataobjects/curves/curvesexample1.md @@ -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* {{}}. +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") @@ -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 +{{}} +The attached example network shows the curves after clicking *Update* on `CurveCreator` module. +{{}} + {{< networkfile "examples/data_objects/curves/example1/Curves.mlab" >}} diff --git a/mevislab.github.io/content/tutorials/dataobjects/markerobjects.md b/mevislab.github.io/content/tutorials/dataobjects/markerobjects.md index 7e21f3c4d..b52882e47 100644 --- a/mevislab.github.io/content/tutorials/dataobjects/markerobjects.md +++ b/mevislab.github.io/content/tutorials/dataobjects/markerobjects.md @@ -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. +{{}} +Make sure to set *Lower Threshold* of the `MaskToMarkers` module to 1000 so that the 3D object is rendered correctly. +{{}} + ![Convert Markers](/images/tutorials/dataobjects/markers/DO_Markers_02.png "Convert Markers") ## Exercise diff --git a/mevislab.github.io/content/tutorials/dataobjects/surfaces/surfaceexample4.md b/mevislab.github.io/content/tutorials/dataobjects/surfaces/surfaceexample4.md index a2de79d79..028506ee7 100644 --- a/mevislab.github.io/content/tutorials/dataobjects/surfaces/surfaceexample4.md +++ b/mevislab.github.io/content/tutorials/dataobjects/surfaces/surfaceexample4.md @@ -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") diff --git a/mevislab.github.io/content/tutorials/dataobjects/surfaces/surfaceexample5.md b/mevislab.github.io/content/tutorials/dataobjects/surfaces/surfaceexample5.md index 990a52063..246bef2ab 100644 --- a/mevislab.github.io/content/tutorials/dataobjects/surfaces/surfaceexample5.md +++ b/mevislab.github.io/content/tutorials/dataobjects/surfaces/surfaceexample5.md @@ -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") diff --git a/mevislab.github.io/content/tutorials/summary/summary3.md b/mevislab.github.io/content/tutorials/summary/summary3.md index 581481aa3..a58c26b68 100644 --- a/mevislab.github.io/content/tutorials/summary/summary3.md +++ b/mevislab.github.io/content/tutorials/summary/summary3.md @@ -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. @@ -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 @@ -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 diff --git a/mevislab.github.io/content/tutorials/summary/summary4.md b/mevislab.github.io/content/tutorials/summary/summary4.md index bce0679da..33ddd0b5b 100644 --- a/mevislab.github.io/content/tutorials/summary/summary4.md +++ b/mevislab.github.io/content/tutorials/summary/summary4.md @@ -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 @@ -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=".py" >}} ```Python diff --git a/mevislab.github.io/content/tutorials/testing/testingexample3.md b/mevislab.github.io/content/tutorials/testing/testingexample3.md index 3d86ccd98..81598afd6 100644 --- a/mevislab.github.io/content/tutorials/testing/testingexample3.md +++ b/mevislab.github.io/content/tutorials/testing/testingexample3.md @@ -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/"