Biomedical Image Analysis in Python
Stephen Bailey
Instructor
vol = imageio.volread('OAS1_0255')
vol.shape
(256, 256, 256)
vol_dn = ndi.zoom(vol, zoom=0.5)
vol_dn.shape
(128, 128, 128)
Resampling to a larger grid
Not the same as collecting higher-resolution data
Useful for standardizing sampling rates that are unequal
vol_up = ndi.zoom(vol, zoom=2)
vol_up.shape
(512, 512, 512)
$$ Interpolation\ in\ 1\ D $$
"Stitches together" grid points to model the space between points.
Nearest-neighbor: uses the closest measured value.
$$ Interpolation\ in\ 1\ D $$
"Stitches together" grid points to model the space between points.
Nearest-neighbor: uses the closest measured value.
order = 0
B-spline interpolation: models space between points with spline functions of a specified order.
order
is between 1
and 5
$$ Interpolation\ in\ 1\ D $$
im=np.arange(100).reshape([10,10])
zm1=ndi.zoom(im, zoom=10, order=0)
zm2=ndi.zoom(im, zoom=10, order=2)
zm3=ndi.zoom(im, zoom=10, order=4)
Biomedical Image Analysis in Python