Projection along Z — epitools.analysis.projection#
This module contains functions to project 4D (TZYX) and 3D (ZYX) images along the z-dimension.
- epitools.analysis.projection.calculate_projection(input_image, smoothing_radius, surface_smoothness_1, surface_smoothness_2, cut_off_distance)#
Z projection using image interpolation.
Perfrom an iterative projection of 3D points along the z axis.
An initial projection is performed to obtain the ‘first estimated surface’. Points furtherthan
cut_off_distancefrom the first estimated surface will be ignored in the second projection step. This reduces noise from point that are far from the projected plane.- Parameters
input_image (numpy.ndarray[Any, numpy.dtype[numpy.float64]]) – Numpy ndarray representation of 4D or 3D image stack.
input_imageis assumed to have dimensions that correspond to TZYX or ZYX if it is 4D or 3D, respectively.smoothing_radius (float) – Kernel radius for gaussian blur to apply before estimating the surface.
surface_smoothness_1 (int) – Surface smoothness for 1st griddata estimation. Larger values will produce greater smoothing.
surface_smoothness_2 (int) – Surface smoothness for 2nd iteration of smoothing. Again, larger values will produce greater smoothing.
cut_off_distance (int) – Cutoff distance in z-planes from the first estimated surface.
- Returns
- np.NDArray
Timeseries of the image stack projected onto a single plane in z. The returned data will always be 4D - if the original data was 3D then there will be a single time slice and a single z slice.
- Return type
numpy.ndarray[Any, numpy.dtype[numpy.float64]]