support .nii and .nii.gz by using the lib: gzip gunzip