skimage.util.apply_parallel(function, array)
Map a function in parallel across an array.
skimage.util.compare_images(image1, image2)
Return an image showing the differences between two images.
skimage.util.crop(ar, crop_width[, copy, order])
Crop array ar by crop_width along each dimension.
skimage.util.dtype_limits(image[, clip_negative])
Return intensity limits, i.e.
skimage.util.img_as_bool(image[, force_copy])
Convert an image to boolean format.
skimage.util.img_as_float(image[, force_copy])
Convert an image to floating point format.
skimage.util.img_as_float32(image[, force_copy])
Convert an image to single-precision (32-bit) floating point format.
skimage.util.img_as_float64(image[, force_copy])
Convert an image to double-precision (64-bit) floating point format.
skimage.util.img_as_int(image[, force_copy])
Convert an image to 16-bit signed integer format.
skimage.util.img_as_ubyte(image[, force_copy])
Convert an image to 8-bit unsigned integer format.
skimage.util.img_as_uint(image[, force_copy])
Convert an image to 16-bit unsigned integer format.
skimage.util.invert(image[, signed_float])
Invert an image.
skimage.util.map_array(input_arr, …[, out])
Map values from input array from input_vals to output_vals.
skimage.util.montage(arr_in[, fill, …])
Create a montage of several single- or multichannel images.
skimage.util.pad(array, pad_width[, mode])
Pad an array.
skimage.util.random_noise(image[, mode, …])
Function to add random noise of various types to a floating-point image.
skimage.util.regular_grid(ar_shape, n_points)
Find n_points regularly spaced along ar_shape.
skimage.util.regular_seeds(ar_shape, n_points)
Return an image with ~`n_points` regularly-spaced nonzero pixels.
skimage.util.unique_rows(ar)
Remove repeated rows from a 2D array.
skimage.util.view_as_blocks(arr_in, block_shape)
Block view of the input n-dimensional array (using re-striding).
skimage.util.view_as_windows(arr_in, …[, step])
Rolling window view of the input n-dimensional array.
Map a function in parallel across an array.
Split an array into possibly overlapping chunks of a given depth and boundary type, call the given function in parallel on the chunks, combine the chunks and return the resulting array.
Function to be mapped which takes an array as an argument.
Array which the function will be applied to.
A single integer is interpreted as the length of one side of a square chunk that should be tiled across the array. One tuple of length array.ndim represents the shape of a chunk, and it is tiled across the array. A list of tuples of length ndim, where each sub-tuple is a sequence of chunk sizes along the corresponding dimension. If None, the array is broken up into chunks based on the number of available cpus. More information about chunks is in the documentation here.
Integer equal to the depth of the added boundary cells. Defaults to zero.
type of external boundary padding.
Tuple of arguments to be passed to the function.
Dictionary of keyword arguments to be passed to the function.
The data-type of the function output. If None, Dask will attempt to infer this by calling the function on data of shape (1,) * ndim. For functions expecting RGB or multichannel data this may be problematic. In such cases, the user should manually specify this dtype argument instead.
New in version 0.18: dtype was added in 0.18.
If chunks is None and multichannel is True, this function will keep only a single chunk along the channels axis. When depth is specified as a scalar value, that depth will be applied only to the non-channels axes (a depth of 0 will be used along the channels axis). If the user manually specified both chunks and a depth tuple, then this argument will have no effect.
New in version 0.18: multichannel was added in 0.18.
If True, compute eagerly returning a NumPy Array. If False, compute lazily returning a Dask Array. If None (default), compute based on array type provided (eagerly for NumPy Arrays and lazily for Dask Arrays).
Returns the result of the applying the operation. Type is dependent on the compute argument.
Numpy edge modes ‘symmetric’, ‘wrap’, and ‘edge’ are converted to the equivalent dask boundary modes ‘reflect’, ‘periodic’ and ‘nearest’, respectively. Setting compute=False can be useful for chaining later operations. For example region selection to preview a result or storing large data to disk instead of loading in memory.
Return an image showing the differences between two images.
New in version 0.16.
Images to process, must be of the same shape.
Method used for the comparison. Valid values are {‘diff’, ‘blend’, ‘checkerboard’}. Details are provided in the note section.
Used only for the checkerboard method. Specifies the number of tiles (row, column) to divide the image.
Image showing the differences.
'diff' computes the absolute difference between the two images. 'blend' computes the mean value. 'checkerboard' makes tiles of dimension n_tiles that display alternatively the first and the second image.
Crop array ar by crop_width along each dimension.
Input array.
Number of values to remove from the edges of each axis. ((before_1, after_1), … (before_N, after_N)) specifies unique crop widths at the start and end of each axis. ((before, after),) or (before, after) specifies a fixed start and end crop for every axis. (n,) or n for integer n is a shortcut for before = after = n for all axes.
If True, ensure the returned array is a contiguous copy. Normally, a crop operation will return a discontiguous view of the underlying input array.
If copy==True, control the memory layout of the copy. See np.copy.
The cropped array. If copy=False (default), this is a sliced view of the input array.
Return intensity limits, i.e. (min, max) tuple, of the image’s dtype.
Input image.
If True, clip the negative range (i.e. return 0 for min intensity) even if the image dtype allows negative values.
Lower and upper intensity limits.
Convert an image to boolean format.
Input image.
Force a copy of the data, irrespective of its current dtype.
Output image.
The upper half of the input dtype’s positive range is True, and the lower half is False. All negative values (if present) are False.
Convert an image to floating point format.
This function is similar to img_as_float64, but will not convert lower-precision floating point arrays to float64.
Input image.
Force a copy of the data, irrespective of its current dtype.
Output image.
The range of a floating point image is [0.0, 1.0] or [-1.0, 1.0] when converting from unsigned or signed datatypes, respectively. If the input image has a float type, intensity values are not modified and can be outside the ranges [0.0, 1.0] or [-1.0, 1.0].
Convert an image to single-precision (32-bit) floating point format.
Input image.
Force a copy of the data, irrespective of its current dtype.
Output image.
The range of a floating point image is [0.0, 1.0] or [-1.0, 1.0] when converting from unsigned or signed datatypes, respectively. If the input image has a float type, intensity values are not modified and can be outside the ranges [0.0, 1.0] or [-1.0, 1.0].
Convert an image to double-precision (64-bit) floating point format.
Input image.
Force a copy of the data, irrespective of its current dtype.
Output image.
The range of a floating point image is [0.0, 1.0] or [-1.0, 1.0] when converting from unsigned or signed datatypes, respectively. If the input image has a float type, intensity values are not modified and can be outside the ranges [0.0, 1.0] or [-1.0, 1.0].
Convert an image to 16-bit signed integer format.
Input image.
Force a copy of the data, irrespective of its current dtype.
Output image.
The values are scaled between -32768 and 32767. If the input data-type is positive-only (e.g., uint8), then the output image will still only have positive values.
Convert an image to 8-bit unsigned integer format.
Input image.
Force a copy of the data, irrespective of its current dtype.
Output image.
Negative input values will be clipped. Positive values are scaled between 0 and 255.
Convert an image to 16-bit unsigned integer format.
Input image.
Force a copy of the data, irrespective of its current dtype.
Output image.
Negative input values will be clipped. Positive values are scaled between 0 and 65535.
Invert an image.
Invert the intensity range of the input image, so that the dtype maximum is now the dtype minimum, and vice-versa. This operation is slightly different depending on the input dtype:
See the examples for clarification.
Input image.
If True and the image is of type float, the range is assumed to be [-1, 1]. If False and the image is of type float, the range is assumed to be [0, 1].
Inverted image.
Ideally, for signed integers we would simply multiply by -1. However, signed integer ranges are asymmetric. For example, for np.int8, the range of possible values is [-128, 127], so that -128 * -1 equals -128! By subtracting from -1, we correctly map the maximum dtype value to the minimum.
Use rolling-ball algorithm for estimating background intensity
Map values from input array from input_vals to output_vals.
The input label image.
The values to map from.
The values to map to.
The output array. Will be created if not provided. It should have the same dtype as output_vals.
The array of mapped values.
Create a montage of several single- or multichannel images.
Create a rectangular montage from an input array representing an ensemble of equally shaped single- (gray) or multichannel (color) images.
For example, montage(arr_in) called with the following arr_in
1
2
3
will return
1
2
3
where the ‘*’ patch will be determined by the fill parameter.
An array representing an ensemble of K images of equal shape.
Value to fill the padding areas and/or the extra tiles in the output array. Has to be float for single channel collections. For multichannel collections has to be an array-like of shape of number of channels. If mean, uses the mean value over all images.
Whether to rescale the intensity of each image to [0, 1].
The desired grid shape for the montage (ntiles_row, ntiles_column). The default aspect ratio is square.
The size of the spacing between the tiles and between the tiles and the borders. If non-zero, makes the boundaries of individual images easier to perceive.
If True, the last arr_in dimension is threated as a color channel, otherwise as spatial.
Output array with input images glued together (including padding p).
Pad an array.
The array to pad.
Number of values padded to the edges of each axis. ((before_1, after_1), … (before_N, after_N)) unique pad widths for each axis. ((before, after),) yields same before and after pad for each axis. (pad,) or int is a shortcut for before = after = pad width for all axes.
One of the following string values or a user supplied function.
Pads with a constant value.
Pads with the edge values of array.
Pads with the linear ramp between end_value and the array edge value.
Pads with the maximum value of all or part of the vector along each axis.
Pads with the mean value of all or part of the vector along each axis.
Pads with the median value of all or part of the vector along each axis.
Pads with the minimum value of all or part of the vector along each axis.
Pads with the reflection of the vector mirrored on the first and last values of the vector along each axis.
Pads with the reflection of the vector mirrored along the edge of the array.
Pads with the wrap of the vector along the axis. The first values are used to pad the end and the end values are used to pad the beginning.
Pads with undefined values.
New in version 1.17.
Padding function, see Notes.
Used in ‘maximum’, ‘mean’, ‘median’, and ‘minimum’. Number of values at edge of each axis used to calculate the statistic value.
((before_1, after_1), … (before_N, after_N)) unique statistic lengths for each axis.
((before, after),) yields same before and after statistic lengths for each axis.
(stat_length,) or int is a shortcut for before = after = statistic length for all axes.
Default is None, to use the entire axis.
Used in ‘constant’. The values to set the padded values for each axis.
((before_1, after_1), ... (before_N, after_N)) unique pad constants for each axis.
((before, after),) yields same before and after constants for each axis.
(constant,) or constant is a shortcut for before = after = constant for all axes.
Default is 0.
Used in ‘linear_ramp’. The values used for the ending value of the linear_ramp and that will form the edge of the padded array.
((before_1, after_1), ... (before_N, after_N)) unique end values for each axis.
((before, after),) yields same before and after end values for each axis.
(constant,) or constant is a shortcut for before = after = constant for all axes.
Default is 0.
Used in ‘reflect’, and ‘symmetric’. The ‘even’ style is the default with an unaltered reflection around the edge value. For the ‘odd’ style, the extended part of the array is created by subtracting the reflected values from two times the edge value.
Padded array of rank equal to array with shape increased according to pad_width.
New in version 1.7.0.
For an array with rank greater than 1, some of the padding of later axes is calculated from padding of previous axes. This is easiest to think about with a rank 2 array where the corners of the padded array are calculated by using padded values from the first axis.
The padding function, if used, should modify a rank 1 array in-place. It has the following signature:
where
A rank 1 array already padded with zeros. Padded values are vector[:iaxis_pad_width[0]] and vector[-iaxis_pad_width[1]:].
A 2-tuple of ints, iaxis_pad_width[0] represents the number of values padded at the beginning of vector where iaxis_pad_width[1] represents the number of values padded at the end of vector.
The axis currently being calculated.
Any keyword arguments the function requires.
Function to add random noise of various types to a floating-point image.
Input image data. Will be converted to float.
One of the following strings, selecting the type of noise to add:
local variance at each point of image.
-1 (for signed images).
low_val is 0 for unsigned images or -1 for signed images.
n is Gaussian noise with specified mean & variance.
If provided, this will set the random seed before generating noise, for valid pseudo-random comparisons.
If True (default), the output will be clipped after noise applied for modes ‘speckle’, ‘poisson’, and ‘gaussian’. This is needed to maintain the proper image data range. If False, clipping is not applied, and the output may extend beyond the range [-1, 1].
Mean of random distribution. Used in ‘gaussian’ and ‘speckle’. Default : 0.
Variance of random distribution. Used in ‘gaussian’ and ‘speckle’. Note: variance = (standard deviation) ** 2. Default : 0.01
Array of positive floats, same shape as image, defining the local variance at every image point. Used in ‘localvar’.
Proportion of image pixels to replace with noise on range [0, 1]. Used in ‘salt’, ‘pepper’, and ‘salt & pepper’. Default : 0.05
Proportion of salt vs. pepper noise for ‘s&p’ on range [0, 1]. Higher values represent more salt. Default : 0.5 (equal amounts)
Output floating-point image data on range [0, 1] or [-1, 1] if the input image was unsigned or signed, respectively.
Speckle, Poisson, Localvar, and Gaussian noise may generate noise outside the valid image range. The default is to clip (not alias) these values, but they may be preserved by setting clip=False. Note that in this case the output may contain values outside the ranges [0, 1] or [-1, 1]. Use this option with care.
Because of the prevalence of exclusively positive floating-point images in intermediate calculations, it is not possible to intuit if an input is signed based on dtype alone. Instead, negative values are explicitly searched for. Only if found does this function assume signed input. Unexpected results only occur in rare, poorly exposes cases (e.g. if all values are above 50 percent gray in a signed image). In this event, manually scaling the input to the positive domain will solve the problem.
The Poisson distribution is only defined for positive integers. To apply this noise type, the number of unique values in the image is found and the next round power of two is used to scale up the floating-point result, after which it is scaled back down to the floating-point image range.
To generate Poisson noise against a signed image, the signed image is temporarily converted to an unsigned image in the floating point domain, Poisson noise is generated, then it is returned to the original range.
Find n_points regularly spaced along ar_shape.
The returned points (as slices) should be as close to cubically-spaced as possible. Essentially, the points are spaced by the Nth root of the input array size, where N is the number of dimensions. However, if an array dimension cannot fit a full step size, it is “discarded”, and the computation is done for only the remaining dimensions.
The shape of the space embedding the grid. len(ar_shape) is the number of dimensions.
The (approximate) number of points to embed in the space.
A slice along each dimension of ar_shape, such that the intersection of all the slices give the coordinates of regularly spaced points.
Changed in version 0.14.1: In scikit-image 0.14.1 and 0.15, the return type was changed from a list to a tuple to ensure compatibility with Numpy 1.15 and higher. If your code requires the returned result to be a list, you may convert the output of this function to a list with:
Return an image with ~`n_points` regularly-spaced nonzero pixels.
The shape of the desired output image.
The desired number of nonzero points.
The desired data type of the output.
The desired image.
Remove repeated rows from a 2D array.
In particular, if given an array of coordinates of shape (Npoints, Ndim), it will remove repeated points.
The input array.
A copy of the input array with repeated rows removed.
The function will generate a copy of ar if it is not C-contiguous, which will negatively affect performance for large input arrays.
Block view of the input n-dimensional array (using re-striding).
Blocks are non-overlapping views of the input array.
N-d input array.
The shape of the block. Each dimension must divide evenly into the corresponding dimensions of arr_in.
Block view of the input array.
Rolling window view of the input n-dimensional array.
Windows are overlapping views of the input array, with adjacent windows shifted by a single row or column (or an index of a higher dimension).
N-d input array.
Defines the shape of the elementary n-dimensional orthotope (better know as hyperrectangle [1]) of the rolling window view. If an integer is given, the shape will be a hypercube of sidelength given by its value.
Indicates step size at which extraction shall be performed. If integer is given, then the step is uniform in all dimensions.
(rolling) window view of the input array.
One should be very careful with rolling views when it comes to memory usage. Indeed, although a ‘view’ has the same memory footprint as its base array, the actual array that emerges when this ‘view’ is used in a computation is generally a (much) larger array than the original, especially for 2-dimensional arrays and above.
For example, let us consider a 3 dimensional array of size (100, 100, 100) of float64. This array takes about 8*100**3 Bytes for storage which is just 8 MB. If one decides to build a rolling view on this array with a window of (3, 3, 3) the hypothetical size of the rolling view (if one was to reshape the view for example) would be 8*(100-3+1)**3*3**3 which is about 203 MB! The scaling becomes even worse as the dimension of the input array becomes larger.
https://en.wikipedia.org/wiki/Hyperrectangle


Map a function in parallel across an array.
Split an array into possibly overlapping chunks of a given depth and boundary type, call the given function in parallel on the chunks, combine the chunks and return the resulting array.
Function to be mapped which takes an array as an argument.
Array which the function will be applied to.
A single integer is interpreted as the length of one side of a square chunk that should be tiled across the array. One tuple of length array.ndim represents the shape of a chunk, and it is tiled across the array. A list of tuples of length ndim, where each sub-tuple is a sequence of chunk sizes along the corresponding dimension. If None, the array is broken up into chunks based on the number of available cpus. More information about chunks is in the documentation here.
Integer equal to the depth of the added boundary cells. Defaults to zero.
type of external boundary padding.
Tuple of arguments to be passed to the function.
Dictionary of keyword arguments to be passed to the function.
The data-type of the function output. If None, Dask will attempt to infer this by calling the function on data of shape (1,) * ndim. For functions expecting RGB or multichannel data this may be problematic. In such cases, the user should manually specify this dtype argument instead.
New in version 0.18: dtype was added in 0.18.
If chunks is None and multichannel is True, this function will keep only a single chunk along the channels axis. When depth is specified as a scalar value, that depth will be applied only to the non-channels axes (a depth of 0 will be used along the channels axis). If the user manually specified both chunks and a depth tuple, then this argument will have no effect.
New in version 0.18: multichannel was added in 0.18.
If True, compute eagerly returning a NumPy Array. If False, compute lazily returning a Dask Array. If None (default), compute based on array type provided (eagerly for NumPy Arrays and lazily for Dask Arrays).
Returns the result of the applying the operation. Type is dependent on the compute argument.
Numpy edge modes ‘symmetric’, ‘wrap’, and ‘edge’ are converted to the equivalent dask boundary modes ‘reflect’, ‘periodic’ and ‘nearest’, respectively. Setting compute=False can be useful for chaining later operations. For example region selection to preview a result or storing large data to disk instead of loading in memory.


Return an image showing the differences between two images.
New in version 0.16.
Images to process, must be of the same shape.
Method used for the comparison. Valid values are {‘diff’, ‘blend’, ‘checkerboard’}. Details are provided in the note section.
Used only for the checkerboard method. Specifies the number of tiles (row, column) to divide the image.
Image showing the differences.
'diff' computes the absolute difference between the two images. 'blend' computes the mean value. 'checkerboard' makes tiles of dimension n_tiles that display alternatively the first and the second image.


Crop array ar by crop_width along each dimension.
Input array.
Number of values to remove from the edges of each axis. ((before_1, after_1), … (before_N, after_N)) specifies unique crop widths at the start and end of each axis. ((before, after),) or (before, after) specifies a fixed start and end crop for every axis. (n,) or n for integer n is a shortcut for before = after = n for all axes.
If True, ensure the returned array is a contiguous copy. Normally, a crop operation will return a discontiguous view of the underlying input array.
If copy==True, control the memory layout of the copy. See np.copy.
The cropped array. If copy=False (default), this is a sliced view of the input array.


Return intensity limits, i.e. (min, max) tuple, of the image’s dtype.
Input image.
If True, clip the negative range (i.e. return 0 for min intensity) even if the image dtype allows negative values.
Lower and upper intensity limits.


Convert an image to boolean format.
Input image.
Force a copy of the data, irrespective of its current dtype.
Output image.
The upper half of the input dtype’s positive range is True, and the lower half is False. All negative values (if present) are False.


Convert an image to floating point format.
This function is similar to img_as_float64, but will not convert lower-precision floating point arrays to float64.
Input image.
Force a copy of the data, irrespective of its current dtype.
Output image.
The range of a floating point image is [0.0, 1.0] or [-1.0, 1.0] when converting from unsigned or signed datatypes, respectively. If the input image has a float type, intensity values are not modified and can be outside the ranges [0.0, 1.0] or [-1.0, 1.0].


Convert an image to single-precision (32-bit) floating point format.
Input image.
Force a copy of the data, irrespective of its current dtype.
Output image.
The range of a floating point image is [0.0, 1.0] or [-1.0, 1.0] when converting from unsigned or signed datatypes, respectively. If the input image has a float type, intensity values are not modified and can be outside the ranges [0.0, 1.0] or [-1.0, 1.0].


Convert an image to double-precision (64-bit) floating point format.
Input image.
Force a copy of the data, irrespective of its current dtype.
Output image.
The range of a floating point image is [0.0, 1.0] or [-1.0, 1.0] when converting from unsigned or signed datatypes, respectively. If the input image has a float type, intensity values are not modified and can be outside the ranges [0.0, 1.0] or [-1.0, 1.0].


Convert an image to 16-bit signed integer format.
Input image.
Force a copy of the data, irrespective of its current dtype.
Output image.
The values are scaled between -32768 and 32767. If the input data-type is positive-only (e.g., uint8), then the output image will still only have positive values.


Convert an image to 8-bit unsigned integer format.
Input image.
Force a copy of the data, irrespective of its current dtype.
Output image.
Negative input values will be clipped. Positive values are scaled between 0 and 255.


Convert an image to 16-bit unsigned integer format.
Input image.
Force a copy of the data, irrespective of its current dtype.
Output image.
Negative input values will be clipped. Positive values are scaled between 0 and 65535.


Invert an image.
Invert the intensity range of the input image, so that the dtype maximum is now the dtype minimum, and vice-versa. This operation is slightly different depending on the input dtype:
See the examples for clarification.
Input image.
If True and the image is of type float, the range is assumed to be [-1, 1]. If False and the image is of type float, the range is assumed to be [0, 1].
Inverted image.
Ideally, for signed integers we would simply multiply by -1. However, signed integer ranges are asymmetric. For example, for np.int8, the range of possible values is [-128, 127], so that -128 * -1 equals -128! By subtracting from -1, we correctly map the maximum dtype value to the minimum.


Map values from input array from input_vals to output_vals.
The input label image.
The values to map from.
The values to map to.
The output array. Will be created if not provided. It should have the same dtype as output_vals.
The array of mapped values.


Create a montage of several single- or multichannel images.
Create a rectangular montage from an input array representing an ensemble of equally shaped single- (gray) or multichannel (color) images.
For example, montage(arr_in) called with the following arr_in
1
2
3
will return
1
2
3
where the ‘*’ patch will be determined by the fill parameter.
An array representing an ensemble of K images of equal shape.
Value to fill the padding areas and/or the extra tiles in the output array. Has to be float for single channel collections. For multichannel collections has to be an array-like of shape of number of channels. If mean, uses the mean value over all images.
Whether to rescale the intensity of each image to [0, 1].
The desired grid shape for the montage (ntiles_row, ntiles_column). The default aspect ratio is square.
The size of the spacing between the tiles and between the tiles and the borders. If non-zero, makes the boundaries of individual images easier to perceive.
If True, the last arr_in dimension is threated as a color channel, otherwise as spatial.
Output array with input images glued together (including padding p).


Pad an array.
The array to pad.
Number of values padded to the edges of each axis. ((before_1, after_1), … (before_N, after_N)) unique pad widths for each axis. ((before, after),) yields same before and after pad for each axis. (pad,) or int is a shortcut for before = after = pad width for all axes.
One of the following string values or a user supplied function.
Pads with a constant value.
Pads with the edge values of array.
Pads with the linear ramp between end_value and the array edge value.
Pads with the maximum value of all or part of the vector along each axis.
Pads with the mean value of all or part of the vector along each axis.
Pads with the median value of all or part of the vector along each axis.
Pads with the minimum value of all or part of the vector along each axis.
Pads with the reflection of the vector mirrored on the first and last values of the vector along each axis.
Pads with the reflection of the vector mirrored along the edge of the array.
Pads with the wrap of the vector along the axis. The first values are used to pad the end and the end values are used to pad the beginning.
Pads with undefined values.
New in version 1.17.
Padding function, see Notes.
Used in ‘maximum’, ‘mean’, ‘median’, and ‘minimum’. Number of values at edge of each axis used to calculate the statistic value.
((before_1, after_1), … (before_N, after_N)) unique statistic lengths for each axis.
((before, after),) yields same before and after statistic lengths for each axis.
(stat_length,) or int is a shortcut for before = after = statistic length for all axes.
Default is None, to use the entire axis.
Used in ‘constant’. The values to set the padded values for each axis.
((before_1, after_1), ... (before_N, after_N)) unique pad constants for each axis.
((before, after),) yields same before and after constants for each axis.
(constant,) or constant is a shortcut for before = after = constant for all axes.
Default is 0.
Used in ‘linear_ramp’. The values used for the ending value of the linear_ramp and that will form the edge of the padded array.
((before_1, after_1), ... (before_N, after_N)) unique end values for each axis.
((before, after),) yields same before and after end values for each axis.
(constant,) or constant is a shortcut for before = after = constant for all axes.
Default is 0.
Used in ‘reflect’, and ‘symmetric’. The ‘even’ style is the default with an unaltered reflection around the edge value. For the ‘odd’ style, the extended part of the array is created by subtracting the reflected values from two times the edge value.
Padded array of rank equal to array with shape increased according to pad_width.
New in version 1.7.0.
For an array with rank greater than 1, some of the padding of later axes is calculated from padding of previous axes. This is easiest to think about with a rank 2 array where the corners of the padded array are calculated by using padded values from the first axis.
The padding function, if used, should modify a rank 1 array in-place. It has the following signature:
where
A rank 1 array already padded with zeros. Padded values are vector[:iaxis_pad_width[0]] and vector[-iaxis_pad_width[1]:].
A 2-tuple of ints, iaxis_pad_width[0] represents the number of values padded at the beginning of vector where iaxis_pad_width[1] represents the number of values padded at the end of vector.
The axis currently being calculated.
Any keyword arguments the function requires.


Function to add random noise of various types to a floating-point image.
Input image data. Will be converted to float.
One of the following strings, selecting the type of noise to add:
local variance at each point of image.
-1 (for signed images).
low_val is 0 for unsigned images or -1 for signed images.
n is Gaussian noise with specified mean & variance.
If provided, this will set the random seed before generating noise, for valid pseudo-random comparisons.
If True (default), the output will be clipped after noise applied for modes ‘speckle’, ‘poisson’, and ‘gaussian’. This is needed to maintain the proper image data range. If False, clipping is not applied, and the output may extend beyond the range [-1, 1].
Mean of random distribution. Used in ‘gaussian’ and ‘speckle’. Default : 0.
Variance of random distribution. Used in ‘gaussian’ and ‘speckle’. Note: variance = (standard deviation) ** 2. Default : 0.01
Array of positive floats, same shape as image, defining the local variance at every image point. Used in ‘localvar’.
Proportion of image pixels to replace with noise on range [0, 1]. Used in ‘salt’, ‘pepper’, and ‘salt & pepper’. Default : 0.05
Proportion of salt vs. pepper noise for ‘s&p’ on range [0, 1]. Higher values represent more salt. Default : 0.5 (equal amounts)
Output floating-point image data on range [0, 1] or [-1, 1] if the input image was unsigned or signed, respectively.
Speckle, Poisson, Localvar, and Gaussian noise may generate noise outside the valid image range. The default is to clip (not alias) these values, but they may be preserved by setting clip=False. Note that in this case the output may contain values outside the ranges [0, 1] or [-1, 1]. Use this option with care.
Because of the prevalence of exclusively positive floating-point images in intermediate calculations, it is not possible to intuit if an input is signed based on dtype alone. Instead, negative values are explicitly searched for. Only if found does this function assume signed input. Unexpected results only occur in rare, poorly exposes cases (e.g. if all values are above 50 percent gray in a signed image). In this event, manually scaling the input to the positive domain will solve the problem.
The Poisson distribution is only defined for positive integers. To apply this noise type, the number of unique values in the image is found and the next round power of two is used to scale up the floating-point result, after which it is scaled back down to the floating-point image range.
To generate Poisson noise against a signed image, the signed image is temporarily converted to an unsigned image in the floating point domain, Poisson noise is generated, then it is returned to the original range.


Find n_points regularly spaced along ar_shape.
The returned points (as slices) should be as close to cubically-spaced as possible. Essentially, the points are spaced by the Nth root of the input array size, where N is the number of dimensions. However, if an array dimension cannot fit a full step size, it is “discarded”, and the computation is done for only the remaining dimensions.
The shape of the space embedding the grid. len(ar_shape) is the number of dimensions.
The (approximate) number of points to embed in the space.
A slice along each dimension of ar_shape, such that the intersection of all the slices give the coordinates of regularly spaced points.
Changed in version 0.14.1: In scikit-image 0.14.1 and 0.15, the return type was changed from a list to a tuple to ensure compatibility with Numpy 1.15 and higher. If your code requires the returned result to be a list, you may convert the output of this function to a list with:


Return an image with ~`n_points` regularly-spaced nonzero pixels.
The shape of the desired output image.
The desired number of nonzero points.
The desired data type of the output.
The desired image.


Remove repeated rows from a 2D array.
In particular, if given an array of coordinates of shape (Npoints, Ndim), it will remove repeated points.
The input array.
A copy of the input array with repeated rows removed.
The function will generate a copy of ar if it is not C-contiguous, which will negatively affect performance for large input arrays.


Block view of the input n-dimensional array (using re-striding).
Blocks are non-overlapping views of the input array.
N-d input array.
The shape of the block. Each dimension must divide evenly into the corresponding dimensions of arr_in.
Block view of the input array.


Rolling window view of the input n-dimensional array.
Windows are overlapping views of the input array, with adjacent windows shifted by a single row or column (or an index of a higher dimension).
N-d input array.
Defines the shape of the elementary n-dimensional orthotope (better know as hyperrectangle [1]) of the rolling window view. If an integer is given, the shape will be a hypercube of sidelength given by its value.
Indicates step size at which extraction shall be performed. If integer is given, then the step is uniform in all dimensions.
(rolling) window view of the input array.
One should be very careful with rolling views when it comes to memory usage. Indeed, although a ‘view’ has the same memory footprint as its base array, the actual array that emerges when this ‘view’ is used in a computation is generally a (much) larger array than the original, especially for 2-dimensional arrays and above.
For example, let us consider a 3 dimensional array of size (100, 100, 100) of float64. This array takes about 8*100**3 Bytes for storage which is just 8 MB. If one decides to build a rolling view on this array with a window of (3, 3, 3) the hypothetical size of the rolling view (if one was to reshape the view for example) would be 8*(100-3+1)**3*3**3 which is about 203 MB! The scaling becomes even worse as the dimension of the input array becomes larger.
https://en.wikipedia.org/wiki/Hyperrectangle


skimage.viewer.CollectionViewer(image_collection)
Viewer for displaying image collections.
skimage.viewer.ImageViewer(image[, useblit])
Viewer for displaying images.
skimage.viewer.canvastools
skimage.viewer.plugins
skimage.viewer.qt
skimage.viewer.utils
skimage.viewer.viewers
skimage.viewer.widgets
Widgets for interacting with ImageViewer.
Bases: skimage.viewer.viewers.core.ImageViewer
Viewer for displaying image collections.
Select the displayed frame of the image collection using the slider or with the following keyboard shortcuts:
Previous/next image in collection.
0% to 90% of collection. For example, “5” goes to the image in the middle (i.e. 50%) of the collection.
First/last image in collection.
List of images to be displayed.
Control whether image is updated on slide or release of the image slider. Using ‘on_release’ will give smoother behavior when displaying large images or when writing a plugin/subclass that requires heavy computation.
Initialize self. See help(type(self)) for accurate signature.
Select image on display using index into image collection.
Bases: object
Viewer for displaying images.
This viewer is a simple container object that holds a Matplotlib axes for showing images. ImageViewer doesn’t subclass the Matplotlib axes (or figure) because of the high probability of name collisions.
Subclasses and plugins will likely extend the update_image method to add custom overlays or filter the displayed image.
Image being viewed.
Matplotlib canvas, figure, and axes used to display image.
Image being viewed. Setting this value will update the displayed frame.
Plugins typically operate on (but don’t change) the original image.
List of attached plugins.
Initialize self. See help(type(self)) for accurate signature.
Connect callback function to matplotlib event and return id.
Disconnect callback by its id (returned by connect_event).
Open image file and display in viewer.
Save current image to file.
The current behavior is not ideal: It saves the image displayed on screen, so all images will be converted to RGB, and the image size is not preserved (resizing the viewer window will alter the size of the saved image).
Show ImageViewer and attached plugins.
This behaves much like matplotlib.pyplot.show and QWidget.show.
Update displayed image.
This method can be overridden or extended in subclasses and plugins to react to image changes.


skimage.viewer.canvastools.LineTool(manager)
Widget for line selection in a plot.
skimage.viewer.canvastools.PaintTool(…[, …])
Widget for painting on top of a plot.
skimage.viewer.canvastools.RectangleTool(manager)
Widget for selecting a rectangular region in a plot.
skimage.viewer.canvastools.ThickLineTool(manager)
Widget for line selection in a plot.
skimage.viewer.canvastools.base
skimage.viewer.canvastools.linetool
skimage.viewer.canvastools.painttool
skimage.viewer.canvastools.recttool
Bases: skimage.viewer.canvastools.base.CanvasToolBase
Widget for line selection in a plot.
Skimage viewer or plot plugin object.
Function called whenever a control handle is moved. This function must accept the end points of line as the only argument.
Function called whenever the control handle is released.
Function called whenever the “enter” key is pressed.
Maximum pixel distance allowed when selecting control handle.
Properties for matplotlib.lines.Line2D.
Marker properties for the handles (also see matplotlib.lines.Line2D).
End points of line ((x1, y1), (x2, y2)).
Initialize self. See help(type(self)) for accurate signature.
Geometry information that gets passed to callback functions.
Bases: skimage.viewer.canvastools.base.CanvasToolBase
Widget for painting on top of a plot.
Skimage viewer or plot plugin object.
2D shape tuple used to initialize overlay image.
The size of the paint cursor.
Opacity of overlay.
Function called whenever a control handle is moved. This function must accept the end points of line as the only argument.
Function called whenever the control handle is released.
Function called whenever the “enter” key is pressed.
Properties for matplotlib.patches.Rectangle. This class redefines defaults in matplotlib.widgets.RectangleSelector.
Overlay of painted labels displayed on top of image.
Current paint color.
Initialize self. See help(type(self)) for accurate signature.
Geometry information that gets passed to callback functions.
Bases: skimage.viewer.canvastools.base.CanvasToolBase, matplotlib.widgets.RectangleSelector
Widget for selecting a rectangular region in a plot.
After making the desired selection, press “Enter” to accept the selection and call the on_enter callback function.
Skimage viewer or plot plugin object.
Function called whenever a control handle is moved. This function must accept the rectangle extents as the only argument.
Function called whenever the control handle is released.
Function called whenever the “enter” key is pressed.
Maximum pixel distance allowed when selecting control handle.
Properties for matplotlib.patches.Rectangle. This class redefines defaults in matplotlib.widgets.RectangleSelector.
Return (xmin, xmax, ymin, ymax).
The parent axes for the widget.
A callback function that is called after a selection is completed. It must have the signature:
where eclick and erelease are the mouse click and release MouseEvents that start and complete the selection.
Whether to draw the full rectangle box, the diagonal line of the rectangle, or nothing at all.
Selections with an x-span less than minspanx are ignored.
Selections with an y-span less than minspany are ignored.
Whether to use blitting for faster drawing (if supported by the backend).
Properties with which the line is drawn, if drawtype == "line". Default:
Properties with which the rectangle is drawn, if drawtype ==
"box". Default:
Whether to interpret minspanx and minspany in data or in pixel coordinates.
Button(s) that trigger rectangle selection.
Distance in pixels within which the interactive tool handles can be activated.
Properties with which the interactive handles are drawn. Currently not implemented and ignored.
Whether to draw a set of handles that allow interaction with the widget after it is drawn.
Keyboard modifiers which affect the widget’s behavior. Values amend the defaults.
“square” and “center” can be combined.
Corners of rectangle from lower left, moving clockwise.
Midpoint of rectangle edges from left, moving clockwise.
Return (xmin, xmax, ymin, ymax).
Geometry information that gets passed to callback functions.
Bases: skimage.viewer.canvastools.linetool.LineTool
Widget for line selection in a plot.
The thickness of the line can be varied using the mouse scroll wheel, or with the ‘+’ and ‘-‘ keys.
Skimage viewer or plot plugin object.
Function called whenever a control handle is moved. This function must accept the end points of line as the only argument.
Function called whenever the control handle is released.
Function called whenever the “enter” key is pressed.
Function called whenever the line thickness is changed.
Maximum pixel distance allowed when selecting control handle.
Properties for matplotlib.lines.Line2D.
Marker properties for the handles (also see matplotlib.lines.Line2D).
End points of line ((x1, y1), (x2, y2)).
Initialize self. See help(type(self)) for accurate signature.


Bases: skimage.viewer.canvastools.base.CanvasToolBase
Widget for line selection in a plot.
Skimage viewer or plot plugin object.
Function called whenever a control handle is moved. This function must accept the end points of line as the only argument.
Function called whenever the control handle is released.
Function called whenever the “enter” key is pressed.
Maximum pixel distance allowed when selecting control handle.
Properties for matplotlib.lines.Line2D.
Marker properties for the handles (also see matplotlib.lines.Line2D).
End points of line ((x1, y1), (x2, y2)).
Initialize self. See help(type(self)) for accurate signature.
Geometry information that gets passed to callback functions.


Geometry information that gets passed to callback functions.


Initialize self. See help(type(self)) for accurate signature.


Bases: skimage.viewer.canvastools.base.CanvasToolBase
Widget for painting on top of a plot.
Skimage viewer or plot plugin object.
2D shape tuple used to initialize overlay image.
The size of the paint cursor.
Opacity of overlay.
Function called whenever a control handle is moved. This function must accept the end points of line as the only argument.
Function called whenever the control handle is released.
Function called whenever the “enter” key is pressed.
Properties for matplotlib.patches.Rectangle. This class redefines defaults in matplotlib.widgets.RectangleSelector.
Overlay of painted labels displayed on top of image.
Current paint color.
Initialize self. See help(type(self)) for accurate signature.
Geometry information that gets passed to callback functions.


Bases: skimage.viewer.canvastools.base.CanvasToolBase, matplotlib.widgets.RectangleSelector
Widget for selecting a rectangular region in a plot.
After making the desired selection, press “Enter” to accept the selection and call the on_enter callback function.
Skimage viewer or plot plugin object.
Function called whenever a control handle is moved. This function must accept the rectangle extents as the only argument.
Function called whenever the control handle is released.
Function called whenever the “enter” key is pressed.
Maximum pixel distance allowed when selecting control handle.
Properties for matplotlib.patches.Rectangle. This class redefines defaults in matplotlib.widgets.RectangleSelector.
Return (xmin, xmax, ymin, ymax).
The parent axes for the widget.
A callback function that is called after a selection is completed. It must have the signature:
where eclick and erelease are the mouse click and release MouseEvents that start and complete the selection.
Whether to draw the full rectangle box, the diagonal line of the rectangle, or nothing at all.
Selections with an x-span less than minspanx are ignored.
Selections with an y-span less than minspany are ignored.
Whether to use blitting for faster drawing (if supported by the backend).
Properties with which the line is drawn, if drawtype == "line". Default:
Properties with which the rectangle is drawn, if drawtype ==
"box". Default:
Whether to interpret minspanx and minspany in data or in pixel coordinates.
Button(s) that trigger rectangle selection.
Distance in pixels within which the interactive tool handles can be activated.
Properties with which the interactive handles are drawn. Currently not implemented and ignored.
Whether to draw a set of handles that allow interaction with the widget after it is drawn.
Keyboard modifiers which affect the widget’s behavior. Values amend the defaults.
“square” and “center” can be combined.
Corners of rectangle from lower left, moving clockwise.
Midpoint of rectangle edges from left, moving clockwise.
Return (xmin, xmax, ymin, ymax).
Geometry information that gets passed to callback functions.


Corners of rectangle from lower left, moving clockwise.


Midpoint of rectangle edges from left, moving clockwise.


The parent axes for the widget.
A callback function that is called after a selection is completed. It must have the signature:
where eclick and erelease are the mouse click and release MouseEvents that start and complete the selection.
Whether to draw the full rectangle box, the diagonal line of the rectangle, or nothing at all.
Selections with an x-span less than minspanx are ignored.
Selections with an y-span less than minspany are ignored.
Whether to use blitting for faster drawing (if supported by the backend).
Properties with which the line is drawn, if drawtype == "line". Default:
Properties with which the rectangle is drawn, if drawtype ==
"box". Default:
Whether to interpret minspanx and minspany in data or in pixel coordinates.
Button(s) that trigger rectangle selection.
Distance in pixels within which the interactive tool handles can be activated.
Properties with which the interactive handles are drawn. Currently not implemented and ignored.
Whether to draw a set of handles that allow interaction with the widget after it is drawn.
Keyboard modifiers which affect the widget’s behavior. Values amend the defaults.
“square” and “center” can be combined.


Bases: skimage.viewer.canvastools.linetool.LineTool
Widget for line selection in a plot.
The thickness of the line can be varied using the mouse scroll wheel, or with the ‘+’ and ‘-‘ keys.
Skimage viewer or plot plugin object.
Function called whenever a control handle is moved. This function must accept the end points of line as the only argument.
Function called whenever the control handle is released.
Function called whenever the “enter” key is pressed.
Function called whenever the line thickness is changed.
Maximum pixel distance allowed when selecting control handle.
Properties for matplotlib.lines.Line2D.
Marker properties for the handles (also see matplotlib.lines.Line2D).
End points of line ((x1, y1), (x2, y2)).
Initialize self. See help(type(self)) for accurate signature.


Bases: skimage.viewer.viewers.core.ImageViewer
Viewer for displaying image collections.
Select the displayed frame of the image collection using the slider or with the following keyboard shortcuts:
Previous/next image in collection.
0% to 90% of collection. For example, “5” goes to the image in the middle (i.e. 50%) of the collection.
First/last image in collection.
List of images to be displayed.
Control whether image is updated on slide or release of the image slider. Using ‘on_release’ will give smoother behavior when displaying large images or when writing a plugin/subclass that requires heavy computation.
Initialize self. See help(type(self)) for accurate signature.
Select image on display using index into image collection.


Select image on display using index into image collection.


Bases: object
Viewer for displaying images.
This viewer is a simple container object that holds a Matplotlib axes for showing images. ImageViewer doesn’t subclass the Matplotlib axes (or figure) because of the high probability of name collisions.
Subclasses and plugins will likely extend the update_image method to add custom overlays or filter the displayed image.
Image being viewed.
Matplotlib canvas, figure, and axes used to display image.
Image being viewed. Setting this value will update the displayed frame.
Plugins typically operate on (but don’t change) the original image.
List of attached plugins.
Initialize self. See help(type(self)) for accurate signature.
Connect callback function to matplotlib event and return id.
Disconnect callback by its id (returned by connect_event).
Open image file and display in viewer.
Save current image to file.
The current behavior is not ideal: It saves the image displayed on screen, so all images will be converted to RGB, and the image size is not preserved (resizing the viewer window will alter the size of the saved image).
Show ImageViewer and attached plugins.
This behaves much like matplotlib.pyplot.show and QWidget.show.
Update displayed image.
This method can be overridden or extended in subclasses and plugins to react to image changes.


Connect callback function to matplotlib event and return id.


Disconnect callback by its id (returned by connect_event).


Save current image to file.
The current behavior is not ideal: It saves the image displayed on screen, so all images will be converted to RGB, and the image size is not preserved (resizing the viewer window will alter the size of the saved image).


Show ImageViewer and attached plugins.
This behaves much like matplotlib.pyplot.show and QWidget.show.


Update displayed image.
This method can be overridden or extended in subclasses and plugins to react to image changes.


skimage.viewer.plugins.CannyPlugin(*args, …)
Canny filter plugin to show edges of an image.
skimage.viewer.plugins.ColorHistogram([max_pct])
skimage.viewer.plugins.Crop([maxdist])
skimage.viewer.plugins.LabelPainter([max_radius])
skimage.viewer.plugins.LineProfile([…])
Plugin to compute interpolated intensity under a scan line on an image.
skimage.viewer.plugins.Measure([maxdist])
skimage.viewer.plugins.OverlayPlugin(**kwargs)
Plugin for ImageViewer that displays an overlay on top of main image.
skimage.viewer.plugins.PlotPlugin([…])
Plugin for ImageViewer that contains a plot canvas.
skimage.viewer.plugins.Plugin([…])
Base class for plugins that interact with an ImageViewer.
skimage.viewer.plugins.base
Base class for Plugins that interact with ImageViewer.
skimage.viewer.plugins.canny
skimage.viewer.plugins.color_histogram
skimage.viewer.plugins.crop
skimage.viewer.plugins.labelplugin
skimage.viewer.plugins.lineprofile
skimage.viewer.plugins.measure
skimage.viewer.plugins.overlayplugin
skimage.viewer.plugins.plotplugin
Bases: skimage.viewer.plugins.overlayplugin.OverlayPlugin
Canny filter plugin to show edges of an image.
Initialize self. See help(type(self)) for accurate signature.
Attach the plugin to an ImageViewer.
Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example:
Also note that attach automatically calls the filter function so that the image matches the filtered value specified by attached widgets.
Bases: skimage.viewer.plugins.plotplugin.PlotPlugin
Initialize self. See help(type(self)) for accurate signature.
Attach the plugin to an ImageViewer.
Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example:
Also note that attach automatically calls the filter function so that the image matches the filtered value specified by attached widgets.
Return the image mask and the histogram data.
The selected pixels.
The data describing the histogram and the selected region. The dictionary contains:
Bases: skimage.viewer.plugins.base.Plugin
Initialize self. See help(type(self)) for accurate signature.
Attach the plugin to an ImageViewer.
Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example:
Also note that attach automatically calls the filter function so that the image matches the filtered value specified by attached widgets.
Bases: skimage.viewer.plugins.base.Plugin
Initialize self. See help(type(self)) for accurate signature.
Attach the plugin to an ImageViewer.
Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example:
Also note that attach automatically calls the filter function so that the image matches the filtered value specified by attached widgets.
Bases: skimage.viewer.plugins.plotplugin.PlotPlugin
Plugin to compute interpolated intensity under a scan line on an image.
See PlotPlugin and Plugin classes for additional details.
Maximum pixel distance allowed when selecting end point of scan line.
(minimum, maximum) intensity limits for plotted profile. The following special values are defined:
None : rescale based on min/max intensity along selected scan line. ‘image’ : fixed scale based on min/max intensity in image. ‘dtype’ : fixed scale based on min/max intensity of image dtype.
Initialize self. See help(type(self)) for accurate signature.
Attach the plugin to an ImageViewer.
Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example:
Also note that attach automatically calls the filter function so that the image matches the filtered value specified by attached widgets.
Return intensity profile of the selected line.
The positions ((x1, y1), (x2, y2)) of the line ends.
Profile of intensity values. Length 1 (grayscale) or 3 (rgb).
Return the drawn line and the resulting scan.
An array of 0s with the scanned line set to 255. If the linewidth of the line tool is greater than 1, sets the values within the profiled polygon to 128.
The line scan values across the image.
Bases: skimage.viewer.plugins.base.Plugin
Initialize self. See help(type(self)) for accurate signature.
Attach the plugin to an ImageViewer.
Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example:
Also note that attach automatically calls the filter function so that the image matches the filtered value specified by attached widgets.
Bases: skimage.viewer.plugins.base.Plugin
Plugin for ImageViewer that displays an overlay on top of main image.
The base Plugin class displays the filtered image directly on the viewer. OverlayPlugin will instead overlay an image with a transparent colormap.
See base Plugin class for additional details.
Overlay displayed on top of image. This overlay defaults to a color map with alpha values varying linearly from 0 to 1.
Color of overlay.
Initialize self. See help(type(self)) for accurate signature.
Attach the plugin to an ImageViewer.
Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example:
Also note that attach automatically calls the filter function so that the image matches the filtered value specified by attached widgets.
On close disconnect all artists and events from ImageViewer.
Note that artists must be appended to self.artists.
Display filtered image as an overlay on top of image in viewer.
Return filtered image.
This “filtered image” is used when saving from the plugin.
Return the overlaid image.
The overlay currently displayed.
Bases: skimage.viewer.plugins.base.Plugin
Plugin for ImageViewer that contains a plot canvas.
Base class for plugins that contain a Matplotlib plot canvas, which can, for example, display an image histogram.
See base Plugin class for additional details.
Initialize self. See help(type(self)) for accurate signature.
Attach the plugin to an ImageViewer.
Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example:
Also note that attach automatically calls the filter function so that the image matches the filtered value specified by attached widgets.
Redraw plot.
Bases: object
Base class for plugins that interact with an ImageViewer.
A plugin connects an image filter (or another function) to an image viewer. Note that a Plugin is initialized without an image viewer and attached in a later step. See example below for details.
Window containing image used in measurement/manipulation.
Function that gets called to update image in image viewer. This value can be None if, for example, you have a plugin that extracts information from an image and doesn’t manipulate it. Alternatively, this function can be defined as a method in a Plugin subclass.
Size of plugin window in pixels. Note that Qt will automatically resize a window to fit components. So if you’re adding rows of components, you can leave height = 0 and just let Qt determine the final height.
If True, use blitting to speed up animation. Only available on some Matplotlib backends. If None, set to True when using Agg backend. This only has an effect if you draw on top of an image viewer.
The plugin will automatically delegate parameters to image_filter based on its parameter type, i.e., ptype (widgets for required arguments must be added in the order they appear in the function). The image attached to the viewer is automatically passed as the first argument to the filter function.
#TODO: Add flag so image is not passed to filter function by default.
ptype = ‘kwarg’ is the default for most widgets so it’s unnecessary here.
Window containing image used in measurement.
Name of plugin. This is displayed as the window title.
List of Matplotlib artists and canvastools. Any artists created by the plugin should be added to this list so that it gets cleaned up on close.
Initialize self. See help(type(self)) for accurate signature.
Add widget to plugin.
Alternatively, Plugin’s __add__ method is overloaded to add widgets:
Widgets can adjust required or optional arguments of filter function or parameters for the plugin. This is specified by the Widget’s ptype.
Attach the plugin to an ImageViewer.
Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example:
Also note that attach automatically calls the filter function so that the image matches the filtered value specified by attached widgets.
On close disconnect all artists and events from ImageViewer.
Note that artists must be appended to self.artists.
Display the filtered image on image viewer.
If you don’t want to simply replace the displayed image with the filtered image (e.g., you want to display a transparent overlay), you can override this method.
Call image_filter with widget args and kwargs
Note: display_filtered_image is automatically called.
Return filtered image.
Return the plugin’s representation and data.
The filtered image.
Any data associated with the plugin.
Derived classes should override this method to return a tuple containing an overlay of the same shape of the image, and a data object. Either of these is optional: return None if you don’t want to return a value.
Remove artists that are connected to the image viewer.
Show plugin.
Update keyword parameters of the plugin itself.
These parameters will typically be implemented as class properties so that they update the image or some other component.


Bases: skimage.viewer.plugins.overlayplugin.OverlayPlugin
Canny filter plugin to show edges of an image.
Initialize self. See help(type(self)) for accurate signature.
Attach the plugin to an ImageViewer.
Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example:
Also note that attach automatically calls the filter function so that the image matches the filtered value specified by attached widgets.


Attach the plugin to an ImageViewer.
Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example:
Also note that attach automatically calls the filter function so that the image matches the filtered value specified by attached widgets.


Initialize self. See help(type(self)) for accurate signature.


Bases: skimage.viewer.plugins.plotplugin.PlotPlugin
Initialize self. See help(type(self)) for accurate signature.
Attach the plugin to an ImageViewer.
Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example:
Also note that attach automatically calls the filter function so that the image matches the filtered value specified by attached widgets.
Return the image mask and the histogram data.
The selected pixels.
The data describing the histogram and the selected region. The dictionary contains:


Return the image mask and the histogram data.
The selected pixels.
The data describing the histogram and the selected region. The dictionary contains:


Bases: skimage.viewer.plugins.base.Plugin
Initialize self. See help(type(self)) for accurate signature.
Attach the plugin to an ImageViewer.
Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example:
Also note that attach automatically calls the filter function so that the image matches the filtered value specified by attached widgets.


Bases: skimage.viewer.plugins.plotplugin.PlotPlugin
Plugin to compute interpolated intensity under a scan line on an image.
See PlotPlugin and Plugin classes for additional details.
Maximum pixel distance allowed when selecting end point of scan line.
(minimum, maximum) intensity limits for plotted profile. The following special values are defined:
None : rescale based on min/max intensity along selected scan line. ‘image’ : fixed scale based on min/max intensity in image. ‘dtype’ : fixed scale based on min/max intensity of image dtype.
Initialize self. See help(type(self)) for accurate signature.
Attach the plugin to an ImageViewer.
Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example:
Also note that attach automatically calls the filter function so that the image matches the filtered value specified by attached widgets.
Return intensity profile of the selected line.
The positions ((x1, y1), (x2, y2)) of the line ends.
Profile of intensity values. Length 1 (grayscale) or 3 (rgb).
Return the drawn line and the resulting scan.
An array of 0s with the scanned line set to 255. If the linewidth of the line tool is greater than 1, sets the values within the profiled polygon to 128.
The line scan values across the image.


Return intensity profile of the selected line.
The positions ((x1, y1), (x2, y2)) of the line ends.
Profile of intensity values. Length 1 (grayscale) or 3 (rgb).


Return the drawn line and the resulting scan.
An array of 0s with the scanned line set to 255. If the linewidth of the line tool is greater than 1, sets the values within the profiled polygon to 128.
The line scan values across the image.


Bases: skimage.viewer.plugins.base.Plugin
Plugin for ImageViewer that displays an overlay on top of main image.
The base Plugin class displays the filtered image directly on the viewer. OverlayPlugin will instead overlay an image with a transparent colormap.
See base Plugin class for additional details.
Overlay displayed on top of image. This overlay defaults to a color map with alpha values varying linearly from 0 to 1.
Color of overlay.
Initialize self. See help(type(self)) for accurate signature.
Attach the plugin to an ImageViewer.
Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example:
Also note that attach automatically calls the filter function so that the image matches the filtered value specified by attached widgets.
On close disconnect all artists and events from ImageViewer.
Note that artists must be appended to self.artists.
Display filtered image as an overlay on top of image in viewer.
Return filtered image.
This “filtered image” is used when saving from the plugin.
Return the overlaid image.
The overlay currently displayed.


On close disconnect all artists and events from ImageViewer.
Note that artists must be appended to self.artists.


Display filtered image as an overlay on top of image in viewer.


Return filtered image.
This “filtered image” is used when saving from the plugin.


Return the overlaid image.
The overlay currently displayed.


Bases: skimage.viewer.plugins.base.Plugin
Plugin for ImageViewer that contains a plot canvas.
Base class for plugins that contain a Matplotlib plot canvas, which can, for example, display an image histogram.
See base Plugin class for additional details.
Initialize self. See help(type(self)) for accurate signature.
Attach the plugin to an ImageViewer.
Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example:
Also note that attach automatically calls the filter function so that the image matches the filtered value specified by attached widgets.
Redraw plot.


Bases: object
Base class for plugins that interact with an ImageViewer.
A plugin connects an image filter (or another function) to an image viewer. Note that a Plugin is initialized without an image viewer and attached in a later step. See example below for details.
Window containing image used in measurement/manipulation.
Function that gets called to update image in image viewer. This value can be None if, for example, you have a plugin that extracts information from an image and doesn’t manipulate it. Alternatively, this function can be defined as a method in a Plugin subclass.
Size of plugin window in pixels. Note that Qt will automatically resize a window to fit components. So if you’re adding rows of components, you can leave height = 0 and just let Qt determine the final height.
If True, use blitting to speed up animation. Only available on some Matplotlib backends. If None, set to True when using Agg backend. This only has an effect if you draw on top of an image viewer.
The plugin will automatically delegate parameters to image_filter based on its parameter type, i.e., ptype (widgets for required arguments must be added in the order they appear in the function). The image attached to the viewer is automatically passed as the first argument to the filter function.
#TODO: Add flag so image is not passed to filter function by default.
ptype = ‘kwarg’ is the default for most widgets so it’s unnecessary here.
Window containing image used in measurement.
Name of plugin. This is displayed as the window title.
List of Matplotlib artists and canvastools. Any artists created by the plugin should be added to this list so that it gets cleaned up on close.
Initialize self. See help(type(self)) for accurate signature.
Add widget to plugin.
Alternatively, Plugin’s __add__ method is overloaded to add widgets:
Widgets can adjust required or optional arguments of filter function or parameters for the plugin. This is specified by the Widget’s ptype.
Attach the plugin to an ImageViewer.
Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example:
Also note that attach automatically calls the filter function so that the image matches the filtered value specified by attached widgets.
On close disconnect all artists and events from ImageViewer.
Note that artists must be appended to self.artists.
Display the filtered image on image viewer.
If you don’t want to simply replace the displayed image with the filtered image (e.g., you want to display a transparent overlay), you can override this method.
Call image_filter with widget args and kwargs
Note: display_filtered_image is automatically called.
Return filtered image.
Return the plugin’s representation and data.
The filtered image.
Any data associated with the plugin.
Derived classes should override this method to return a tuple containing an overlay of the same shape of the image, and a data object. Either of these is optional: return None if you don’t want to return a value.
Remove artists that are connected to the image viewer.
Show plugin.
Update keyword parameters of the plugin itself.
These parameters will typically be implemented as class properties so that they update the image or some other component.


Add widget to plugin.
Alternatively, Plugin’s __add__ method is overloaded to add widgets:
Widgets can adjust required or optional arguments of filter function or parameters for the plugin. This is specified by the Widget’s ptype.


Display the filtered image on image viewer.
If you don’t want to simply replace the displayed image with the filtered image (e.g., you want to display a transparent overlay), you can override this method.


Call image_filter with widget args and kwargs
Note: display_filtered_image is automatically called.


Return the plugin’s representation and data.
The filtered image.
Any data associated with the plugin.
Derived classes should override this method to return a tuple containing an overlay of the same shape of the image, and a data object. Either of these is optional: return None if you don’t want to return a value.


Remove artists that are connected to the image viewer.


Update keyword parameters of the plugin itself.
These parameters will typically be implemented as class properties so that they update the image or some other component.


Initialize self. See help(type(self)) for accurate signature.


skimage.viewer.utils.figimage(image[, …])
Return figure and axes with figure tightly surrounding image.
skimage.viewer.utils.init_qtapp()
Initialize QAppliction.
skimage.viewer.utils.new_plot([parent, …])
Return new figure and axes.
skimage.viewer.utils.start_qtapp([app])
Start Qt mainloop
skimage.viewer.utils.update_axes_image(…)
Update the image displayed by an image plot.
skimage.viewer.utils.ClearColormap(rgb[, …])
Color map that varies linearly from alpha = 0 to 1
skimage.viewer.utils.FigureCanvas(figure, …)
Canvas for displaying images.
skimage.viewer.utils.LinearColormap(name, …)
LinearSegmentedColormap in which color varies smoothly.
skimage.viewer.utils.RequiredAttr([init_val])
A class attribute that must be set before use.
skimage.viewer.utils.canvas
skimage.viewer.utils.core
skimage.viewer.utils.dialogs
Return figure and axes with figure tightly surrounding image.
Unlike pyplot.figimage, this actually plots onto an axes object, which fills the figure. Plotting the image onto an axes allows for subsequent overlays of axes artists.
image to plot
If scale is 1, the figure and axes have the same dimension as the image. Smaller values of scale will shrink the figure.
Dots per inch for figure. If None, use the default rcParam.
Initialize QAppliction.
The QApplication needs to be initialized before creating any QWidgets
Return new figure and axes.
Qt widget that displays the plot objects. If None, you must manually call canvas.setParent and pass the parent widget.
Keyword arguments passed matplotlib.figure.Figure.add_subplot.
Keyword arguments passed matplotlib.figure.Figure.
Start Qt mainloop
Update the image displayed by an image plot.
This sets the image plot’s array and updates its shape appropriately
Image axes to update.
Image array.
Bases: skimage.viewer.utils.core.LinearColormap
Color map that varies linearly from alpha = 0 to 1
Create color map from linear mapping segments
segmentdata argument is a dictionary with a red, green and blue entries. Each entry should be a list of x, y0, y1 tuples, forming rows in a table. Entries for alpha are optional.
Example: suppose you want red to increase from 0 to 1 over the bottom half, green to do the same over the middle half, and blue over the top half. Then you would use:
Each row in the table for a given color is a sequence of x, y0, y1 tuples. In each sequence, x must increase monotonically from 0 to 1. For any input value z falling between x[i] and x[i+1], the output value of a given color will be linearly interpolated between y1[i] and y0[i+1]:
Hence y0 in the first row and y1 in the last row are never used.
See also
Static method; factory function for generating a smoothly-varying LinearSegmentedColormap.
For information about making a mapping array.
Bases: object
Canvas for displaying images.
Initialize self. See help(type(self)) for accurate signature.
Bases: matplotlib.colors.LinearSegmentedColormap
LinearSegmentedColormap in which color varies smoothly.
This class is a simplification of LinearSegmentedColormap, which doesn’t support jumps in color intensities.
Name of colormap.
Dictionary of ‘red’, ‘green’, ‘blue’, and (optionally) ‘alpha’ values. Each color key contains a list of x, y tuples. x must increase monotonically from 0 to 1 and corresponds to input values for a mappable object (e.g. an image). y corresponds to the color intensity.
Create color map from linear mapping segments
segmentdata argument is a dictionary with a red, green and blue entries. Each entry should be a list of x, y0, y1 tuples, forming rows in a table. Entries for alpha are optional.
Example: suppose you want red to increase from 0 to 1 over the bottom half, green to do the same over the middle half, and blue over the top half. Then you would use:
Each row in the table for a given color is a sequence of x, y0, y1 tuples. In each sequence, x must increase monotonically from 0 to 1. For any input value z falling between x[i] and x[i+1], the output value of a given color will be linearly interpolated between y1[i] and y0[i+1]:
Hence y0 in the first row and y1 in the last row are never used.
See also
Static method; factory function for generating a smoothly-varying LinearSegmentedColormap.
For information about making a mapping array.
Bases: object
A class attribute that must be set before use.
Initialize self. See help(type(self)) for accurate signature.


Bases: skimage.viewer.utils.core.LinearColormap
Color map that varies linearly from alpha = 0 to 1
Create color map from linear mapping segments
segmentdata argument is a dictionary with a red, green and blue entries. Each entry should be a list of x, y0, y1 tuples, forming rows in a table. Entries for alpha are optional.
Example: suppose you want red to increase from 0 to 1 over the bottom half, green to do the same over the middle half, and blue over the top half. Then you would use:
Each row in the table for a given color is a sequence of x, y0, y1 tuples. In each sequence, x must increase monotonically from 0 to 1. For any input value z falling between x[i] and x[i+1], the output value of a given color will be linearly interpolated between y1[i] and y0[i+1]:
Hence y0 in the first row and y1 in the last row are never used.
See also
Static method; factory function for generating a smoothly-varying LinearSegmentedColormap.
For information about making a mapping array.


Create color map from linear mapping segments
segmentdata argument is a dictionary with a red, green and blue entries. Each entry should be a list of x, y0, y1 tuples, forming rows in a table. Entries for alpha are optional.
Example: suppose you want red to increase from 0 to 1 over the bottom half, green to do the same over the middle half, and blue over the top half. Then you would use:
Each row in the table for a given color is a sequence of x, y0, y1 tuples. In each sequence, x must increase monotonically from 0 to 1. For any input value z falling between x[i] and x[i+1], the output value of a given color will be linearly interpolated between y1[i] and y0[i+1]:
Hence y0 in the first row and y1 in the last row are never used.
See also
Static method; factory function for generating a smoothly-varying LinearSegmentedColormap.
For information about making a mapping array.


Return figure and axes with figure tightly surrounding image.
Unlike pyplot.figimage, this actually plots onto an axes object, which fills the figure. Plotting the image onto an axes allows for subsequent overlays of axes artists.
image to plot
If scale is 1, the figure and axes have the same dimension as the image. Smaller values of scale will shrink the figure.
Dots per inch for figure. If None, use the default rcParam.


Bases: object
Canvas for displaying images.
Initialize self. See help(type(self)) for accurate signature.


Initialize QAppliction.
The QApplication needs to be initialized before creating any QWidgets


Bases: matplotlib.colors.LinearSegmentedColormap
LinearSegmentedColormap in which color varies smoothly.
This class is a simplification of LinearSegmentedColormap, which doesn’t support jumps in color intensities.
Name of colormap.
Dictionary of ‘red’, ‘green’, ‘blue’, and (optionally) ‘alpha’ values. Each color key contains a list of x, y tuples. x must increase monotonically from 0 to 1 and corresponds to input values for a mappable object (e.g. an image). y corresponds to the color intensity.
Create color map from linear mapping segments
segmentdata argument is a dictionary with a red, green and blue entries. Each entry should be a list of x, y0, y1 tuples, forming rows in a table. Entries for alpha are optional.
Example: suppose you want red to increase from 0 to 1 over the bottom half, green to do the same over the middle half, and blue over the top half. Then you would use:
Each row in the table for a given color is a sequence of x, y0, y1 tuples. In each sequence, x must increase monotonically from 0 to 1. For any input value z falling between x[i] and x[i+1], the output value of a given color will be linearly interpolated between y1[i] and y0[i+1]:
Hence y0 in the first row and y1 in the last row are never used.
See also
Static method; factory function for generating a smoothly-varying LinearSegmentedColormap.
For information about making a mapping array.


Return new figure and axes.
Qt widget that displays the plot objects. If None, you must manually call canvas.setParent and pass the parent widget.
Keyword arguments passed matplotlib.figure.Figure.add_subplot.
Keyword arguments passed matplotlib.figure.Figure.


Bases: object
A class attribute that must be set before use.
Initialize self. See help(type(self)) for accurate signature.


Update the image displayed by an image plot.
This sets the image plot’s array and updates its shape appropriately
Image axes to update.
Image array.


skimage.viewer.viewers.CollectionViewer(…)
Viewer for displaying image collections.
skimage.viewer.viewers.ImageViewer(image[, …])
Viewer for displaying images.
skimage.viewer.viewers.core
ImageViewer class for viewing and interacting with images.
Bases: skimage.viewer.viewers.core.ImageViewer
Viewer for displaying image collections.
Select the displayed frame of the image collection using the slider or with the following keyboard shortcuts:
Previous/next image in collection.
0% to 90% of collection. For example, “5” goes to the image in the middle (i.e. 50%) of the collection.
First/last image in collection.
List of images to be displayed.
Control whether image is updated on slide or release of the image slider. Using ‘on_release’ will give smoother behavior when displaying large images or when writing a plugin/subclass that requires heavy computation.
Initialize self. See help(type(self)) for accurate signature.
Select image on display using index into image collection.
Bases: object
Viewer for displaying images.
This viewer is a simple container object that holds a Matplotlib axes for showing images. ImageViewer doesn’t subclass the Matplotlib axes (or figure) because of the high probability of name collisions.
Subclasses and plugins will likely extend the update_image method to add custom overlays or filter the displayed image.
Image being viewed.
Matplotlib canvas, figure, and axes used to display image.
Image being viewed. Setting this value will update the displayed frame.
Plugins typically operate on (but don’t change) the original image.
List of attached plugins.
Initialize self. See help(type(self)) for accurate signature.
Connect callback function to matplotlib event and return id.
Disconnect callback by its id (returned by connect_event).
Open image file and display in viewer.
Save current image to file.
The current behavior is not ideal: It saves the image displayed on screen, so all images will be converted to RGB, and the image size is not preserved (resizing the viewer window will alter the size of the saved image).
Show ImageViewer and attached plugins.
This behaves much like matplotlib.pyplot.show and QWidget.show.
Update displayed image.
This method can be overridden or extended in subclasses and plugins to react to image changes.


Bases: skimage.viewer.viewers.core.ImageViewer
Viewer for displaying image collections.
Select the displayed frame of the image collection using the slider or with the following keyboard shortcuts:
Previous/next image in collection.
0% to 90% of collection. For example, “5” goes to the image in the middle (i.e. 50%) of the collection.
First/last image in collection.
List of images to be displayed.
Control whether image is updated on slide or release of the image slider. Using ‘on_release’ will give smoother behavior when displaying large images or when writing a plugin/subclass that requires heavy computation.
Initialize self. See help(type(self)) for accurate signature.
Select image on display using index into image collection.


Select image on display using index into image collection.


Bases: object
Viewer for displaying images.
This viewer is a simple container object that holds a Matplotlib axes for showing images. ImageViewer doesn’t subclass the Matplotlib axes (or figure) because of the high probability of name collisions.
Subclasses and plugins will likely extend the update_image method to add custom overlays or filter the displayed image.
Image being viewed.
Matplotlib canvas, figure, and axes used to display image.
Image being viewed. Setting this value will update the displayed frame.
Plugins typically operate on (but don’t change) the original image.
List of attached plugins.
Initialize self. See help(type(self)) for accurate signature.
Connect callback function to matplotlib event and return id.
Disconnect callback by its id (returned by connect_event).
Open image file and display in viewer.
Save current image to file.
The current behavior is not ideal: It saves the image displayed on screen, so all images will be converted to RGB, and the image size is not preserved (resizing the viewer window will alter the size of the saved image).
Show ImageViewer and attached plugins.
This behaves much like matplotlib.pyplot.show and QWidget.show.
Update displayed image.
This method can be overridden or extended in subclasses and plugins to react to image changes.


Connect callback function to matplotlib event and return id.


Disconnect callback by its id (returned by connect_event).


Save current image to file.
The current behavior is not ideal: It saves the image displayed on screen, so all images will be converted to RGB, and the image size is not preserved (resizing the viewer window will alter the size of the saved image).


Show ImageViewer and attached plugins.
This behaves much like matplotlib.pyplot.show and QWidget.show.


Update displayed image.
This method can be overridden or extended in subclasses and plugins to react to image changes.


Initialize self. See help(type(self)) for accurate signature.


Widgets for interacting with ImageViewer.
These widgets should be added to a Plugin subclass using its add_widget method or calling:
on a Plugin instance. The Plugin will delegate action based on the widget’s parameter type specified by its ptype attribute, which can be:
skimage.viewer.widgets.BaseWidget(name[, …])
skimage.viewer.widgets.Button(name, callback)
Button which calls callback upon click.
skimage.viewer.widgets.CheckBox(name[, …])
CheckBox widget
skimage.viewer.widgets.ComboBox(name, items)
ComboBox widget for selecting among a list of choices.
skimage.viewer.widgets.OKCancelButtons([…])
Buttons that close the parent plugin.
skimage.viewer.widgets.SaveButtons([name, …])
Buttons to save image to io.stack or to a file.
skimage.viewer.widgets.Slider(name[, low, …])
Slider widget for adjusting numeric parameters.
skimage.viewer.widgets.Text([name, text])
skimage.viewer.widgets.core
skimage.viewer.widgets.history
Bases: object
Initialize self. See help(type(self)) for accurate signature.
Bases: skimage.viewer.widgets.core.BaseWidget
Button which calls callback upon click.
Name of button.
Function to call when button is clicked.
Initialize self. See help(type(self)) for accurate signature.
Bases: skimage.viewer.widgets.core.BaseWidget
CheckBox widget
Name of CheckBox parameter. If this parameter is passed as a keyword argument, it must match the name of that keyword argument (spaces are replaced with underscores). In addition, this name is displayed as the name of the CheckBox.
Initial state of the CheckBox.
Checkbox alignment
Parameter type
Callback function called in response to checkbox changes. Note: This function is typically set (overridden) when the widget is added to a plugin.
Initialize self. See help(type(self)) for accurate signature.
Bases: skimage.viewer.widgets.core.BaseWidget
ComboBox widget for selecting among a list of choices.
Name of ComboBox parameter. If this parameter is passed as a keyword argument, it must match the name of that keyword argument (spaces are replaced with underscores). In addition, this name is displayed as the name of the ComboBox.
Allowed parameter values.
Parameter type.
Callback function called in response to combobox changes. Note: This function is typically set (overridden) when the widget is added to a plugin.
Initialize self. See help(type(self)) for accurate signature.
Bases: skimage.viewer.widgets.core.BaseWidget
Buttons that close the parent plugin.
OK will replace the original image with the current (filtered) image. Cancel will just close the plugin.
Initialize self. See help(type(self)) for accurate signature.
Bases: skimage.viewer.widgets.core.BaseWidget
Buttons to save image to io.stack or to a file.
Initialize self. See help(type(self)) for accurate signature.
Bases: skimage.viewer.widgets.core.BaseWidget
Slider widget for adjusting numeric parameters.
Name of slider parameter. If this parameter is passed as a keyword argument, it must match the name of that keyword argument (spaces are replaced with underscores). In addition, this name is displayed as the name of the slider.
Range of slider values.
Default slider value. If None, use midpoint between low and high.
Numeric type of slider value.
Parameter type.
Callback function called in response to slider changes. Note: This function is typically set (overridden) when the widget is added to a plugin.
Slider orientation.
Control when callback function is called: on slider move or release.
Initialize self. See help(type(self)) for accurate signature.
Bases: skimage.viewer.widgets.core.BaseWidget
Initialize self. See help(type(self)) for accurate signature.


Bases: object
Initialize self. See help(type(self)) for accurate signature.


Bases: skimage.viewer.widgets.core.BaseWidget
Button which calls callback upon click.
Name of button.
Function to call when button is clicked.
Initialize self. See help(type(self)) for accurate signature.


Bases: skimage.viewer.widgets.core.BaseWidget
CheckBox widget
Name of CheckBox parameter. If this parameter is passed as a keyword argument, it must match the name of that keyword argument (spaces are replaced with underscores). In addition, this name is displayed as the name of the CheckBox.
Initial state of the CheckBox.
Checkbox alignment
Parameter type
Callback function called in response to checkbox changes. Note: This function is typically set (overridden) when the widget is added to a plugin.
Initialize self. See help(type(self)) for accurate signature.


Bases: skimage.viewer.widgets.core.BaseWidget
ComboBox widget for selecting among a list of choices.
Name of ComboBox parameter. If this parameter is passed as a keyword argument, it must match the name of that keyword argument (spaces are replaced with underscores). In addition, this name is displayed as the name of the ComboBox.
Allowed parameter values.
Parameter type.
Callback function called in response to combobox changes. Note: This function is typically set (overridden) when the widget is added to a plugin.
Initialize self. See help(type(self)) for accurate signature.


Bases: skimage.viewer.widgets.core.BaseWidget
Buttons that close the parent plugin.
OK will replace the original image with the current (filtered) image. Cancel will just close the plugin.
Initialize self. See help(type(self)) for accurate signature.


Bases: skimage.viewer.widgets.core.BaseWidget
Buttons to save image to io.stack or to a file.
Initialize self. See help(type(self)) for accurate signature.


Bases: skimage.viewer.widgets.core.BaseWidget
Slider widget for adjusting numeric parameters.
Name of slider parameter. If this parameter is passed as a keyword argument, it must match the name of that keyword argument (spaces are replaced with underscores). In addition, this name is displayed as the name of the slider.
Range of slider values.
Default slider value. If None, use midpoint between low and high.
Numeric type of slider value.
Parameter type.
Callback function called in response to slider changes. Note: This function is typically set (overridden) when the widget is added to a plugin.
Slider orientation.
Control when callback function is called: on slider move or release.
Initialize self. See help(type(self)) for accurate signature.


Bases: skimage.viewer.widgets.core.BaseWidget
Initialize self. See help(type(self)) for accurate signature.