skan.pipe:: Pipeline functions for skeleton analysis#
- skan.pipe.process_images(filenames, image_format, threshold_radius, smooth_radius, brightness_offset, scale_metadata_path, crop_radius=0, smooth_method='Gaussian', num_threads=4)[source]#
Full pipeline from images to skeleton stats with local median threshold.
- Parameters:
filenames (list of string) β The list of input filenames.
image_format (string) β The format of the files. βautoβ is automatically determined by the imageio library. See imageio documentation for valid image formats.
threshold_radius (float) β The radius for median thresholding,
smooth_radius (float in [0, 1]) β The value of sigma with which to Gaussian-smooth the image, relative to `threshold_radius`.
brightness_offset (float) β The standard brightness value with which to threshold is the local median, m(x, y). Use this value to offset from there: the threshold used will be m(x, y) + brightness_offset.
scale_metadata_path (string) β The path in the image dictionary to find the metadata on pixel scale, separated by forward slashes (β/β).
crop_radius (int, optional) β Crop crop_radius pixels from each margin of the image before processing.
smooth_method ({'Gaussian', 'TV', 'NL'}, optional) β Which method to use for smoothing.
num_threads (int, optional) β How many threads to use for computation. This should generally be set to the number of CPU cores available to you.
- Returns:
results β The pipeline yields individual image results in the form of a tuple of
(filename, image, thresholded_image, skeleton, data_frame)
. Finally, after all the images have been processed, the pipeline yields a DataFrame containing all the collated branch-level results.- Return type:
generator