# Slicer quits unexpectedly - Label statistics

**URL:** <https://discourse.slicer.org/t/slicer-quits-unexpectedly-label-statistics/11368>\
**Category:** Support\
**Created:** [April 30, 2020, 5:41pm UTC](https://discourse.slicer.org/t/slicer-quits-unexpectedly-label-statistics/11368 "2020-04-30T17:41:17Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![LearningSlicerYay](https://avatars.discourse-cdn.com/v4/letter/l/8dc957/32.png) [@LearningSlicerYay](https://discourse.slicer.org/u/LearningSlicerYay)\
**Post date:** [April 30, 2020, 5:41pm UTC](https://discourse.slicer.org/t/slicer-quits-unexpectedly-label-statistics/11368/1 "2020-04-30T17:41:17Z")

</div>

**Slicer Version:** 4.10.2  
**OS:** Ubuntu

Hi everyone,

I’m not sure if this is the same issue [as this thread,](https://discourse.slicer.org/t/slicer-quits-unexpectedly/11333) but Slicer has been quitting on me unexpectedly as well. Particularly, every time I try to calculate label statistics from a scalar map (mean diffusivity, in particular). I do not get this issue when I try with the other maps of interest (in this case, FA, Trace, RA, Parallel and Perpendicular Diffusivity).

Any help would be greatly appreciated - thank you!

---

<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:** [April 30, 2020, 6:39pm UTC](https://discourse.slicer.org/t/slicer-quits-unexpectedly-label-statistics/11368/2 "2020-04-30T18:39:24Z")

</div>

Label statistics module is superseded by Segment statistics module. Can you try if you experience any problems using Segment Statistics module on a recent Slicer Preview Release?

---

<div class="post-metadata">

**Author:** ![LearningSlicerYay](https://avatars.discourse-cdn.com/v4/letter/l/8dc957/32.png) [@LearningSlicerYay](https://discourse.slicer.org/u/LearningSlicerYay)\
**Post date:** [April 30, 2020, 7:07pm UTC](https://discourse.slicer.org/t/slicer-quits-unexpectedly-label-statistics/11368/3 "2020-04-30T19:07:46Z")

</div>

Hi Andras,

I downloaded 4.11.0 and installed the dMRI plugin. When I try to open MRML scenes that have the MeanDiffusivity label map created, Slicer crashes. It can open scenes that do not have the MeanDiffusivity label map, but when I try to make it (to test the segment statistics module), again it crashes. Not sure what the issue is.

I went back to 4.10.2 and it can be calculated with Segment statistics though, which is great.

Thanks for your help.

---

<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:** [April 30, 2020, 7:33pm UTC](https://discourse.slicer.org/t/slicer-quits-unexpectedly-label-statistics/11368/4 "2020-04-30T19:33:33Z")

</div>

Can you share a scene that causes Slicer-4.11 to crash so that we can investigate and fix the issue? Does Slicer-4.11 work correctly if instead of loading the scene file (.mrml) you just load the MeanDiffusivity label map and other files?

---

<div class="post-metadata">

**Author:** ![LearningSlicerYay](https://avatars.discourse-cdn.com/v4/letter/l/8dc957/32.png) [@LearningSlicerYay](https://discourse.slicer.org/u/LearningSlicerYay)\
**Post date:** [April 30, 2020, 8:12pm UTC](https://discourse.slicer.org/t/slicer-quits-unexpectedly-label-statistics/11368/5 "2020-04-30T20:12:31Z")

</div>

Hi Andras,

I don’t think I can share the scenes I was working with, but I was able to replicate the problem using the DTI tutorial data from the 3DSlicer group. Is there a place I can upload it?

Using both my data the the tutorial data, I was unable to open the mean diffusivity files on 4.11 - still crashes. FA and the other scalar maps work fine though.

---

<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:** [April 30, 2020, 8:23pm UTC](https://discourse.slicer.org/t/slicer-quits-unexpectedly-label-statistics/11368/6 "2020-04-30T20:23:46Z")

</div>

Yes, please upload that scene to onedrive/dropbox/googledrive and post the link here. Thanks!

---

<div class="post-metadata">

**Author:** ![LearningSlicerYay](https://avatars.discourse-cdn.com/v4/letter/l/8dc957/32.png) [@LearningSlicerYay](https://discourse.slicer.org/u/LearningSlicerYay)\
**Post date:** [April 30, 2020, 8:38pm UTC](https://discourse.slicer.org/t/slicer-quits-unexpectedly-label-statistics/11368/7 "2020-04-30T20:38:26Z")

</div>

[Here you go.](https://drive.google.com/file/d/1KX0ulWO-sqjcwrZpc10e17CNAHk7tlaT/view?usp=sharing)

---

<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:** [May 1, 2020, 1:36pm UTC](https://discourse.slicer.org/t/slicer-quits-unexpectedly-label-statistics/11368/8 "2020-05-01T13:36:02Z")

</div>

Mean diffusivity image contains invalid floating-point value (NaN), which causes a VTK filter (vtkImageHistogramStatistics) to crash when it tries to figure out a good default window/level value. I’ve fixed that problem in VTK now, it’ll just take a few days to get that integrated into Slicer (you can track progress [here](https://github.com/Slicer/Slicer/issues/4907)).

How did you compute this mean diffusivity image? It would be probably better to change that algorithm to not have NaN values in the result (e.g., replace by 0 or -1), as such values rarely used and may cause unexpected behavior in various software.

---

<div class="post-metadata">

**Author:** ![LearningSlicerYay](https://avatars.discourse-cdn.com/v4/letter/l/8dc957/32.png) [@LearningSlicerYay](https://discourse.slicer.org/u/LearningSlicerYay)\
**Post date:** [May 1, 2020, 2:45pm UTC](https://discourse.slicer.org/t/slicer-quits-unexpectedly-label-statistics/11368/9 "2020-05-01T14:45:03Z")

</div>

Hi Andras,

Brilliant! Thank you for the fix, eager to see it integrated. 🙂

I actually just use the SlicerDMRI plugin to compute the mean diffusivity map. Under Diffusion -\> Quantify -\> Diffusion Tensor Scalar Maps. I then choose my DTI and create the map. I’ve tried maybe half the maps, but only this one causes the issue so far.

---

<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:** [May 1, 2020, 3:36pm UTC](https://discourse.slicer.org/t/slicer-quits-unexpectedly-label-statistics/11368/10 "2020-05-01T15:36:38Z")

</div>

Could you please report the issue here: [https://github.com/SlicerDMRI/SlicerDMRI/issues](https://github.com/SlicerDMRI/SlicerDMRI/issues)  
Thank you!
