Spine Registration Helper Functions¶
- spine_reg.draw(I, xI=None, fig=None, function=numpy.sum, **kwargs)[source]¶
Generate a plot of ‘I’ along the 3 cardinal planes - Coronal, sagittal, and transverse.
Parameters:¶
- Iarray
A 3D image volume
- xIlist of array
A list of the coordinates along each dimension of I
- figmatplotlib.figure
A figure on which new plots will be generated
- functionPython function
Default - np.sum(), will produce a Maximum Intensity Projection; The function used to generate the 3 views of I.
Returns:¶
- axsnp.array of matplotlib.axes
Each element of axs contains 1 of the 3 cardinal views of I
- spine_reg.fromblocks(fphiIpp, Jdsize)[source]¶
…
Parameters:¶
- fphiIpp…
…
- Jdsizetorch.Tensor
The shape of the downsampled target data
Returns:¶
- output…
…
- spine_reg.getslice(I, ax)[source]¶
Return a 2D slice of the 3D image volume ‘I’
Parameters:¶
- Iarray
A 3D image volume
- axint
Options : -1, -2, -3; The axis of I from which a slice should be extracted
Returns:¶
A subset of I along the desired axis
- spine_reg.interp(xI, I, Xs, **kwargs)[source]¶
Interpolate …
Parameters:¶
- xIlist of array
A list of the coordinates along each dimension of I
- Iarray
A 3D image volume
- Xs…
…
Returns:¶
- outputtorch.Tensor
…
- spine_reg.interp1d(xI, squish, Xs, dd, **kwargs)[source]¶
Hack for 1D interpolation
Parameters:¶
- xIlist of array
A list of the coordinates along each dimension of I
- squish…
…
- Xs…
…
- dddict
A Python dictionary with 2 keys ‘device’ and ‘dtype’, which specifies those 2 PyTorch paremeters for computation
Returns:¶
- output…
…
- spine_reg.measure_matching_dot(qIU, wIU, phiiQJU, wphiiQJU, SigmaQIU)[source]¶
…
Parameters:¶
- qIU…
…
- wIU…
…
- phiiQJU…
…
- wphiiQJU…
…
- SigmaQIU…
…
Returns:¶
- output…
…