Skip to content

Commit

Permalink
Turning on compression for SimpleITK writer.
Browse files Browse the repository at this point in the history
When saving segmentation in nrrd format without compression the file
size is significantly larger than with compression, 20mb versus 19kb
for a 5000x4000 nrrd binary segmentation.
  • Loading branch information
yotamyaniv committed Oct 4, 2023
1 parent 508f81d commit 82e825d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nnunetv2/imageio/simpleitk_reader_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,4 @@ def write_seg(self, seg: np.ndarray, output_fname: str, properties: dict) -> Non
itk_image.SetOrigin(properties['sitk_stuff']['origin'])
itk_image.SetDirection(properties['sitk_stuff']['direction'])

sitk.WriteImage(itk_image, output_fname)
sitk.WriteImage(itk_image, output_fname, True)

0 comments on commit 82e825d

Please sign in to comment.