QI2lab / napari-spot-detection

Detect diffraction limited spots in 2D and 3D, in standard or skewed microscopy images.
GNU General Public License v3.0
3 stars 0 forks source link

add hot pixel correction #4

Closed AlexCoul closed 1 year ago

AlexCoul commented 1 year ago

TODO: Add a widget that asks the user for the location of the dark field image and then runs the function.

def replace_hot_pixels(darkfield_image: Union[NDArray,ArrayLike],
                       data: Union[NDArray,ArrayLike]) -> Union[NDArray,ArrayLike]:
    """
    Replace hot pixels with mean values surrounding it

    Parameters
    ----------
    darkfield_image: Union[NDArray,ArrayLike]
        darkfield image for FISH channels
    data: Union[NDArray,ArrayLike]
        ND data [broadcast_dim,z,y,x]

    Returns
    -------
    corrected_data: Union[NDArray,ArrayLike]
        corrected data
    """
AlexCoul commented 1 year ago

I didn't have a dark image to test the functionality, @dpshepherd let me know if it works :-)