# Crop Volume Shutdown

**URL:** https://discourse.slicer.org/t/crop-volume-shutdown/10510
**Category:** Development
**Created:** [March 2, 2020, 10:51pm UTC](https://discourse.slicer.org/t/crop-volume-shutdown/10510 "2020-03-02T22:51:50Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![manjula](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/manjula/32/80981_2.png) [@manjula](https://discourse.slicer.org/u/manjula)
#### Post date: [March 2, 2020, 10:51pm UTC](https://discourse.slicer.org/t/crop-volume-shutdown/10510/1 "2020-03-02T22:51:50Z")

</div>

I am encountering rather strange behavior of 3D Slicer when it comes to cropping the volumes of .nii files. Most of the files that i am working are 3 GB +. I have recorded a clip of this rather strange behaviour.

1. Load the volume
2. Select ROI and save the scene
3. cropping volume ( interpolator linear or windowed sinc behave the same way)
4. 3D slicer shutdown in the middle but in the temporary folder can see the cropped volume (nrrd) file saved. (But 3D Slicer must be working in the background as the file is written after it is shutdown)
5. restart it and load the scene and do the same thing it works fine.

I was thinking this was happening due to running out of memory in my machine but is this something else ?

---

<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: [March 3, 2020, 1:24am UTC](https://discourse.slicer.org/t/crop-volume-shutdown/10510/2 "2020-03-03T01:24:11Z")

</div>

You need much more memory to keep the original volume in the scene and load the cropped volume as well, than just load the cropped volume in an empty scene. However, there should be no problem if you have enough virtual memory/swap space (10x more than the size of the data set - about 30GB).

---

<div class="post-metadata">

### Author: ![manjula](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/manjula/32/80981_2.png) [@manjula](https://discourse.slicer.org/u/manjula)
#### Post date: [March 3, 2020, 7:28am UTC](https://discourse.slicer.org/t/crop-volume-shutdown/10510/3 "2020-03-03T07:28:28Z")

</div>

Thank you for the explanation but how does it do it the second time around always with the same settings ?

---

<div class="post-metadata">

### Author: ![manjula](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/manjula/32/80981_2.png) [@manjula](https://discourse.slicer.org/u/manjula)
#### Post date: [March 3, 2020, 5:28pm UTC](https://discourse.slicer.org/t/crop-volume-shutdown/10510/4 "2020-03-03T17:28:03Z")

</div>

I think this is something to do with Linux Mint version i am using rather than swap space. I installed Elementary OS and with default swap of 1 gb this works. So guess it is something more to do with the OS.
