ANTsX / ANTsPy

A fast medical imaging analysis library in Python with algorithms for registration, segmentation, and more.
https://antspyx.readthedocs.io
Apache License 2.0
586 stars 161 forks source link

TruncateIntensity segfault #597

Closed stnava closed 3 months ago

stnava commented 3 months ago

PPMI-41289-20151201-T1w-643386.nii.gz

on osx using an older antspy on linux using @cookpa latest GitHub release python 3.9.*

import ants
img=ants.image_read("PPMI-41289-20151201-T1w-643386.nii.gz")
ants.iMath(img,'TruncateIntensity',0.01,0.995)

gives Segmentation fault: 11

the image has the wrong physical space info but opens / loads ok in snap etc.

cookpa commented 3 months ago

Reproducible on the command line

iMath 3 tmp.nii.gz TruncateIntensity PPMI-41289-20151201-T1w-643386.nii.gz 0.01 0.995
zsh: segmentation fault  iMath 3 tmp.nii.gz TruncateIntensity  0.01 0.995