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


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

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).



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

Could there be any other variants?
Kind Regards,

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

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,

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.

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

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)

1 Like