spatial_func#

property NDImage.spatial_func: Callable[[ArrayProtocol], ArrayProtocol] | None#

Get or set the function applied to the spatial slice after the window funcs, right before rendering. It is given the slice in display_dims order, i.e. the array as it is rendered, and must return an array with those same dims. Setting it recomputes the histogram, since the function often changes the range of the values.