Running the following code snippet in the python interactor (or a linked Jupyter notebook) and then typing “interp_f” and hitting the Tab key reproducibly crashes Slicer.
from scipy.interpolate import RegularGridInterpolator import numpy as np data_kji = np.ones((10,20,30)) #arrayFromVolume(volNode) data_ijk = np.transpose(data_kji, axes=(2,1,0)) # reverse dimension order from kji to ijk iLen,jLen,kLen = data_ijk.shape iVals = list(range(iLen)) jVals = list(range(jLen)) kVals = list(range(kLen)) interp_from_ijk = RegularGridInterpolator((iVals, jVals, kVals), data_ijk)
If I don’t use Tab completion, I can use the interpolator just fine, e.g.
works as expected with no crash.
This crash occurs even after a clean Slicer start. It also occurs without being linked to a Jupyter kernel.