# Trying to make a STL from a NRRD

**URL:** <https://discourse.slicer.org/t/trying-to-make-a-stl-from-a-nrrd/7615>\
**Category:** Support\
**Tags:** build, segmentation, bug, dicom, python\
**Created:** [July 16, 2019, 4:17pm UTC](https://discourse.slicer.org/t/trying-to-make-a-stl-from-a-nrrd/7615 "2019-07-16T16:17:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![harsh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/harsh/32/82533_2.png) [@harsh](https://discourse.slicer.org/u/harsh)\
**Post date:** [July 16, 2019, 4:17pm UTC](https://discourse.slicer.org/t/trying-to-make-a-stl-from-a-nrrd/7615/1 "2019-07-16T16:17:48Z")

</div>

I Imported a nrrd file and then used Segment Editor module to create a segment with the appropriate threseholds that I was looking for, upon this I recieve the error Traceback (most recent call last):  
File “C:\Program Files\Slicer 4.10.2\lib\Slicer-4.10\qt-scripted-modules\SegmentEditorEffects\SegmentEditorEffects\SegmentEditorThresholdEffect.py”, line 349, in onApply  
modifierLabelmap = self.scriptedEffect.defaultModifierLabelmap()  
MemoryError: std::bad\_alloc: bad allocation

---

<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:** [July 16, 2019, 4:23pm UTC](https://discourse.slicer.org/t/trying-to-make-a-stl-from-a-nrrd/7615/2 "2019-07-16T16:23:25Z")

</div>

You have run out of memory. Crop the master volume using Crop volume module to the relevant region, maybe also increase the voxel size if needed and/or increase virtual memory size on your computer.

---

<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:** [July 16, 2019, 4:31pm UTC](https://discourse.slicer.org/t/trying-to-make-a-stl-from-a-nrrd/7615/3 "2019-07-16T16:31:43Z")

</div>

Your computer ran out of memory during the task. How big is your dataset, and how much RAM do you have on it?

Typical suggestion for RAM is 6-10X of your dataset.

Mail]([https://go.microsoft.com/fwlink/?LinkId=550986](https://go.microsoft.com/fwlink/?LinkId=550986)) for Windows 10

---

<div class="post-metadata">

**Author:** ![harsh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/harsh/32/82533_2.png) [@harsh](https://discourse.slicer.org/u/harsh)\
**Post date:** [July 16, 2019, 9:44pm UTC](https://discourse.slicer.org/t/trying-to-make-a-stl-from-a-nrrd/7615/4 "2019-07-16T21:44:09Z")

</div>

data set is around 10gb file, my computer has 32gb ram and a 1060gtx

---

<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:** [July 17, 2019, 8:54am UTC](https://discourse.slicer.org/t/trying-to-make-a-stl-from-a-nrrd/7615/5 "2019-07-17T08:54:19Z")

</div>

Yep, you need more memory. Follow @lassoan suggestions.
