# Trouble: 3D Slicer hangs while saving big amount of data after registration

**URL:** https://discourse.slicer.org/t/trouble-3d-slicer-hangs-while-saving-big-amount-of-data-after-registration/2366
**Category:** Support
**Tags:** registration, file-export
**Created:** [March 19, 2018, 10:18pm UTC](https://discourse.slicer.org/t/trouble-3d-slicer-hangs-while-saving-big-amount-of-data-after-registration/2366 "2018-03-19T22:18:45Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![RomanKir](https://avatars.discourse-cdn.com/v4/letter/r/439d5e/32.png) [@RomanKir](https://discourse.slicer.org/u/RomanKir)
#### Post date: [March 19, 2018, 10:18pm UTC](https://discourse.slicer.org/t/trouble-3d-slicer-hangs-while-saving-big-amount-of-data-after-registration/2366/1 "2018-03-19T22:18:45Z")

</div>

Hello!

I have a trouble with saving files.  
The task I do is really simple. I load 2 files in Analyse format (.img, .hdr) and perform a Landmark-based registration. After hardening the transform I try to save my transformed file, but the app hangs and doesn’t responce (even in an hour).  
The problem appears definitely while saving, not during the transformation.

The computer configuration is that:  
Intel Server, 64GB RAM, Nvidia GTX1080, more than 4 TB free space. In ‘App Settings’ set Buffer size to 40Gb.  
Tested on another computer with 128Gb RAM. The same.

The size of data to load:  
2 (.img+.hdr) files, each 1241x847x529 pixels (around 1,45 GB)

Tryed to save in formats .nddr, .nii, .img+.hdr  
Nothing changed

With images that smaller in 1.5 times (501x280x353) everything is okey, the Slicer works and saves correctly. But I don’t want to resize images.

Could you please help me? Somehow

---

<div class="post-metadata">

### Author: ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)
#### Post date: [March 20, 2018, 7:16am UTC](https://discourse.slicer.org/t/trouble-3d-slicer-hangs-while-saving-big-amount-of-data-after-registration/2366/2 "2018-03-20T07:16:36Z")

</div>

Hi Roman -

It’s probably taking a long time to compress that big data. You could try unchecking the compress option in the save dialog (enable ‘show options’ first).

HTH,  
Steve

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

---

<div class="post-metadata">

### Author: ![RomanKir](https://avatars.discourse-cdn.com/v4/letter/r/439d5e/32.png) [@RomanKir](https://discourse.slicer.org/u/RomanKir)
#### Post date: [March 20, 2018, 8:58am UTC](https://discourse.slicer.org/t/trouble-3d-slicer-hangs-while-saving-big-amount-of-data-after-registration/2366/3 "2018-03-20T08:58:22Z")

</div>

Thank you for an idea. But, unfortunately, the same. Just hangs.  
I tried with 1241x847x529 pixels size images, saving in .img with no compress.

 ![Slicer_hangs](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/3/a3a305a65269c39f1aeee42331f0bfbb74e8f2ec.jpeg)

Could there be any other variants?  
Kind Regards,  
Roman

---

<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 20, 2018, 11:37am UTC](https://discourse.slicer.org/t/trouble-3d-slicer-hangs-while-saving-big-amount-of-data-after-registration/2366/4 "2018-03-20T11:37:40Z")

</div>

Have you tried other file formats, such as .nrrd or .mha?

---

<div class="post-metadata">

### Author: ![RomanKir](https://avatars.discourse-cdn.com/v4/letter/r/439d5e/32.png) [@RomanKir](https://discourse.slicer.org/u/RomanKir)
#### Post date: [June 2, 2018, 10:15am UTC](https://discourse.slicer.org/t/trouble-3d-slicer-hangs-while-saving-big-amount-of-data-after-registration/2366/5 "2018-06-02T10:15:33Z")

</div>

Hey!  
Sorry for so long, just forgot to write here.

I had a problem for saving a huge amount of data from Slicer 4.8.1 after landmark-based registration. I had a problem with .nii formats. Now the situation improved.

1. The idea of Steve Pieper to uncheck the “Compress” option worked, it helped a bit to increase the speed of saving.
2. I tested .mha, .nrrd formats, but they didn’t work properly, they also made Slicer hang during the saving process.
3. The only format worked for me was uncompressed .nhdr, which creates .raw files. With that I could save my files, decreased by 1.5. So, using .nhdr could be a solution to a problem of saving large files.

But there is another trouble.  
If I want to load the original resolution (2148x1437x500 pixels), the Slicer can’t load it from .nii format, it quits. How could I solve this problem?

Best Regards,  
Roman

---

<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: [June 2, 2018, 3:28pm UTC](https://discourse.slicer.org/t/trouble-3d-slicer-hangs-while-saving-big-amount-of-data-after-registration/2366/6 "2018-06-02T15:28:44Z")

</div>

You can try to convert using command line tools, such as unu. Or you may write a short ITK application that reads the nii image and writes as nhdr (it should be just a couple of lines of code). Even SimpleITK that is bundled with Slicer might work.

If all else fails, you can create nhdr headers for these nii files. You just have to make sure you set the file offset (header size) field so that it ignores the nifti header at the beginning of the file.

---

<div class="post-metadata">

### Author: ![RomanKir](https://avatars.discourse-cdn.com/v4/letter/r/439d5e/32.png) [@RomanKir](https://discourse.slicer.org/u/RomanKir)
#### Post date: [June 2, 2018, 8:53pm UTC](https://discourse.slicer.org/t/trouble-3d-slicer-hangs-while-saving-big-amount-of-data-after-registration/2366/7 "2018-06-02T20:53:17Z")

</div>

Thank you, that could be really a solution. I would try.

---

<div class="post-metadata">

### Author: ![ihnorton](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ihnorton/32/9_2.png) [@ihnorton](https://discourse.slicer.org/u/ihnorton)
#### Post date: [June 4, 2018, 5:14pm UTC](https://discourse.slicer.org/t/trouble-3d-slicer-hangs-while-saving-big-amount-of-data-after-registration/2366/8 "2018-06-04T17:14:53Z")

</div>

> [@RomanKir](#):
>
> If I want to load the original resolution (2148x1437x500 pixels), the Slicer can’t load it from .nii format, it quits.

That sounds like a bug, but I could not reproduce it on Mac: I saved an empty nii file with those dimensions (UInt16 array), and it loads fine in Slicer 4.8.1.

(there was a bug in the current nightly, which caused Slicer to hang for a long time when trying to read a large nifti image; I just submitted a patch for that to ITK)
