Extract the extension of the filename.
For files with the .gz suffix, the previous extension is returned as well.
This is needed e.g. for the compressed NIFTI format (.nii.gz).
- パラメータ:
- filename
str, Path The filename from which to extract the extension.
- 戻り値:
strThe extracted extension. For files with the .gz suffix, the previous
extension is returned as well.