From b6917a00a3d2c82fd4e52963414a6ec8976c0ea9 Mon Sep 17 00:00:00 2001 From: Sascha Heckmann Date: Mon, 16 Jun 2025 12:53:25 +0200 Subject: [PATCH 1/2] Bugfix --- .../basicmechanisms/macromodules/itemmodelview.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/itemmodelview.md b/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/itemmodelview.md index 45aabad55..c3f0c04f0 100644 --- a/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/itemmodelview.md +++ b/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/itemmodelview.md @@ -1,5 +1,5 @@ --- -title: "Example 7: Creating you own ItemModel by using the ItemModelView" +title: "Example 7: Creating your own ItemModel by using the ItemModelView" date: 2025-06-03 status: "OK" draft: false @@ -169,6 +169,12 @@ from mevis import MLAB gAttributes = ["patientName", "patientBirthdate", "studyDescription", "studyDate", "modality", "seriesDescription", "seriesDate", "sopInstanceUID"] gModel = None gNextId = 0 + +def getNextId(): + global gNextId + id = gNextId + gNextId += 1 + return id ``` {{}} From 6d36765c2a87851f8d263dc67f6d77d3dfa0e4b4 Mon Sep 17 00:00:00 2001 From: Sascha Heckmann Date: Mon, 16 Jun 2025 13:45:12 +0200 Subject: [PATCH 2/2] changes after review --- .../tutorials/basicmechanisms/macromodules/itemmodelview.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/itemmodelview.md b/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/itemmodelview.md index c3f0c04f0..8db3421fc 100644 --- a/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/itemmodelview.md +++ b/mevislab.github.io/content/tutorials/basicmechanisms/macromodules/itemmodelview.md @@ -172,9 +172,8 @@ gNextId = 0 def getNextId(): global gNextId - id = gNextId gNextId += 1 - return id + return gNextId ``` {{}}