napari_cellseg3d.utils#
Utilities functions, classes, and variables.
Functions
|
Aligns the sizes of two arrays by adding zeros to the smaller one. |
|
Computes the fraction of pixels above a certain value in a 4D volume for each channel. |
|
Rotates the axes 0 and 2 in [DHW] section of image array. |
|
De-normalizes the values of an image array to be between [0;255] rather than [0;1]. |
|
Compute Dice-Sorensen coefficient between two numpy arrays. |
|
Fills a list with n * elem between each member of list. |
|
Computes the fraction of pixels above a certain value in a volume. |
|
Returns a list of all files in a directory matching the pattern. |
|
Get date and time in the following format : year_month_day_hour_minute_second. |
|
Finds the nearest and superior power of two for each image dimension to zero-pad it for CNN processing. |
|
Get time in the following format : hour:minute:second. |
|
Get time in the following format : hour_minute_second. |
|
Loads the images in |
|
Creates a directory from a string path. |
|
Normalizes an image using the max and min value. |
|
Normalizes the values of an image array to be between [-1;1] rather than [0;255]. |
|
Normalizes the values of an image array to be between [0;1] rather than [0;255]. |
|
Returns a default path based on a vector of paths, some of which might be empty. |
|
Normalizes an image using the quantiles. |
|
Normalizes a numpy array or Tensor using the max and min value. |
|
Resizes an image using the zoom_factors. |
|
Saves a list of images in a folder. |
|
Saves an image layer at the specified path. |
|
Compute Dice-Sorensen coefficient between unsupervised model output and ground truth labels; returns the channel with the highest dice coefficient. |
|
Adds layers to a viewer to show result to user. |
|
Computes the sphericity from volume semi major (a) and semi minor (b) axes. |
|
Computes the sphericity from volume and area. |
|
Computes the time difference between two datetime objects. |
Classes
|
Singleton class that can only be instantiated once at a time, with said unique instance always being accessed on call. |