Skip to content

Commit 68a50a5

Browse files
author
Heckmann
committed
Updates after review
1 parent 6659e74 commit 68a50a5

File tree

26 files changed

+101
-86
lines changed

26 files changed

+101
-86
lines changed

mevislab.github.io/content/tutorials/basicmechanisms/coordinatesystems/coordinatesystems2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ The module `OrthoView2D` provides a 2D view displaying the input image in three
5353

5454
![OrthoView2D](images/tutorials/basicmechanics/OrthoView2D.png "OrthoView2D")
5555

56-
As already learned in the previous example [1.1: MeVisLab Coordinate Systems](tutorials/basicmechanisms/coordinatesystems/coordinatesystems), world and voxel positions are based on different coordinate systems. Selecting the top left corner of any of your views will not show a world position of (0, 0, 0). You can move the mouse cursor to the voxel position (0, 0, 0) as seen in the image information of the viewers in brackets *(x, y, z)*. The field <field>worldPosition</field> then shows the location of the image in world coordinate system (see `Info` module).
56+
As already learned in the previous example [1.1: MeVisLab Coordinate Systems](tutorials/basicmechanisms/coordinatesystems/coordinatesystems), world and voxel positions are based on different coordinate systems. Selecting the top left corner of any of your views will not show a world position of *(0, 0, 0)*. You can move the mouse cursor to the voxel position *(0, 0, 0)* as seen in the image information of the viewers in brackets *(x, y, z)*. The field <field>worldPosition</field> then shows the location of the image in world coordinate system (see `Info` module).
5757

5858
![OrthoView2D Voxel- and World Position](images/tutorials/basicmechanics/OrthoView2D_WorldPosition.png "OrthoView2D Voxel- and World Position")
5959

mevislab.github.io/content/tutorials/basicmechanisms/macromodules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Parameter Fields allow users to control the behavior of the internal network. Th
9898
You have two options when adding fields to your macro module:
9999

100100
* **Define your own fields:** You can define your own fields by specifying their name, type, and default value in the *.script* file. This allows you to provide custom parameters for your macro module, tailored to your specific needs. These parameters can be use as input from the user or output from the modules processing.
101-
* **Reuse fields from the internal network:** Instead of defining your own field, you can expose an existing field from one of the modules of your internal network. To do this, you reference the <field>internalName</field> of the internal field you want to reuse. This makes the internal field accessible at the macro module level, allowing users to interact with it directly without duplicating parameters. Changes of the field value are automatically applied in your internal network.
101+
* **Reuse fields from the internal network:** Instead of defining your own field, you can expose an existing field from one of the modules of your internal network. To do this, you reference the <attribute>internalName</attribute> of the internal field you want to reuse. This makes the internal field accessible at the macro module level, allowing users to interact with it directly without duplicating parameters. Changes of the field value are automatically applied in your internal network.
102102

103103
![Inputs, Outputs, and Fields](images/tutorials/basicmechanics/fields.png "Inputs, Outputs, and Fields")
104104

mevislab.github.io/content/tutorials/basicmechanisms/macromodules/guidesign.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Interface {
6565
{{</highlight>}}
6666

6767
##### Module Inputs and Outputs
68-
To create an input/output, you need to define a *Field* in the respective input/output section. Each input/output gets a name (here <field>input0</field>/<field>output0</field>) that you can use to reference this field. The module input maps to an input of the internal network. You need to define this mapping. In this case, the input of the macro module `Filter` maps to the input of the module `Convolution` of the internal network (<field>internalName = Convolution.input0</field>). Similarly, you need to define which output of the internal network maps to the output of the macro module `Filter`. In this example, the output of the internal module `Arithmethic2` maps to the output of our macro module `Filter` (<field>internalName = Arithmetic2.output0</field>).
68+
To create an input/output, you need to define a *Field* in the respective input/output section. Each input/output gets a name (here <field>input0</field>/<field>output0</field>) that you can use to reference this field. The module input maps to an input of the internal network. You need to define this mapping. In this case, the input of the macro module `Filter` maps to the input of the module `Convolution` of the internal network (<field>internalName</field> = <field>Convolution.input0</field>). Similarly, you need to define which output of the internal network maps to the output of the macro module `Filter`. In this example, the output of the internal module `Arithmethic2` maps to the output of our macro module `Filter` (<field>internalName</field> = <field>Arithmetic2.output0</field>).
6969

7070
Creating an input/output causes:
7171
1. Input/output connectors are added to the module.
@@ -76,7 +76,7 @@ Creating an input/output causes:
7676
![Internal Network of your macro module](images/tutorials/basicmechanics/BM_23.png "Internal Network of your macro module")
7777

7878
##### Module Fields
79-
In the *Parameters* section, you can define *fields* of your macro module. These fields may map to existing fields of the internal network (<field>internalName = ...</field> ), but they do not need to and can also be completely new. You can reference these fields when creating a panel, to allow interactions with these fields. All fields appear in the *Automatic Panel*.
79+
In the *Parameters* section, you can define *fields* of your macro module. These fields may map to existing fields of the internal network (<field>internalName</field> = ...), but they do not need to and can also be completely new. You can reference these fields when creating a panel, to allow interactions with these fields. All fields appear in the *Automatic Panel*.
8080

8181
### Module Panel Layout
8282
To create your own user interface, we need to create a {{< docuLinks "/Resources/Documentation/Publish/SDK/MDLReference/index.html#mdl_Window" "Window" >}}. A window is one of the layout elements that exist in MDL. These layout elements are called {{< docuLinks "/Resources/Documentation/Publish/SDK/MDLReference/index.html#Controls" "controls" >}}. The curled brackets define the window section, in which you can define properties of the window and insert further controls like a {{< docuLinks "/Resources/Documentation/Publish/SDK/MDLReference/index.html#mdl_Box" "Box" >}}.

mevislab.github.io/content/tutorials/basicmechanisms/macromodules/itemmodelview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Window {
128128
```
129129
{{</highlight>}}
130130

131-
Every *Field* that we defined in the *Parameters* section is now used as a column in our view. The *Field* <field>id</field> has been defined to be the <field>idAttribute</field>. If you now open your panel, MeVisLab will complain that you did not define the *Field* <field>myItemModel</field>. You have to add a *Field* with this name to your *Parameters* section or as an *Output Field*. We will add an *Output Field*, so that our model can also be used by other modules, if necessary. The type is *MLBase*.
131+
Every *Field* that we defined in the *Parameters* section is now used as a column in our view. The *Field* <field>id</field> has been defined to be the <attribute>idAttribute</attribute>. If you now open your panel, MeVisLab will complain that you did not define the *Field* <field>myItemModel</field>. You have to add a *Field* with this name to your *Parameters* section or as an *Output Field*. We will add an *Output Field*, so that our model can also be used by other modules, if necessary. The type is *MLBase*.
132132

133133
{{< highlight filename="MyItemModelView.script" >}}
134134
```Stan

mevislab.github.io/content/tutorials/basicmechanisms/macromodules/scriptingexample2.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Window {
8585
![Panel with Tabs and Viewers](images/tutorials/basicmechanics/PanelWithTabsAndViewers.png "Panel with Tabs and Viewers")
8686

8787
### Edit Viewer Settings in the Panel
88-
You may want to change the design setting of the right viewer. This is still possible via the internal network of the macro module. Open the internal network either via the context menu or using the middle mouse button {{< mousebutton "middle" >}} and click on the module. After that, open the automatic panel of the module `SoExaminerViewer` via context menu {{< menuitem "Show Windows" "Automatic Panel" >}} and change the field <field>decoration</field> to <field>False</field>. Keep in mind, as we did not create CSOs by now, the right viewer stays black.
88+
You may want to change the design setting of the right viewer. This is still possible via the internal network of the macro module. Open the internal network either via the context menu or using the middle mouse button {{< mousebutton "middle" >}} and click on the module. After that, open the automatic panel of the module `SoExaminerViewer` via context menu {{< menuitem "Show Windows" "Automatic Panel" >}} and change the field <field>decoration</field> to *False*. Keep in mind, as we did not create CSOs by now, the right viewer stays black.
8989

9090
![Change viewer settings](images/tutorials/basicmechanics/ChangeViewerSettings.png "Change viewer settings")
9191

@@ -142,9 +142,9 @@ To create the *Browse\...* button:
142142

143143
To create the Iso Generator Button:
144144

145-
We like to copy the field of the <field>Update</field> button from the internal module `IsoCSOGenerator`, but not its layout so:
145+
We like to copy the field of the *Update* button from the internal module `IsoCSOGenerator`, but not its layout so:
146146

147-
1. Create a new Field in the interface, called <field>IsoGenerator</field>, which contains the internal field <field>Update</field> from the module `IsoCSOGenerator`.
147+
1. Create a new Field in the interface, called <field>IsoGenerator</field>, which contains the internal field <field>apply</field> from the module `CSOIsoGenerator`.
148148
2. Create a new Button in your Window that uses the field <field>IsoGenerator</field>.
149149

150150
After these steps, you can use the Iso Generator button to create CSOs.

mevislab.github.io/content/tutorials/basicmechanisms/macromodules/viewerexample.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Now, right-click on your *MyViewerApplication* and select {{< menuitem "Related
6363

6464
{{< docuLinks "/Resources/Documentation/Publish/SDK/MeVisLabManual/ch26.html" "MATE">}} opens showing your script file. You already learned how to create simple UI elements in [Example 2.4](tutorials/basicmechanisms/macromodules/guidesign). Now, we will create a little more complex UI including your `View2D` and `View3D`.
6565

66-
First we need a new *Field* in your *Parameters* section. Name the field <field>filepath</field> and set <field>internalName</field> to <field>ImageLoad.filename</field>.
66+
First we need a new *Field* in your *Parameters* section. Name the field <field>filepath</field> and set <attribute>internalName</attribute> to <field>ImageLoad.filename</field>.
6767

6868
{{< highlight filename="MyViewerApplication.script" >}}
6969
``` Stan
@@ -146,7 +146,7 @@ Window {
146146

147147
We have a vertical layout having two items placed horizontally next to each other. The new *Button* gets the title *Reset* but does nothing yet, because we did not add a Python function to a command.
148148

149-
Additionally, we added the `View2D` and the `View3D` to our *Window* and defined the <field>height</field>, <field>width</field>, and the <field>expandX/Y</field> property to <field>yes</field>. This leads our viewers to resize together with our *Window*.
149+
Additionally, we added the `View2D` and the `View3D` to our *Window* and defined the <attribute>height</attribute>, <attribute>width</attribute>, and the <attribute>expandX/Y</attribute> property to *yes*. This leads our viewers to resize together with our *Window*.
150150

151151
{{<alert class="info" caption="Extra Infos">}}
152152
Additional information about the `View2D` and `View3D` options can be found in the MeVisLab {{< docuLinks "/Resources/Documentation/Publish/SDK/MDLReference/index.html#mdl_Viewer" "MDL Reference">}}
@@ -215,7 +215,7 @@ Scrolling through slices in the `View2D` module now logs a message containing th
215215

216216
## Summary
217217
* You can add any viewers to your application UI by reusing them in MDL.
218-
* Parameter fields using the <field>internalName</field> of an existing field in your network allows reusing this UI element in your own UI. Changes in your UI are applied to the field in the module.
218+
* Parameter fields using the <attribute>internalName</attribute> of an existing field in your network allows reusing this UI element in your own UI. Changes in your UI are applied to the field in the module.
219219
* Field Listeners allow reacting on changes of a field value in Python.
220220

221221
{{< networkfile "examples/basic_mechanisms/viewer_application/viewerexample.mlab" >}}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ If you want to define your static text as a parameter in multiple labels, you ca
7676

7777
![User Data](images/tutorials/dataobjects/contours/Ex6_Parameters.png "User Data")
7878

79-
You can also add multiple CSO editors to see the different options. Add the `SoCSORectangleEditor` module to your workspace and connect it to the `SoGroup` module. As we now have two different editors, we need to tell the `CSOLabelRenderer` which CSO is to be rendered. Open the panel of the `SoCSODistanceLineEditor`. You can see the field <field>Extension Id</field> set to <field>distanceLine</field>. Open the panel of the `SoCSORectangleEditor`. You can see the field <field>Extension Id</field> set to <field>rectangle</field>.
79+
You can also add multiple CSO editors to see the different options. Add the `SoCSORectangleEditor` module to your workspace and connect it to the `SoGroup` module. As we now have two different editors, we need to tell the `CSOLabelRenderer` which CSO is to be rendered. Open the panel of the `SoCSODistanceLineEditor`. You can see the field <field>Extension Id</field> set to *distanceLine*. Open the panel of the `SoCSORectangleEditor`. You can see the field <field>Extension Id</field> set to *rectangle*.
8080

8181
![Extension ID](images/tutorials/dataobjects/contours/Ex6_ExtensionID.png "Extension ID")
8282

@@ -100,11 +100,11 @@ deviceOffsetY = 0
100100

101101
![SoCSORectangleEditor](images/tutorials/dataobjects/contours/Ex6_LineAndRectangle.png "SoCSORectangleEditor")
102102

103-
If you now draw new CSOs, you will notice that you still always create distance lines. Open the panel of the `SoView2DCSOExtensibleEditor`. You can see that the <field>Creator Extension Id</field> is set to <field>__default</field>. By default, the first found eligible editor is used to create a new CSO. In our case this is the `SoCSODistanceLineEditor`.
103+
If you now draw new CSOs, you will notice that you still always create distance lines. Open the panel of the `SoView2DCSOExtensibleEditor`. You can see that the <field>Creator Extension Id</field> is set to *__default*. By default, the first found eligible editor is used to create a new CSO. In our case this is the `SoCSODistanceLineEditor`.
104104

105105
![SoCSORectangleEditor](images/tutorials/dataobjects/contours/Ex6_DefaultExtension.png "SoCSORectangleEditor")
106106

107-
Change <field>Creator Extension Id</field> to <field>rectangle</field>.
107+
Change <field>Creator Extension Id</field> to *rectangle*.
108108

109109
![SoCSORectangleEditor & SoView2DCSOExtensibleEditor ](images/tutorials/dataobjects/contours/Ex6_8.png "SoCSORectangleEditor & SoView2DCSOExtensibleEditor")
110110

@@ -113,7 +113,7 @@ Newly created CSOs are now rectangles. The label values are shown as defined in
113113
![Labeled Rectangle in View2D](images/tutorials/dataobjects/contours/Ex6_9.png "Labeled Rectangle in View2D")
114114

115115
{{<alert class="info" caption="Extra Infos">}}
116-
The <field>Length</field> in the context of rectangles represents the perimeter of the rectangle, calculated as *2a + 2b*, where *a* and *b* are the lengths of the two sides of the rectangle.
116+
The *Length* in the context of rectangles represents the perimeter of the rectangle, calculated as *2a + 2b*, where *a* and *b* are the lengths of the two sides of the rectangle.
117117
{{</alert>}}
118118

119119
You will find a lot more information in the `CSOInfo` module for your rectangles. The exact meaning of the values for each type of CSO is explained in the table below.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ The behavior of your network does not change. You can still draw the same CSOs a
5252

5353
Open the context menu of your `csoList` module {{< mousebutton "right" >}} and select {{<menuitem "Related Files" "csoList.script" >}}.
5454

55-
The MeVisLab text editor MATE opens, showing your *.script* file. You can see the output of your module as *CSOListContainer.outCSOList*. We want to define a threshold for the color of our CSOs. For this, add another field to the *Parameters* section of your script file named <field>areaThreshold</field>. Define the <field>type</field> as <field>Float</field> and <field>value</field> as <field>2000.0</field>.
55+
The MeVisLab text editor MATE opens, showing your *.script* file. You can see the output of your module as *CSOListContainer.outCSOList*. We want to define a threshold for the color of our CSOs. For this, add another field to the *Parameters* section of your script file named <field>areaThreshold</field>. Define the <attribute>type</attribute> as *Float* and <attribute>value</attribute> as *2000.0*.
5656

5757
In order to call Python functions, we also need a Python file. Add a *Commands* section and define the *source* of the Python file as *$(LOCAL)/csoList.py*. Also add an *initCommand* as *initCSOList*. The initCommand defines the Python function that is called whenever the module is added to the workspace or reloaded.
5858

@@ -107,7 +107,7 @@ def _getCSOList():
107107

108108
The function gets the current CSOList from the output field of the `CSOListContainer`. Initially, it should be empty. If not, we want to start with an empty list; therefore, we remove all existing CSOs.
109109

110-
We also create two new CSO lists: one list for small contours, one list for larger contours, depending on the defined <field>areaThreshold</field> from the modules fields.
110+
We also create two new CSO lists: one list for small contours, one list for larger contours, depending on the defined <field>areaThreshold</field> from the module's fields.
111111

112112
Additionally, we also want to define different colors for the CSOs in the lists. Small contours shall be drawn in green, large contours shall be drawn in red.
113113

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Double-click {{<mousebutton "left">}} on the `CurveCreator` module and open the
3838

3939
![CurveCreator Module](images/tutorials/dataobjects/curves/CurveCreatorModule.png "CurveCreator Module")
4040

41-
You can see a large input field <field>Curve Table</field>. Here you can enter the x- and y-values of your curve. The values of the first column will become the x-values and the 2nd any further column will become the y-series. Comment lines start with a '#' character.
41+
You can see a large input field <field>Curve Table</field>. Here you can enter the x- and y-values of your curve. The values of the first column will become the x-values and the second column will become the y-series. Comment lines start with a '#' character.
4242

4343
Enter the following into the *Curve Table*:
4444
{{< highlight filename="Curve Table" >}}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ To create markers, you can use a marker editor, for example, the `SoView2DMarker
2121

2222
![Create Markers](images/tutorials/dataobjects/markers/DO_Markers_01.png "Create Markers")
2323

24-
Using the `StylePalette` module, you can define a style for your markers. In order to set different styles for different markers, change the field <field>Color Mode</field> in the panel of `SoView2DMarkerEditor` to <field>Index</field>.
24+
Using the `StylePalette` module, you can define a style for your markers. In order to set different styles for different markers, change the field <field>Color Mode</field> in the panel of `SoView2DMarkerEditor` to *Index*.
2525

2626
![Style of Markers](images/tutorials/dataobjects/markers/DO_Markers_08.png "Style of Markers")
2727

0 commit comments

Comments
 (0)