Processing images using SimpleITK#

See also

import numpy as np
from skimage.io import imread
import napari_simpleitk_image_processing as nsitk
import stackview
blobs = imread('https://samples.fiji.sc/blobs.png')
stackview.insight(blobs)
shape(254, 256)
dtypeuint8
size63.5 kB
min8
max248

Median filter#

nsitk.median_filter(blobs, 5, 5, 0)
n-sitk made image
shape(254, 256)
dtypeuint8
size63.5 kB
min24
max248

Gaussian blur#

nsitk.gaussian_blur(blobs, 10, 10, 0)
n-sitk made image
shape(254, 256)
dtypeuint8
size63.5 kB
min28
max247

Edge enhancement / edge detection#

nsitk.laplacian_filter(blobs)
n-sitk made image
shape(254, 256)
dtypefloat64
size508.0 kB
min-88.0
max72.0
nsitk.laplacian_of_gaussian_filter(blobs, sigma=20)
n-sitk made image
shape(254, 256)
dtypefloat32
size254.0 kB
min-0.15148893
max0.0996153
nsitk.sobel(blobs)
n-sitk made image
shape(254, 256)
dtypefloat64
size508.0 kB
min0.0
max519.0761023202667
nsitk.gradient_magnitude(blobs)
n-sitk made image
shape(254, 256)
dtypefloat32
size254.0 kB
min0.0
max66.211784
nsitk.morphological_gradient(blobs)
n-sitk made image
shape(254, 256)
dtypeuint8
size63.5 kB
min0
max240
nsitk.standard_deviation_filter(blobs)