ITK icon indicating copy to clipboard operation
ITK copied to clipboard

nii.zst support

Open chrisadamsonmcri opened this issue 1 year ago • 5 comments
trafficstars

Description

Add Zstd support for NIFTI files so that .nii.zst files can be read and written. Similar to issue #348. This would be great for compression/decompression speed and the file sizes are slightly smaller than those produced by Deflate.

chrisadamsonmcri avatar Feb 02 '24 05:02 chrisadamsonmcri

This might not be too hard. But this is the first time I hear about .nii.zst 😄

Anyway, it would be good if someone had the time to take this up.

dzenanz avatar Feb 02 '24 13:02 dzenanz

Has .zst support been added to the NIFTI standard?

BTW, there is .iwi.cbor.zst support in ITK-Wasm.

thewtex avatar Feb 02 '24 22:02 thewtex

Is a wrapping extension really anything to do with the standard? I would argue its a compression helper.

This is not like minc with built in blocked hdf5 compression, you need to uncompress the whole file to do anything with it.

gdevenyi avatar Feb 02 '24 22:02 gdevenyi

Most applications support .nii.gz, and if we want data created by one application to be used directly in another, then it is helpful to have its use standardized. Ideally explicitly, but at least as a standard by convention. .nii.gz is common and supported by ITK, nibabel, and others, but .nii.bz2, .nii.xz, .nii.zip are not. If the others were distributed, then to use them they have to be explicitly decompressed outside the application.

thewtex avatar Feb 04 '24 18:02 thewtex

I understand that it is not widely supported. But that is why I spammed other software boards with this suggestion :) For it to be useful, you are right, it would need to de facto standardized but I guess you have to start somewhere.

chrisadamsonmcri avatar Feb 06 '24 08:02 chrisadamsonmcri