# Markups tools not measuring Slicer 5.4.0

**URL:** <https://discourse.slicer.org/t/markups-tools-not-measuring-slicer-5-4-0/31609>\
**Category:** Support\
**Created:** [September 7, 2023, 7:11pm UTC](https://discourse.slicer.org/t/markups-tools-not-measuring-slicer-5-4-0/31609 "2023-09-07T19:11:19Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmhuie](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jmhuie/32/7086_2.png) [@jmhuie](https://discourse.slicer.org/u/jmhuie)\
**Post date:** [September 7, 2023, 7:11pm UTC](https://discourse.slicer.org/t/markups-tools-not-measuring-slicer-5-4-0/31609/1 "2023-09-07T19:11:19Z")

</div>

With Slicer 5.4.0, it seems that the MarkupsLineNode and other Markups Nodes are not showing their measurements, nor does it appear to be registering an actual measurement. When I try to get the measured length using python it returns “0.0” when it is greater than that. Is anyone else running into this issue? Currently running on a Mac.

 ![Screenshot 2023-09-07 at 3.06.05 PM](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/1/5/15427cecd3e06a9524d9640dc9b29c4e2bda9263.jpeg)

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [September 7, 2023, 7:26pm UTC](https://discourse.slicer.org/t/markups-tools-not-measuring-slicer-5-4-0/31609/2 "2023-09-07T19:26:19Z")

</div>

I cannot reproduce the behavior you described. Can you take a video or describe the exact steps (each click) you make?

---

<div class="post-metadata">

**Author:** ![jmhuie](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jmhuie/32/7086_2.png) [@jmhuie](https://discourse.slicer.org/u/jmhuie)\
**Post date:** [September 13, 2023, 1:27am UTC](https://discourse.slicer.org/t/markups-tools-not-measuring-slicer-5-4-0/31609/3 "2023-09-13T01:27:31Z")

</div>

I did some more investigating. It looks like the problem may have to do the SlicerMorph customizations, as I only have this problem when the customizations are enabled. @muratmaga

To be clear, what I did was:

1. re-downloaded Slicer 5.4 on Mac
2. Open Slicer and immediately drew a line using the Markups tools and saw the length being displayed
3. Installed SlicerMorph
4. Confirmed that the line tool still works
5. Enabled SlicerMorph customizations, restarted Slicer, and found that the line tool stopped measuring
6. Turned off customizations, restarted Slicer, and found that the line tool works again

Possibly unrelated, but upon initially launching Slicer the python window has this error regarding the MarkupsToModel extension

```auto
[Qt] Error(s):
[Qt] Cannot load library /Applications/Slicer.app/Contents/Extensions-31938/MarkupsToModel/lib/Slicer-5.4/qt-loadable-modules/libqSlicerMarkupsToModelModule.dylib: (dlopen(/Applications/Slicer.app/Contents/Extensions-31938/MarkupsToModel/lib/Slicer-5.4/qt-loadable-modules/libqSlicerMarkupsToModelModule.dylib, 0x0085): Library not loaded: /Users/svc-dashboard/D/S/A/ITK-build/lib/libitkgdcmjpeg8-5.3.1.dylib
[Qt] Referenced from: <8228E9E9-AE1B-31B6-BEEB-4F916BF21B91> /Applications/Slicer.app/Contents/Extensions-31938/MarkupsToModel/lib/Slicer-5.4/libitkgdcmMSFF-5.3.1.dylib
[Qt] Reason: tried: '/Users/svc-dashboard/D/S/A/ITK-build/lib/libitkgdcmjpeg8-5.3.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/svc-dashboard/D/S/A/ITK-build/lib/libitkgdcmjpeg8-5.3.1.dylib' (no such file), '/Users/svc-dashboard/D/S/A/ITK-build/lib/libitkgdcmjpeg8-5.3.1.dylib' (no such file), '/usr/lib/libitkgdcmjpeg8-5.3.1.dylib' (no such file, not in dyld cache))

```

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [September 13, 2023, 2:27am UTC](https://discourse.slicer.org/t/markups-tools-not-measuring-slicer-5-4-0/31609/4 "2023-09-13T02:27:55Z")

</div>

@jmhuie what do you mean by `stops measuring?`

I am trying to replicate this on an intel Mac I have, and line tools works as expected, but it doesn’t display the measurement field regardless whether slicermorph customization are enabled or disabled? Is this what you are referring to as the issue?

We did recently enabled undo for markups through the customization script, but I am not seeing any errors in the log file either.

@smrolfe

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/f/ff41cbf974133847e812e6ee12ffdd7eafc2e76f.png)

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [September 13, 2023, 2:31am UTC](https://discourse.slicer.org/t/markups-tools-not-measuring-slicer-5-4-0/31609/5 "2023-09-13T02:31:34Z")

</div>

Ok, I can replicate this with a new slicer session without customization script loaded at the beginning.

Thanks for reporting @smrolfe can you take a look?

---

<div class="post-metadata">

**Author:** ![jmhuie](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jmhuie/32/7086_2.png) [@jmhuie](https://discourse.slicer.org/u/jmhuie)\
**Post date:** [September 13, 2023, 2:45am UTC](https://discourse.slicer.org/t/markups-tools-not-measuring-slicer-5-4-0/31609/7 "2023-09-13T02:45:21Z")

</div>

> [@muratmaga](#):
>
> I am trying to replicate this on an intel Mac I have, and line tools works as expected, but it doesn’t display the measurement field regardless whether slicermorph customization are enabled or disabled? Is this what you are referring to as the issue?

Yes that is what I’m referring to as the issue, except it does display the measurement when the slicermorph customizations are disabled. And if you were to measure the length of the line using python, it’d say the length is 0.0 when it clearly isn’t.

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [September 13, 2023, 2:50am UTC](https://discourse.slicer.org/t/markups-tools-not-measuring-slicer-5-4-0/31609/8 "2023-09-13T02:50:12Z")

</div>

If you do want to use the customizations, as a temporary fix you can comment out or remove this line and it seems to fix the issue.

> <https://github.com/SlicerMorph/SlicerMorph/blob/de80128f9e5267df9c979a0a99142d21ee06573f/MorphPreferences/Resources/SlicerMorphRC.py#L178>

---

<div class="post-metadata">

**Author:** ![smrolfe](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/smrolfe/32/3659_2.png) [@smrolfe](https://discourse.slicer.org/u/smrolfe)\
**Post date:** [September 13, 2023, 2:52am UTC](https://discourse.slicer.org/t/markups-tools-not-measuring-slicer-5-4-0/31609/9 "2023-09-13T02:52:07Z")

</div>

Yes, I’ll look into it and update here.

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [September 13, 2023, 1:20pm UTC](https://discourse.slicer.org/t/markups-tools-not-measuring-slicer-5-4-0/31609/10 "2023-09-13T13:20:11Z")

</div>

> Possibly unrelated, but upon initially launching Slicer the python window has this error regarding the MarkupsToModel extension
> 
> ```auto
> [Qt] Error(s):
> [Qt] Cannot load library /Applications/Slicer.app/Contents/Extensions-31938/MarkupsToModel/lib/Slicer-5.4/qt-loadable-modules/libqSlicerMarkupsToModelModule.dylib: (dlopen(/Applications/Slicer.app/Contents/Extensions-31938/MarkupsToModel/lib/Slicer-5.4/qt-loadable-modules/libqSlicerMarkupsToModelModule.dylib, 0x0085): Library not loaded: /Users/svc-dashboard/D/S/A/ITK-build/lib/libitkgdcmjpeg8-5.3.1.dylib
> [Qt] Referenced from: <8228E9E9-AE1B-31B6-BEEB-4F916BF21B91> /Applications/Slicer.app/Contents/Extensions-31938/MarkupsToModel/lib/Slicer-5.4/libitkgdcmMSFF-5.3.1.dylib
> [Qt] Reason: tried: '/Users/svc-dashboard/D/S/A/ITK-build/lib/libitkgdcmjpeg8-5.3.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/svc-dashboard/D/S/A/ITK-build/lib/libitkgdcmjpeg8-5.3.1.dylib' (no such file), '/Users/svc-dashboard/D/S/A/ITK-build/lib/libitkgdcmjpeg8-5.3.1.dylib' (no such file), '/usr/lib/libitkgdcmjpeg8-5.3.1.dylib' (no such file, not in dyld cache))
> 
> ```

Consider uninstalling & re-installing the `SlicerMorph` extension as this a symptom of the following issue that just got addressed:

> [@New extensions can not work on Slicer 5.4.0 on MacOS](https://discourse.slicer.org/t/new-extensions-can-not-work-on-slicer-5-4-0-on-macos/31535):
>
> Hello, I have just updated Slicer VMTK to 144582e (2023-08-22). It showed the following error: dlopen(/Applications/Slicer 5.4.0.app/Contents/Extensions-31938/SlicerVMTK/lib/Slicer-5.4/qt-loadable-modules/qSlicerBranchClipperModuleWidgetsPythonQt.so, 0x0002): Library not loaded: /Users/svc-dashboard/D/S/A/ITK-build/lib/libitkgdcmjpeg8-5.3.1.dylib Referenced from: \<8228E9E9-AE1B-31B6-BEEB-4F916BF21B91\> /Applications/Slicer 5.4.0.app/Contents/Extensions-31938/SlicerVMTK/lib/Slicer-5.4/libitkgdc…

---

<div class="post-metadata">

**Author:** ![smrolfe](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/smrolfe/32/3659_2.png) [@smrolfe](https://discourse.slicer.org/u/smrolfe)\
**Post date:** [September 21, 2023, 4:54pm UTC](https://discourse.slicer.org/t/markups-tools-not-measuring-slicer-5-4-0/31609/11 "2023-09-21T16:54:51Z")

</div>

[Enabling undo/redo](https://projectweek.na-mic.org/PW39_2023_Montreal/Projects/UndoRedo/) is causing this issue because there’s a bug where adding a default node to the scene removes the measurements displayed for that node type. This also occurs when SetUndoEnabled() is not set for the default node.

> <https://github.com/smrolfe/SlicerMorph/blob/248235d5814e8cb91d709598658971d4753d35f9/MorphPreferences/Resources/SlicerMorphRC.py#L180C2-L183C1>

For now, we updated the SlicerMorph preferences to enable undo/redo for point lists only.

cc: @Sunderlandkyl

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [September 22, 2023, 3:01am UTC](https://discourse.slicer.org/t/markups-tools-not-measuring-slicer-5-4-0/31609/12 "2023-09-22T03:01:04Z")

</div>

> [@smrolfe](#):
>
> because there’s a bug where adding a default node to the scene removes the measurements displayed for that node type

Is there a bug report for this. If not, could you create one? Thank you!

---

<div class="post-metadata">

**Author:** ![smrolfe](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/smrolfe/32/3659_2.png) [@smrolfe](https://discourse.slicer.org/u/smrolfe)\
**Post date:** [September 22, 2023, 7:49pm UTC](https://discourse.slicer.org/t/markups-tools-not-measuring-slicer-5-4-0/31609/13 "2023-09-22T19:49:31Z")

</div>

Issue added here: [Adding a default Markups node to scene removes measurements · Issue #7239 · Slicer/Slicer · GitHub](https://github.com/Slicer/Slicer/issues/7239)

---

<div class="post-metadata">

**Author:** ![coco](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@coco](https://discourse.slicer.org/u/coco)\
**Post date:** [February 22, 2024, 3:33pm UTC](https://discourse.slicer.org/t/markups-tools-not-measuring-slicer-5-4-0/31609/14 "2024-02-22T15:33:04Z")

</div>

This solved my problem thanks.

Not sure if this is related but I can now see measurments both next to my markups when drawing them and on the measurment tab. But I cannot see them in the table, nor export the measurments in a tab. Is this actually possible or related to a bug ?  
Thanks
