Operation tier list

The tiers hold the different operations that are available in CLIc. These operations are grouped by their complexity, following the rules that a function in tier N implement a function from tier N-1.

tier1

namespace tier1

Namespace container for all functions of tier 1 category Tier 1 functions are advanced functions that may rely on previous tier functions.

absolute

Computes the absolute value of every individual pixel x in a given image.

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

The input image to be processed. [const Array::Pointer &]

param dst:

Output image where results are written into. [Array::Pointer ( = None )]

return:

Array::Pointer

auto absolute_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

add_images_weighted

Calculates the sum of pairs of pixels x and y from images X and Y weighted with factors a and b.

Note

ā€˜combine’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

First input image to add. [const Array::Pointer &]

param src1:

Second image to add. [const Array::Pointer &]

param dst:

Output image where results are written into. [Array::Pointer ( = None )]

param factor1:

Multiplication factor of each pixel of src0 before adding it. [float ( = 1 )]

param factor2:

Multiplication factor of each pixel of src1 before adding it. [float ( = 1 )]

return:

Array::Pointer

auto add_images_weighted_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1, Array::Pointer dst, float factor1, float factor2) -> Array::Pointer

add_image_and_scalar

Adds a scalar value s to all pixels x of a given image X.

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output image. [Array::Pointer ( = None )]

param scalar:

Scalar number to add to all pixels. [float ( = 1 )]

return:

Array::Pointer

auto add_image_and_scalar_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float scalar) -> Array::Pointer

binary_and

Computes a binary image (containing pixel values 0 and 1) from two images X and Y by connecting pairs of pixels x and y with the binary AND operator &. All pixel values except 0 in the input images are interpreted as 1.

Note

ā€˜combine’, ā€˜binary processing’, ā€˜in assistant’, ā€˜combine labels’, ā€˜label processing’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

First binary input image to be processed. [const Array::Pointer &]

param src1:

Second binary input image to be processed. [const Array::Pointer &]

param dst:

Output image where results are written into. [Array::Pointer ( = None )]

return:

Array::Pointer

auto binary_and_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1, Array::Pointer dst) -> Array::Pointer

binary_edge_detection

Determines pixels/voxels which are on the surface of binary objects and sets only them to 1 in the destination image. All other pixels are set to 0.

Note

ā€˜binary processing’, ā€˜label processing’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Binary input image where edges will be searched. [const Array::Pointer &]

param dst:

Output image where edge pixels will be 1. [Array::Pointer ( = None )]

return:

Array::Pointer

auto binary_edge_detection_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

binary_not

Computes a binary image (containing pixel values 0 and 1) from an image X by negating its pixel values x using the binary NOT operator ! All pixel values except 0 in the input image are interpreted as 1.

Note

ā€˜binary processing’, ā€˜filter’, ā€˜label processing’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Binary input image to be inverted. [const Array::Pointer &]

param dst:

Output image where results are written into. [Array::Pointer ( = None )]

return:

Array::Pointer

auto binary_not_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

binary_or

Computes a binary image (containing pixel values 0 and 1) from two images X and Y by connecting pairs of pixels x and y with the binary OR operator |. All pixel values except 0 in the input images are interpreted as 1.

Note

ā€˜combine’, ā€˜binary processing’, ā€˜in assistant’, ā€˜combine labels’, ā€˜label processing’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

First binary input image to be processed. [const Array::Pointer &]

param src1:

Second binary input image to be processed. [const Array::Pointer &]

param dst:

Output image where results are written into. [Array::Pointer ( = None )]

return:

Array::Pointer

auto binary_or_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1, Array::Pointer dst) -> Array::Pointer

binary_subtract

Subtracts one binary image from another.

Note

ā€˜combine’, ā€˜binary processing’, ā€˜in assistant’, ā€˜combine labels’, ā€˜label processing’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

First binary input image to be processed. [const Array::Pointer &]

param src1:

Second binary input image to be subtracted from the first. [const Array::Pointer &]

param dst:

Output image where results are written into. [Array::Pointer ( = None )]

return:

Array::Pointer

auto binary_subtract_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1, Array::Pointer dst) -> Array::Pointer

binary_xor

Computes a binary image (containing pixel values 0 and 1) from two images X and Y by connecting pairs of pixels x and y with the binary operators AND &, OR | and NOT ! implementing the XOR operator. All pixel values except 0 in the input images are interpreted as 1.

Note

ā€˜combine’, ā€˜binary processing’, ā€˜in assistant’, ā€˜combine labels’, ā€˜label processing’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

First binary input image to be processed. [const Array::Pointer &]

param src1:

Second binary input image to be processed. [const Array::Pointer &]

param dst:

Output image where results are written into. [Array::Pointer ( = None )]

return:

Array::Pointer

auto binary_xor_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1, Array::Pointer dst) -> Array::Pointer

binary_supinf

Computes the maximum of erosions with planar structuring elements. Note: This operation supports only binary image data types.

Note

ā€˜filter’, ā€˜binary processing’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

The binary input image to be processed. [const Array::Pointer &]

param dst:

Output image where results are written into. [Array::Pointer ( = None )]

return:

Array::Pointer

auto binary_supinf_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

binary_infsup

Computes the minimum of dilations with planar structuring elements. Note: This operation supports only binary image data types.

Note

ā€˜filter’, ā€˜binary processing’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

The binary input image to be processed. [const Array::Pointer &]

param dst:

Output image where results are written into. [Array::Pointer ( = None )]

return:

Array::Pointer

auto binary_infsup_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

block_enumerate

Enumerates pixels with value 1 in a one-dimensional image. For example, [0, 1, 1, 0, 1, 0, 1, 1] becomes [0, 1, 2, 0, 3, 0, 4, 5]. This functionality is important in connected-component labeling and is accelerated by parallelization in blocks. Hand over precomputed block sums from sum_reduction_x using the same block size.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

input binary vector image [const Array::Pointer &]

param src1:

precomputed sums of blocks [const Array::Pointer &]

param dst:

output enumerated vector image [Array::Pointer ( = None )]

param blocksize:

blocksize; must correspond correctly to how the [int ( = 256 )]

return:

Array::Pointer

auto block_enumerate_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1, Array::Pointer dst, int blocksize) -> Array::Pointer

circular_shift

Apply a circular shift (roll) to the input image. Elements at the borders will be shifted to the other side of the image. The shift is specified for each dimension separately.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param shift_x:

Shift in x direction. [int ( = 0 )]

param shift_y:

Shift in y direction. [int ( = 0 )]

param shift_z:

Shift in z direction. [int ( = 0 )]

return:

Array::Pointer

auto circular_shift_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, int shift_x, int shift_y, int shift_z) -> Array::Pointer

convolve

Convolve the image with a given kernel image. It is recommended that the kernel image has an odd size in X, Y and Z.

Note

ā€˜filter’, ā€˜combine’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

First input image to process. [const Array::Pointer &]

param src1:

Second input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto convolve_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1, Array::Pointer dst) -> Array::Pointer

copy

Copies an image.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to copy. [const Array::Pointer &]

param dst:

Output copy image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto copy_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

copy_slice

This method has two purposes: It copies a 2D image to a given slice_index z position in a 3D image stack or it copies a given slice_index at position z in an image stack to a 2D image.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to copy from. [const Array::Pointer &]

param dst:

Output copy image slice_index. [Array::Pointer ( = None )]

param slice_index:

Index of the slice to copy. [int ( = 0 )]

return:

Array::Pointer

auto copy_slice_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, int slice_index) -> Array::Pointer

copy_horizontal_slice

This method has two purposes: It copies a 2D image to a given slice_index y position in a 3D image stack or It copies a given slice_index at position y in an image stack to a 2D image.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to copy from. [const Array::Pointer &]

param dst:

Output copy image slice_index. [Array::Pointer ( = None )]

param slice_index:

Index of the slice to copy. [int ( = 0 )]

return:

Array::Pointer

auto copy_horizontal_slice_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, int slice_index) -> Array::Pointer

copy_vertical_slice

This method has two purposes: It copies a 2D image to a given slice_index x position in a 3D image stack or It copies a given slice_index at position x in an image stack to a 2D image.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to copy from. [const Array::Pointer &]

param dst:

Output copy image slice_index. [Array::Pointer ( = None )]

param slice_index:

Index of the slice to copy. [int ( = 0 )]

return:

Array::Pointer

auto copy_vertical_slice_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, int slice_index) -> Array::Pointer

crop

Crops a given substack out of a given image stack. Note: If the destination image already exists, it will be overwritten and keep its dimensions.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param start_x:

Starting index coordinate x. [int ( = 0 )]

param start_y:

Starting index coordinate y. [int ( = 0 )]

param start_z:

Starting index coordinate z. [int ( = 0 )]

param width:

Width size of the region to crop. [int ( = 1 )]

param height:

Height size of the region to crop. [int ( = 1 )]

param depth:

Depth size of the region to crop. [int ( = 1 )]

return:

Array::Pointer

auto crop_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, int start_x, int start_y, int start_z, int width, int height, int depth) -> Array::Pointer

cubic_root

Computes the cubic root of each pixel.

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto cubic_root_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

detect_label_edges

Takes a labelmap and returns an image where all pixels on label edges are set to 1 and all other pixels to 0.

Note

ā€˜binarize’, ā€˜label processing’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto detect_label_edges_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

dilation

Computes the dilation operation between an image and a structuring element. The operation is applied in grayscale if the image is in grayscale. The structuring element is a binary image with pixel values 0 and 1, and must have the same dimensionality as the image (3D if the image is 3D, 2D if the image is 2D).

Deprecated:

This function is deprecated. Consider using erode() instead.

Note

ā€˜binary processing’ ā€˜filter’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param footprint:

Structuring element to use for the operation. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto dilation_func(const Device::Pointer &device, const Array::Pointer &src, const Array::Pointer &footprint, Array::Pointer dst) -> Array::Pointer

dilate_box

Computes a binary image with pixel values 0 and 1 containing the binary dilation of a given input image. The dilation takes the Moore neighborhood (8 pixels in 2D and 26 pixels in 3d) into account. The pixels in the input image with pixel value not equal to 0 will be interpreted as 1. This method is comparable to the ā€˜Dilate’ menu in ImageJ in case it is applied to a 2D image. The only difference is that the output image contains values 0 and 1 instead of 0 and 255.

Deprecated:

This function is deprecated. Consider using dilate() instead.

Note

ā€˜binary processing’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto dilate_box_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

dilate_sphere

Computes a binary image with pixel values 0 and 1 containing the binary dilation of a given input image. The dilation takes the von Neumann neighborhood (4 pixels in 2D and 6 pixels in 3d) into account. The pixels in the input image with pixel value not equal to 0 will be interpreted as 1.

Deprecated:

This function is deprecated. Consider using dilate() instead.

Note

ā€˜binary processing’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto dilate_sphere_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

binary_dilate

Computes a binary image with pixel values 0 and 1 containing the binary dilation of a given input image. The dilation apply the Moore neighborhood (8 pixels in 2D and 26 pixels in 3d) for the ā€œboxā€ connectivity and the von Neumann neighborhood (4 pixels in 2D and 6 pixels in 3d) for a ā€œsphereā€ connectivity. The pixels in the input image with pixel value not equal to 0 will be interpreted as 1.

For a more flexible dilation with arbitrary shapes, use dilation() instead.

Note

ā€˜binary processing’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. Input image to process. [const Array::Pointer &]

param dst:

Output result image. Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius of sphere or box structuring element in X. [float ( = 1 )]

param radius_y:

Radius of sphere or box structuring element in Y. [float ( = 1 )]

param radius_z:

Radius of sphere or box structuring element in Z. [float ( = 1 )]

param connectivity:

Element shape, ā€œboxā€ or ā€œsphereā€. [std::string ( = ā€œboxā€ )]

return:

Array::Pointer

auto binary_dilate_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z, std::string connectivity) -> Array::Pointer

divide_images

Divides two images X and Y by each other pixel wise.

Note

ā€˜combine’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param dividend:

Input image to process. [const Array::Pointer &]

param divisor:

Second input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto divide_images_func(const Device::Pointer &device, const Array::Pointer &dividend, const Array::Pointer &divisor, Array::Pointer dst) -> Array::Pointer

divide_scalar_by_image

Divides a scalar by an image pixel by pixel.

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param scalar:

Scalar value to divide the image with. [float ( = 0 )]

return:

Array::Pointer

auto divide_scalar_by_image_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float scalar) -> Array::Pointer

equal

Determines if two images A and B equal pixel wise.

Note

ā€˜combine’, ā€˜binarize’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

First image to be compared with. [const Array::Pointer &]

param src1:

Second image to be compared with the first. [const Array::Pointer &]

param dst:

Output binary image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto equal_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1, Array::Pointer dst) -> Array::Pointer

equal_constant

Determines if an image A and a constant b are equal.

Note

ā€˜binarize’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image where every pixel is compared to the constant. [const Array::Pointer &]

param dst:

Output binary image. [Array::Pointer ( = None )]

param scalar:

Scalar value to compare pixel with. [float ( = 0 )]

return:

Array::Pointer

auto equal_constant_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float scalar) -> Array::Pointer

erosion

Computes the erosion operation between an image and a structuring element. The operation is applied in grayscale if the image is in grayscale. The structuring element is a binary image with pixel values 0 and 1, and must have the same dimensionality as the image (3D is the image is 3D, 2D if the image is 2D).

Note

ā€˜binary processing’ ā€˜filter’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param footprint:

Structuring element to use for the operation. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto erosion_func(const Device::Pointer &device, const Array::Pointer &src, const Array::Pointer &footprint, Array::Pointer dst) -> Array::Pointer

erode_box

Computes a binary image with pixel values 0 and 1 containing the binary erosion of a given input image. The erosion takes the Moore neighborhood (8 pixels in 2D and 26 pixels in 3d) into account. The pixels in the input image with pixel value not equal to 0 will be interpreted as 1. This method is comparable to the ā€˜Erode’ menu in ImageJ in case it is applied to a 2D image. The only difference is that the output image contains values 0 and 1 instead of 0 and 255.

Deprecated:

This function is deprecated. Consider using erode() instead.

Note

ā€˜binary processing’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto erode_box_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

erode_sphere

Computes a binary image with pixel values 0 and 1 containing the binary erosion of a given input image. The erosion takes the von Neumann neighborhood (4 pixels in 2D and 6 pixels in 3d) into account. The pixels in the input image with pixel value not equal to 0 will be interpreted as 1.

Deprecated:

This function is deprecated. Consider using erode() instead.

Note

ā€˜binary processing’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto erode_sphere_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

binary_erode

Computes a binary image with pixel values 0 and 1 containing the binary erosion of a given input image. The erosion apply the Moore neighborhood (8 pixels in 2D and 26 pixels in 3d) for the ā€œboxā€ connectivity and the von Neumann neighborhood (4 pixels in 2D and 6 pixels in 3d) for a ā€œsphereā€ connectivity. The pixels in the input image with pixel value not equal to 0 will be interpreted as 1.

For a more flexible erosion with arbitrary shapes, use erosion() instead.

Note

ā€˜binary processing’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius of the eroding sphere or box structuring element in X. [float ( = 1 )]

param radius_y:

Radius of the eroding sphere or box structuring element in Y. [float ( = 1 )]

param radius_z:

Radius of the eroding sphere or box structuring element in Z. [float ( = 1 )]

param connectivity:

Element shape, ā€œboxā€ or ā€œsphereā€. [std::string ( = ā€œboxā€ )]

return:

Array::Pointer

auto binary_erode_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z, std::string connectivity) -> Array::Pointer

exponential

Computes the base-e exponential of all pixel values. f(x) = exp(x)

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto exponential_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

flip

Flips an image in X, Y and/or Z direction depending on boolean flags.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param flip_x:

Flip along the x axis if true. [bool ( = True )]

param flip_y:

Flip along the y axis if true. [bool ( = True )]

param flip_z:

Flip along the z axis if true. [bool ( = True )]

return:

Array::Pointer

auto flip_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, bool flip_x, bool flip_y, bool flip_z) -> Array::Pointer

gaussian_blur

Computes the Gaussian blurred image of an image given sigma values in X, Y and Z. Thus, the filter kernel can have nonisotropic shape. The implementation is done separable. In case a sigma equals zero, the direction is not blurred.

Note

ā€˜filter’, ā€˜denoise’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param sigma_x:

Sigma value along the x axis. [float ( = 0 )]

param sigma_y:

Sigma value along the y axis. [float ( = 0 )]

param sigma_z:

Sigma value along the z axis. [float ( = 0 )]

return:

Array::Pointer

auto gaussian_blur_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float sigma_x, float sigma_y, float sigma_z) -> Array::Pointer

gaussian_derivative

Convolves the image with a Gaussian derivative. The filter kernel can have anisotropic sigma and order. The implementation is done separable. In case a sigma equals zero, the direction is not filtered. If all orders are zero, the filtering is equivalent to a Gaussian blur.

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param sigma_x:

Sigma value along the x axis. [float ( = 0 )]

param sigma_y:

Sigma value along the y axis. [float ( = 0 )]

param sigma_z:

Sigma value along the z axis. [float ( = 0 )]

param order_x:

Order of derivation along the x axis. [int ( = 0 )]

param order_y:

Order of derivation along the y axis. [int ( = 0 )]

param order_z:

Order of derivation along the z axis. [int ( = 0 )]

return:

Array::Pointer

auto gaussian_derivative_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float sigma_x, float sigma_y, float sigma_z, int order_x, int order_y, int order_z) -> Array::Pointer

generate_distance_matrix

Computes distances between all points in two point lists. Takes two images containing point lists with shape nƗd and mƗd (n/m: number of points; d: dimensionality) and builds a matrix of pairwise distances. By convention, the distance matrix has size (n + 1) Ɨ (m + 1); the first row and column contain zeros representing distances to a background object. This matches touch-matrix conventions (see generateTouchMatrix), allowing thresholding the distance matrix to obtain a touch matrix.

param device:

Device to perform the operation on. [const Device::Pointer &]

param coordinate_list1:

First coordinate list to process. [const Array::Pointer &]

param coordinate_list2:

Second coordinate list to process. [const Array::Pointer &]

param distance_matrix_destination:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto generate_distance_matrix_func(const Device::Pointer &device, const Array::Pointer &coordinate_list1, const Array::Pointer &coordinate_list2, Array::Pointer distance_matrix_destination) -> Array::Pointer

gradient_x

Computes the gradient of gray values along X. Assuming a, b and c are three adjacent pixels in X direction, the gradient at b is computed as:

Note

ā€˜filter’, ā€˜edge detection’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto gradient_x_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

gradient_y

Computes the gradient of gray values along Y. Assuming a, b and c are three adjacent pixels in Y direction, the gradient at b is computed as:

Note

ā€˜filter’, ā€˜edge detection’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto gradient_y_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

gradient_z

Computes the gradient of gray values along Z. Assuming a, b and c are three adjacent pixels in Z direction, the gradient at b is computed as:

Note

ā€˜filter’, ā€˜edge detection’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto gradient_z_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

greater

Determines if two images A and B greater pixel wise. f(a, b) = 1 if a > b; 0 otherwise.

Note

ā€˜combine’, ā€˜binarize’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

First input image to process. [const Array::Pointer &]

param src1:

Second input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto greater_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1, Array::Pointer dst) -> Array::Pointer

greater_constant

Determines if two images A and B greater pixel wise. f(a, b) = 1 if a > b; 0 otherwise.

Note

ā€˜binarize’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param scalar:

Scalar value to compare pixel with. [float ( = 0 )]

return:

Array::Pointer

auto greater_constant_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float scalar) -> Array::Pointer

greater_or_equal

Determines if two images A and B greater or equal pixel wise. f(a, b) = 1 if a >= b; 0 otherwise.

Note

ā€˜combine’, ā€˜binarize’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

First input image to process. [const Array::Pointer &]

param src1:

Second input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto greater_or_equal_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1, Array::Pointer dst) -> Array::Pointer

greater_or_equal_constant

Determines if two images A and B greater or equal pixel wise. f(a, b) = 1 if a >= b; 0 otherwise.

Note

ā€˜binarize’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param scalar:

Scalar value to compare pixel with. [float ( = 0 )]

return:

Array::Pointer

auto greater_or_equal_constant_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float scalar) -> Array::Pointer

hessian_eigenvalues

Computes the eigenvalues of the hessian matrix of a 2d or 3d image. Hessian matrix or 2D images: [Ixx, Ixy] [Ixy, Iyy] Hessian matrix for 3D images: [Ixx, Ixy, Ixz] [Ixy, Iyy, Iyz] [Ixz, Iyz, Izz], Ixx denotes the second derivative in x. Ixx and Iyy are calculated by convolving the image with the 1d kernel [1 2 1]. Ixy is calculated by a convolution with the 2d kernel: [ 0.25 0 0.25] [ 0 0 0] [0.25 0 0.25]

The function return the list of eigenvalues as images, by decreasing order. The first image is the largest eigenvalue,

Note: This function returns multiple images. This API might be subject to change in the future. Consider using small_hessian_eigenvalue() and/or large_hessian_eigenvalue() instead which return only one image.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param small_eigenvalue:

Output result image. [Array::Pointer ( = None )]

param middle_eigenvalue:

Output result image, null if input is 2D. [Array::Pointer ( = None )]

param large_eigenvalue:

Output result image. [Array::Pointer ( = None )]

return:

std::vector<Array::Pointer>

auto hessian_eigenvalues_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer small_eigenvalue, Array::Pointer middle_eigenvalue, Array::Pointer large_eigenvalue) -> std::vector<Array::Pointer>

laplace_box

Applies the Laplace operator (Box neighborhood) to an image.

Deprecated:

This function is deprecated. Consider using laplace() instead.

Note

ā€˜filter’, ā€˜edge detection’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto laplace_box_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

laplace_diamond

Applies the Laplace operator (Diamond neighborhood) to an image.

Deprecated:

This function is deprecated. Consider using laplace() instead.

Note

ā€˜filter’, ā€˜edge detection’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto laplace_diamond_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

laplace

Applies the Laplace operator with a ā€œboxā€ or a ā€œsphereā€ neighborhood to an image.

Note

ā€˜filter’, ā€˜edge detection’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param connectivity:

Filter neighborhood connectivity, ā€œboxā€ or ā€œsphereā€ [std::string ( = ā€œboxā€ )]

return:

Array::Pointer

auto laplace_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, std::string connectivity) -> Array::Pointer

local_cross_correlation

Compute the cross correlation of an image to a given kernel.

Note

ā€˜filter’, ā€˜combine’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param kernel:

Input kernel. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto local_cross_correlation_func(const Device::Pointer &device, const Array::Pointer &src, const Array::Pointer &kernel, Array::Pointer dst) -> Array::Pointer

logarithm

Computes base e logarithm of all pixels values. f(x) = log(x) Author(s): Peter Haub, Robert Haase

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto logarithm_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

mask

Computes a masked image by applying a binary mask to an image. All pixel values x of image X will be copied to the destination image in case pixel value m at the same position in the mask image is not equal to zero.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param mask:

Mask image to apply. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto mask_func(const Device::Pointer &device, const Array::Pointer &src, const Array::Pointer &mask, Array::Pointer dst) -> Array::Pointer

mask_label

Computes a masked image by applying a label mask to an image. All pixel values x of image X will be copied to the destination image in case pixel value m at the same position in the label_map image has the right index value i.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

Input Intensity image. [const Array::Pointer &]

param src1:

Input Label image. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param label:

Label value to use. [float ( = 1 )]

return:

Array::Pointer

auto mask_label_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1, Array::Pointer dst, float label) -> Array::Pointer

maximum_image_and_scalar

Computes the maximum of a constant scalar s and each pixel value x in a given image X.

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param scalar:

Scalar value used in the comparison. [float ( = 0 )]

return:

Array::Pointer

auto maximum_image_and_scalar_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float scalar) -> Array::Pointer

maximum_images

Computes the maximum of a pair of pixel values x, y from two given images X and Y.

Note

ā€˜combine’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

First input image to process. [const Array::Pointer &]

param src1:

Second input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto maximum_images_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1, Array::Pointer dst) -> Array::Pointer

maximum_box

Computes the local maximum of a pixels cube neighborhood. The cubes size is specified by its halfwidth, halfheight and halfdepth (radius).

Deprecated:

This function is deprecated. Consider using maximum_filter() instead.

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius size along x axis. [float ( = 1 )]

param radius_y:

Radius size along y axis. [float ( = 1 )]

param radius_z:

Radius size along z axis. [float ( = 1 )]

return:

Array::Pointer

auto maximum_box_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z) -> Array::Pointer

maximum_filter

Computes the local maximum of a pixels neighborhood (box or sphere). The neighborhood size is specified by its halfwidth, halfheight and halfdepth (radius).

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius size along x axis. [float ( = 1 )]

param radius_y:

Radius size along y axis. [float ( = 1 )]

param radius_z:

Radius size along z axis. [float ( = 1 )]

param connectivity:

Filter neighborhood connectivity, ā€œboxā€ or ā€œsphereā€ [std::string ( = ā€œboxā€ )]

return:

Array::Pointer

auto maximum_filter_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z, std::string connectivity) -> Array::Pointer

grayscale_dilate

Computes a grayscale image containing the grayscale dilation of a given input image. The erosion apply the Moore neighborhood (8 pixels in 2D and 26 pixels in 3d) for the ā€œboxā€ connectivity and the von Neumann neighborhood (4 pixels in 2D and 6 pixels in 3d) for a ā€œsphereā€ connectivity. The pixels in the input image with pixel value not equal to 0 will be interpreted as 1.

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius size along x axis. [float ( = 1 )]

param radius_y:

Radius size along y axis. [float ( = 1 )]

param radius_z:

Radius size along z axis. [float ( = 1 )]

param connectivity:

Filter neighborhood connectivity, ā€œboxā€ or ā€œsphereā€ [std::string ( = ā€œboxā€ )]

return:

Array::Pointer

auto grayscale_dilate_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z, std::string connectivity) -> Array::Pointer

maximum_x_projection

Determines the maximum intensity projection of an image along X.

Note

ā€˜projection’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto maximum_x_projection_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

maximum_y_projection

Determines the maximum intensity projection of an image along X.

Note

ā€˜projection’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto maximum_y_projection_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

maximum_z_projection

Determines the maximum intensity projection of an image along Z.

Note

ā€˜projection’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto maximum_z_projection_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

mean_box

Computes the local mean average of a pixels boxshaped neighborhood. The cubes size is specified by its halfwidth, halfheight and halfdepth (radius).

Deprecated:

This function is deprecated. Consider using mean() instead.

Note

ā€˜filter’, ā€˜denoise’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius size along x axis. [float ( = 1 )]

param radius_y:

Radius size along y axis. [float ( = 1 )]

param radius_z:

Radius size along z axis. [float ( = 1 )]

return:

Array::Pointer

auto mean_box_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z) -> Array::Pointer

mean_sphere

Computes the local mean average of a pixels spherical neighborhood. The spheres size is specified by its halfwidth, halfheight and halfdepth (radius).

Deprecated:

This function is deprecated. Consider using mean() instead.

Note

ā€˜filter’, ā€˜denoise’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius size along x axis. [float ( = 1 )]

param radius_y:

Radius size along y axis. [float ( = 1 )]

param radius_z:

Radius size along z axis. [float ( = 1 )]

return:

Array::Pointer

auto mean_sphere_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z) -> Array::Pointer

mean_filter

Computes the local mean average of a pixels neighborhood defined as a boxshaped or a sphereshaped. The shape size is specified by its halfwidth, halfheight and halfdepth (radius).

Note

ā€˜filter’, ā€˜denoise’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius size along x axis. [float ( = 1 )]

param radius_y:

Radius size along y axis. [float ( = 1 )]

param radius_z:

Radius size along z axis. [float ( = 1 )]

param connectivity:

Filter neighborhood connectivity, ā€œboxā€ or ā€œsphereā€ [std::string ( = ā€œboxā€ )]

return:

Array::Pointer

auto mean_filter_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z, std::string connectivity) -> Array::Pointer

mean_x_projection

Determines the mean average intensity projection of an image along X.

Note

ā€˜projection’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto mean_x_projection_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

mean_y_projection

Determines the mean average intensity projection of an image along Y.

Note

ā€˜projection’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto mean_y_projection_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

mean_z_projection

Determines the mean average intensity projection of an image along Z.

Note

ā€˜projection’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto mean_z_projection_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

median_box

Computes the local median of a pixels box shaped neighborhood. The box is specified by its halfwidth and halfheight (radius). For technical reasons, the area of the box must have less than 1000 pixels.

Deprecated:

This function is deprecated. Consider using median() instead.

Note

ā€˜filter’, ā€˜denoise’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius size along x axis. [float ( = 1 )]

param radius_y:

Radius size along y axis. [float ( = 1 )]

param radius_z:

Radius size along z axis. [float ( = 1 )]

return:

Array::Pointer

auto median_box_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z) -> Array::Pointer

median_sphere

Computes the local median of a pixels sphere shaped neighborhood. The sphere is specified by its halfwidth and halfheight (radius). For technical reasons, the area of the box must have less than 1000 pixels.

Deprecated:

This function is deprecated. Consider using median() instead.

Note

ā€˜filter’, ā€˜denoise’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius size along x axis. [float ( = 1 )]

param radius_y:

Radius size along y axis. [float ( = 1 )]

param radius_z:

Radius size along z axis. [float ( = 1 )]

return:

Array::Pointer

auto median_sphere_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z) -> Array::Pointer

median

Computes the local median of a pixels neighborhood. The neighborhood is defined as a box or a sphere shape. Its size is specified by its halfwidth, halfheight, and halfdepth (radius). For technical reasons, the area of the shpae must have less than 1000 pixels.

Note

ā€˜filter’, ā€˜denoise’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius size along x axis. [float ( = 1 )]

param radius_y:

Radius size along y axis. [float ( = 1 )]

param radius_z:

Radius size along z axis. [float ( = 1 )]

param connectivity:

Filter neighborhood connectivity, ā€œboxā€ or ā€œsphereā€ [std::string ( = ā€œboxā€ )]

return:

Array::Pointer

auto median_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z, std::string connectivity) -> Array::Pointer

minimum_box

Computes the local minimum of a pixels cube neighborhood. The cubes size is specified by its halfwidth, halfheight and halfdepth (radius).

Deprecated:

This function is deprecated. Consider using minimum_filter() instead.

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius size along x axis. [float ( = 1 )]

param radius_y:

Radius size along y axis. [float ( = 1 )]

param radius_z:

Radius size along z axis. [float ( = 1 )]

return:

Array::Pointer

auto minimum_box_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z) -> Array::Pointer

minimum_filter

Computes the local minimum of a pixels cube neighborhood. The cubes size is specified by its halfwidth, halfheight and halfdepth (radius).

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius size along x axis. [float ( = 1 )]

param radius_y:

Radius size along y axis. [float ( = 1 )]

param radius_z:

Radius size along z axis. [float ( = 1 )]

param connectivity:

Filter neighborhood connectivity, ā€œboxā€ or ā€œsphereā€ [std::string ( = ā€œboxā€ )]

return:

Array::Pointer

auto minimum_filter_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z, std::string connectivity) -> Array::Pointer

grayscale_erode

Computes a grayscale image containing the grayscale erosion of a given input image. The erosion apply the Mooreneighborhood (8 pixels in 2D and 26 pixels in 3d) for the ā€œboxā€ connectivity and the vonNeumannneighborhood (4 pixels in 2D and 6 pixels in 3d) for a ā€œsphereā€ connectivity. The pixels in the input image with pixel value not equal to 0 will be interpreted as 1.

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius size along x axis. [float ( = 1 )]

param radius_y:

Radius size along y axis. [float ( = 1 )]

param radius_z:

Radius size along z axis. [float ( = 1 )]

param connectivity:

Filter neighborhood connectivity, ā€œboxā€ or ā€œsphereā€ [std::string ( = ā€œboxā€ )]

return:

Array::Pointer

auto grayscale_erode_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z, std::string connectivity) -> Array::Pointer

minimum_image_and_scalar

Computes the minimum of a constant scalar s and each pixel value x in a given image X.

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param scalar:

Scalar value used in the comparison. [float ( = 0 )]

return:

Array::Pointer

auto minimum_image_and_scalar_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float scalar) -> Array::Pointer

minimum_images

Computes the minimum of a pair of pixel values x, y from two given images X and Y.

Note

ā€˜combine’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

First input image to process. [const Array::Pointer &]

param src1:

Second input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto minimum_images_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1, Array::Pointer dst) -> Array::Pointer

minimum_x_projection

Determines the minimum intensity projection of an image along Y.

Note

ā€˜projection’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto minimum_x_projection_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

minimum_y_projection

Determines the minimum intensity projection of an image along Y.

Note

ā€˜projection’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto minimum_y_projection_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

minimum_z_projection

Determines the minimum intensity projection of an image along Z.

Note

ā€˜projection’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto minimum_z_projection_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer
auto minimum_of_masked_pixels_reduction_func(const Device::Pointer &device, const Array::Pointer &src, const Array::Pointer &mask, Array::Pointer reduced_src, Array::Pointer reduced_mask) -> Array::Pointer

mode_box

Computes the local mode of a pixels box shaped neighborhood. This can be used to postprocess and locally correct semantic segmentation results. The box is specified by its halfwidth and halfheight (radius). For technical reasons, the intensities must lie within a range from 0 to 255. In case multiple values have maximum frequency, the smallest one is returned.

Deprecated:

This function is deprecated. Consider using mode() instead.

Note

ā€˜label processing’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius size along x axis. [float ( = 1 )]

param radius_y:

Radius size along y axis. [float ( = 1 )]

param radius_z:

Radius size along z axis. [float ( = 1 )]

return:

Array::Pointer

auto mode_box_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z) -> Array::Pointer

mode_sphere

Computes the local mode of a pixels sphere shaped neighborhood. This can be used to postprocess and locally correct semantic segmentation results. The sphere is specified by its halfwidth and halfheight (radius). For technical reasons, the intensities must lie within a range from 0 to 255. In case multiple values have maximum frequency, the smallest one is returned.

Deprecated:

This function is deprecated. Consider using mode() instead.

Note

ā€˜label processing’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius size along x axis. [float ( = 1 )]

param radius_y:

Radius size along y axis. [float ( = 1 )]

param radius_z:

Radius size along z axis. [float ( = 1 )]

return:

Array::Pointer

auto mode_sphere_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z) -> Array::Pointer

mode

Computes the local mode of a pixels neighborhood. This neighborhood can be shaped as a box or a sphere. This can be used to postprocess and locally correct semantic segmentation results. The shape size is specified by its halfwidth, halfheight, and halfdepth (radius). For technical reasons, the intensities must lie within a range from 0 to 255 (uint8). In case multiple values have maximum frequency, the smallest one is returned.

Note

ā€˜label processing’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius size along x axis. [float ( = 1 )]

param radius_y:

Radius size along y axis. [float ( = 1 )]

param radius_z:

Radius size along z axis. [float ( = 1 )]

param connectivity:

Filter neighborhood connectivity, ā€œboxā€ or ā€œsphereā€ [std::string ( = ā€œboxā€ )]

return:

Array::Pointer

auto mode_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z, std::string connectivity) -> Array::Pointer

modulo_images

Computes the remainder of a division of pairwise pixel values in two images

Note

ā€˜combine’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

First input image to process. [const Array::Pointer &]

param src1:

Second input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto modulo_images_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1, Array::Pointer dst) -> Array::Pointer

multiply_image_and_position

Multiplies all pixel intensities with the x, y or z coordinate, depending on specified dimension.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param dimension:

Dimension (0,1,2) to use in the operation. [int ( = 0 )]

return:

Array::Pointer

auto multiply_image_and_position_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, int dimension) -> Array::Pointer

multiply_image_and_scalar

Multiplies all pixels value x in a given image X with a constant scalar s.

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

The input image to be multiplied with a constant. [const Array::Pointer &]

param dst:

Output image where results are written into. [Array::Pointer ( = None )]

param scalar:

The number with which every pixel will be multiplied with. [float ( = 0 )]

return:

Array::Pointer

auto multiply_image_and_scalar_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float scalar) -> Array::Pointer

multiply_images

Multiplies all pairs of pixel values x and y from two image X and Y.

Note

ā€˜combine’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

First input image to be multiplied. [const Array::Pointer &]

param src1:

Second image to be multiplied. [const Array::Pointer &]

param dst:

Output image where results are written into. [Array::Pointer ( = None )]

return:

Array::Pointer

auto multiply_images_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1, Array::Pointer dst) -> Array::Pointer

nan_to_num

Copies all pixels instead those which are not a number (NaN), or positive/negative infinity which are replaced by a defined new value, default 0. This function aims to work similarly as its counterpart in numpy [1]. Default values for posinf and neginf may differ from numpy and even differ depending on compute hardware. It is recommended to specify those values.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output image where results are written into. [Array::Pointer ( = None )]

param nan:

Value to replace nan with. [float ( = 0 )]

param posinf:

Value to replace +inf with. [float ( = np.nan_to_num(float(ā€˜inf’)) )]

param neginf:

Value to replace -inf with. [float ( = np.nan_to_num(float(ā€˜-inf’)) )]

return:

Array::Pointer

auto nan_to_num_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float nan = 0, float posinf = pINF, float neginf = nINF) -> Array::Pointer

nonzero_maximum_box

Apply a maximum filter (box shape) to the input image. The radius is fixed to 1 and pixels with value 0 are ignored. Note: Pixels with 0 value in the input image will not be overwritten in the output image. Thus, the result image should be initialized by copying the original image in advance.

Deprecated:

This function is deprecated. Consider using nonzero_maximum() instead.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst0:

Output flag (0 or 1). [Array::Pointer]

param dst1:

Output image where results are written into. [Array::Pointer ( = None )]

return:

Array::Pointer

auto nonzero_maximum_box_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst0, Array::Pointer dst1) -> Array::Pointer

nonzero_maximum_diamond

Apply a maximum filter (diamond shape) to the input image. The radius is fixed to 1 and pixels with value 0 are ignored. Note: Pixels with 0 value in the input image will not be overwritten in the output image. Thus, the result image should be initialized by copying the original image in advance.

Deprecated:

This function is deprecated. Consider using nonzero_maximum() instead.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst0:

Output flag (0 or 1). [Array::Pointer]

param dst1:

Output image where results are written into. [Array::Pointer ( = None )]

return:

Array::Pointer

auto nonzero_maximum_diamond_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst0, Array::Pointer dst1) -> Array::Pointer

nonzero_maximum

Apply a maximum filter of a neighborhood to the input image. The neighborhood shape can be a box or a sphere. The size is fixed to 1 and pixels with value 0 are ignored. Note: Pixels with 0 value in the input image will not be overwritten in the output image. Thus, the result image should be initialized by copying the original image in advance.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst0:

Output flag (0 or 1). [Array::Pointer]

param dst1:

Output image where results are written into. [Array::Pointer ( = None )]

param connectivity:

Filter neighborhood connectivity, ā€œboxā€ or ā€œsphereā€ [std::string ( = ā€œboxā€ )]

return:

Array::Pointer

auto nonzero_maximum_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst0, Array::Pointer dst1, std::string connectivity) -> Array::Pointer

nonzero_minimum_box

Apply a minimum filter (box shape) to the input image. The radius is fixed to 1 and pixels with value 0 are ignored. Note: Pixels with 0 value in the input image will not be overwritten in the output image. Thus, the result image should be initialized by copying the original image in advance.

Deprecated:

This function is deprecated. Consider using nonzero_minimum() instead.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst0:

Output flag (0 or 1). [Array::Pointer]

param dst1:

Output image where results are written into. [Array::Pointer ( = None )]

return:

Array::Pointer

auto nonzero_minimum_box_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst0, Array::Pointer dst1) -> Array::Pointer

nonzero_minimum_diamond

Apply a minimum filter (diamond shape) to the input image. The radius is fixed to 1 and pixels with value 0 are ignored.Note: Pixels with 0 value in the input image will not be overwritten in the output image. Thus, the result image should be initialized by copying the original image in advance.

Deprecated:

This function is deprecated. Consider using nonzero_minimum() instead.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst0:

Output flag (0 or 1). [Array::Pointer]

param dst1:

Output image where results are written into. [Array::Pointer ( = None )]

return:

Array::Pointer

auto nonzero_minimum_diamond_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst0, Array::Pointer dst1) -> Array::Pointer

nonzero_minimum

Apply a minimum filter of a neighborhood to the input image. The neighborhood shape can be a box or a sphere. The radius is fixed to 1 and pixels with value 0 are ignored.Note: Pixels with 0 value in the input image will not be overwritten in the output image. Thus, the result image should be initialized by copying the original image in advance.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst0:

Output flag (0 or 1). [Array::Pointer]

param dst1:

Output image where results are written into. [Array::Pointer ( = None )]

param connectivity:

Filter neigborhood connectivity, ā€œboxā€ or ā€œsphereā€ [std::string ( = ā€œboxā€ )]

return:

Array::Pointer

auto nonzero_minimum_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst0, Array::Pointer dst1, std::string connectivity) -> Array::Pointer

not_equal

Determines if two images A and B equal pixel wise. f(a, b) = 1 if a != b; 0 otherwise.

Note

ā€˜combine’, ā€˜binarize’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

First image to be compared with. [const Array::Pointer &]

param src1:

Second image to be compared with the first. [const Array::Pointer &]

param dst:

The resulting binary image where pixels will be 1 only if source1 [Array::Pointer ( = None )]

return:

Array::Pointer

auto not_equal_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1, Array::Pointer dst) -> Array::Pointer

not_equal_constant

Determines if two images A and B equal pixel wise. f(a, b) = 1 if a != b; 0 otherwise.

Note

ā€˜binarize’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

The image where every pixel is compared to the constant. [const Array::Pointer &]

param dst:

The resulting binary image where pixels will be 1 only if source1 [Array::Pointer ( = None )]

param scalar:

The constant where every pixel is compared to. [float ( = 0 )]

return:

Array::Pointer

auto not_equal_constant_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float scalar) -> Array::Pointer

paste

Pastes an image into another image at a given position.

Note

ā€˜combine’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param destination_x:

Origin pixel coodinate in x to paste. [int ( = 0 )]

param destination_y:

Origin pixel coodinate in y to paste. [int ( = 0 )]

param destination_z:

Origin pixel coodinate in z to paste. [int ( = 0 )]

return:

Array::Pointer

auto paste_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, int destination_x, int destination_y, int destination_z) -> Array::Pointer

onlyzero_overwrite_maximum_box

Apply a local maximum filter to an image which only overwrites pixels with value 0.

Deprecated:

This function is deprecated. Consider using onlyzero_overwrite_maximum() instead.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param flag:

Output flag value, 0 or 1. [Array::Pointer]

param dst:

Output image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto onlyzero_overwrite_maximum_box_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer flag, Array::Pointer dst) -> Array::Pointer

onlyzero_overwrite_maximum_diamond

Apply a local maximum filter to an image which only overwrites pixels with value 0.

Deprecated:

This function is deprecated. Consider using onlyzero_overwrite_maximum() instead.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param flag:

Output flag value, 0 or 1. [Array::Pointer]

param dst:

Output image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto onlyzero_overwrite_maximum_diamond_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer flag, Array::Pointer dst) -> Array::Pointer

onlyzero_overwrite_maximum

Apply a local maximum filter to an image which only overwrites pixels with value 0.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param flag:

Output flag value, 0 or 1. [Array::Pointer]

param dst:

Output image. [Array::Pointer ( = None )]

param connectivity:

Filter neigborhood connectivity, ā€œboxā€ or ā€œsphereā€ [std::string ( = ā€œboxā€ )]

return:

Array::Pointer

auto onlyzero_overwrite_maximum_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer flag, Array::Pointer dst, std::string connectivity) -> Array::Pointer

power

Computes all pixels value x to the power of a given exponent a.

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param scalar:

Power value. [float ( = 1 )]

return:

Array::Pointer

auto power_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float scalar) -> Array::Pointer

power_images

Calculates x to the power of y pixel wise of two images X and Y.

Note

ā€˜combine’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

First input image to process. [const Array::Pointer &]

param src1:

Second input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto power_images_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1, Array::Pointer dst) -> Array::Pointer

range

Crops an image according to a defined range and step size.

Note

ā€˜transform’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

First input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param start_x:

Range starting value in x [int ( = None )]

param stop_x:

Range stop value in x [int ( = None )]

param step_x:

Range step value in x [int ( = None )]

param start_y:

Range starting value in y [int ( = None )]

param stop_y:

Range stop value in y [int ( = None )]

param step_y:

Range step value in y [int ( = None )]

param start_z:

Range starting value in z [int ( = None )]

param stop_z:

Range stop value in z [int ( = None )]

param step_z:

Range step value in z [int ( = None )]

return:

Array::Pointer

auto range_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, int start_x, int stop_x, int step_x, int start_y, int stop_y, int step_y, int start_z, int stop_z, int step_z) -> Array::Pointer

read_values_from_positions

Go to positions in a given image specified by a pointlist and read intensities of those pixels. The intensities are stored in a new vector. The positions are passed as a (x,y,z) coordinate per column.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param list:

List of coordinate, as a 2D matrix. [const Array::Pointer &]

param dst:

Output vector image of intensities. [Array::Pointer ( = None )]

return:

Array::Pointer

auto read_values_from_positions_func(const Device::Pointer &device, const Array::Pointer &src, const Array::Pointer &list, Array::Pointer dst) -> Array::Pointer

replace_values

Replaces integer intensities specified in a vector image. The values are passed as a vector of values. The vector index represents the old intensity and the value at that position represents the new intensity.s

Note

ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

Input image to process. [const Array::Pointer &]

param src1:

List of intensities to replace, as a vector of values. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto replace_values_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1, Array::Pointer dst) -> Array::Pointer

replace_value

Replaces a specific intensity in an image with a given new value.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param value_to_replace:

Old value. [float ( = 0 )]

param value_replacement:

New value. [float ( = 1 )]

return:

Array::Pointer

auto replace_value_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float value_to_replace, float value_replacement) -> Array::Pointer

replace_intensity

Replaces a specific intensity in an image with a given new value.

Deprecated:

This function is deprecated. Consider using replace_value() instead.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param value_to_replace:

Old value. [float ( = 0 )]

param value_replacement:

New value. [float ( = 1 )]

return:

Array::Pointer

auto replace_intensity_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float value_to_replace, float value_replacement) -> Array::Pointer

replace_intensities

Replaces integer intensities specified in a vector image. The values are passed as a vector of values. The vector index represents the old intensity and the value at that position represents the new intensity.s

Deprecated:

This function is deprecated. Consider using replace_values() instead.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

Input image to process. [const Array::Pointer &]

param src1:

List of intensities to replace, as a vector of values. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto replace_intensities_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1, Array::Pointer dst) -> Array::Pointer

maximum_sphere

Computes the local maximum of a pixels spherical neighborhood. The spheres size is specified by its halfwidth, halfheight and halfdepth (radius).

Deprecated:

This function is deprecated. Consider using maximum() instead.

Note

ā€˜filter’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius size along x axis. [float ( = 1 )]

param radius_y:

Radius size along y axis. [float ( = 1 )]

param radius_z:

Radius size along z axis. [float ( = 0 )]

return:

Array::Pointer

auto maximum_sphere_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z) -> Array::Pointer

minimum_sphere

Computes the local minimum of a pixels spherical neighborhood. The spheres size is specified by its halfwidth, halfheight and halfdepth (radius).

Deprecated:

This function is deprecated. Consider using minimum() instead.

Note

ā€˜filter’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius size along x axis. [float ( = 1 )]

param radius_y:

Radius size along y axis. [float ( = 1 )]

param radius_z:

Radius size along z axis. [float ( = 1 )]

return:

Array::Pointer

auto minimum_sphere_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z) -> Array::Pointer

multiply_matrix

Multiplies two matrices with each other. Shape of matrix1 should be equal to shape of matrix2 transposed.

param device:

Device to perform the operation on. [const Device::Pointer &]

param matrix1:

First matrix to process. [const Array::Pointer &]

param matrix2:

Second matrix to process. [const Array::Pointer &]

param matrix_destination:

Output result matrix. [Array::Pointer ( = None )]

return:

Array::Pointer

auto multiply_matrix_func(const Device::Pointer &device, const Array::Pointer &matrix1, const Array::Pointer &matrix2, Array::Pointer matrix_destination) -> Array::Pointer

pad

Pads an image with a given size along dimensions with a given value.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param size_x:

New size along x axis. [int ( = 0 )]

param size_y:

New size along y axis. [int ( = 0 )]

param size_z:

New size along z axis. [int ( = 0 )]

param value:

Value to pad with. [float ( = 0 )]

param center:

Center the image in the middle of the padded image. [bool ( = False )]

return:

Array::Pointer

auto pad_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, size_t size_x, size_t size_y, size_t size_z, float value, bool center) -> Array::Pointer

unpad

Removes padding from an image along dimensions.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param size_x:

New size along x axis. [int ( = 0 )]

param size_y:

New size along y axis. [int ( = 0 )]

param size_z:

New size along z axis. [int ( = 0 )]

param center:

Center the image in the middle of the padded image. [bool ( = False )]

return:

Array::Pointer

auto unpad_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, size_t size_x, size_t size_y, size_t size_z, bool center) -> Array::Pointer

reciprocal

Computes 1/x for every pixel value This function is supposed to work similarly to its counter part in numpy [1]

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto reciprocal_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

set

Sets all pixel values x of a given image X to a constant value v.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param scalar:

Value to set. [float ( = 0 )]

return:

Array::Pointer

auto set_func(const Device::Pointer &device, const Array::Pointer &src, float scalar) -> Array::Pointer

set_column

Sets all pixel values x of a given column in X to a constant value v.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param column_index:

Column index. [int ( = 0 )]

param value:

Value to set. [float ( = 0 )]

return:

Array::Pointer

auto set_column_func(const Device::Pointer &device, const Array::Pointer &src, int column_index, float value) -> Array::Pointer

set_image_borders

Sets all pixel values at the image border to a given value.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param value:

Value to set. [float ( = 0 )]

return:

Array::Pointer

auto set_image_borders_func(const Device::Pointer &device, const Array::Pointer &src, float value) -> Array::Pointer

set_plane

Sets all pixel values x of a given plane in X to a constant value v.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param plane_index:

Plane index. [int ( = 0 )]

param value:

Value to set. [float ( = 0 )]

return:

Array::Pointer

auto set_plane_func(const Device::Pointer &device, const Array::Pointer &src, int plane_index, float value) -> Array::Pointer

set_ramp_x

Sets all pixel values to their X coordinate.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

return:

Array::Pointer

auto set_ramp_x_func(const Device::Pointer &device, const Array::Pointer &src) -> Array::Pointer

set_ramp_y

Sets all pixel values to their Y coordinate.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

return:

Array::Pointer

auto set_ramp_y_func(const Device::Pointer &device, const Array::Pointer &src) -> Array::Pointer

set_ramp_z

Sets all pixel values to their Z coordinate.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

return:

Array::Pointer

auto set_ramp_z_func(const Device::Pointer &device, const Array::Pointer &src) -> Array::Pointer

set_row

Sets all pixel values x of a given row in X to a constant value v.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param row_index:

[int ( = 0 )]

param value:

[float ( = 0 )]

return:

Array::Pointer

auto set_row_func(const Device::Pointer &device, const Array::Pointer &src, int row_index, float value) -> Array::Pointer

set_nonzero_pixels_to_pixelindex

Replaces all 0 value pixels in an image with the index of a pixel.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output image. [Array::Pointer ( = None )]

param offset:

Offset value to start the indexing. [int ( = 1 )]

return:

Array::Pointer

auto set_nonzero_pixels_to_pixelindex_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, int offset) -> Array::Pointer

set_where_x_equals_y

Sets all pixel values a of a given image A to a constant value v in case its coordinates x == y. Otherwise the pixel is not overwritten. If you want to initialize an identity transfrom matrix, set all pixels to 0 first.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param value:

Value to set. [float ( = 0 )]

return:

Array::Pointer

auto set_where_x_equals_y_func(const Device::Pointer &device, const Array::Pointer &src, float value) -> Array::Pointer

set_where_x_greater_than_y

Sets all pixel values a of a given image A to a constant value v in case its coordinates x > y. Otherwise the pixel is not overwritten. If you want to initialize an identity transfrom matrix, set all pixels to 0 first.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param value:

Value to set. [float ( = 0 )]

return:

Array::Pointer

auto set_where_x_greater_than_y_func(const Device::Pointer &device, const Array::Pointer &src, float value) -> Array::Pointer

set_where_x_smaller_than_y

Sets all pixel values a of a given image A to a constant value v in case its coordinates x < y. Otherwise the pixel is not overwritten. If you want to initialize an identity transfrom matrix, set all pixels to 0 first.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param value:

Value to set. [float ( = 0 )]

return:

Array::Pointer

auto set_where_x_smaller_than_y_func(const Device::Pointer &device, const Array::Pointer &src, float value) -> Array::Pointer

sign

Extracts the sign of pixels. If a pixel value < 0, resulting pixel value will be 1. If it was > 0, it will be 1. Otherwise it will be 0. This function aims to work similarly as its counterpart in numpy [1].

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto sign_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

smaller

Determines if two images A and B smaller pixel wise. f(a, b) = 1 if a < b; 0 otherwise.

Note

ā€˜combine’, ā€˜binarize’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

First input image to process. [const Array::Pointer &]

param src1:

Second input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto smaller_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1, Array::Pointer dst) -> Array::Pointer

smaller_constant

Determines if two images A and B smaller pixel wise. f(a, b) = 1 if a < b; 0 otherwise.

Note

ā€˜binarize’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param scalar:

Scalar used in the comparison. [float ( = 0 )]

return:

Array::Pointer

auto smaller_constant_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float scalar) -> Array::Pointer

smaller_or_equal

Determines if two images A and B smaller or equal pixel wise. f(a, b) = 1 if a <= b; 0 otherwise.

Note

ā€˜combine’, ā€˜binarize’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

First input image to process. [const Array::Pointer &]

param src1:

Second input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto smaller_or_equal_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1, Array::Pointer dst) -> Array::Pointer

smaller_or_equal_constant

Determines if two images A and B smaller or equal pixel wise. f(a, b) = 1 if a <= b; 0 otherwise.

Note

ā€˜binarize’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param scalar:

Scalar used in the comparison. [float ( = 0 )]

return:

Array::Pointer

auto smaller_or_equal_constant_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float scalar) -> Array::Pointer

sobel

Convolve the image with the Sobel kernel. Author(s): Ruth WhelanJeans, Robert Haase

Note

ā€˜filter’, ā€˜edge detection’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto sobel_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

square_root

Computes the square root of each pixel.

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto square_root_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

std_z_projection

Determines the standard deviation intensity projection of an image stack along Z.

Note

ā€˜projection’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto std_z_projection_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

subtract_image_from_scalar

Subtracts one image X from a scalar s pixel wise.

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param scalar:

Scalar used in the subtraction. [float ( = 0 )]

return:

Array::Pointer

auto subtract_image_from_scalar_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float scalar) -> Array::Pointer

sum_reduction_x

Takes an image and reduces it in width by factor blocksize. The new pixels contain the sum of the reduced pixels. For example, given the following image and block size 4: [0, 1, 1, 0, 1, 0, 1, 1] would lead to an image [2, 3]

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param blocksize:

Blocksize value. [int ( = 256 )]

return:

Array::Pointer

auto sum_reduction_x_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, int blocksize) -> Array::Pointer

sum_x_projection

Determines the sum intensity projection of an image along Z.

Note

ā€˜projection’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto sum_x_projection_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

sum_y_projection

Determines the sum intensity projection of an image along Z.

Note

ā€˜projection’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto sum_y_projection_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

sum_z_projection

Determines the sum intensity projection of an image along Z.

Note

ā€˜projection’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto sum_z_projection_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

transpose_xy

Transpose X and Y axes of an image.

Note

ā€˜transform’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

The input image. [const Array::Pointer &]

param dst:

Output image where results are written into. [Array::Pointer ( = None )]

return:

Array::Pointer

auto transpose_xy_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

transpose_xz

Transpose X and Z axes of an image.

Note

ā€˜transform’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

The input image. [const Array::Pointer &]

param dst:

Output image where results are written into. [Array::Pointer ( = None )]

return:

Array::Pointer

auto transpose_xz_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

transpose_yz

Transpose Y and Z axes of an image.

Note

ā€˜transform’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

The input image. [const Array::Pointer &]

param dst:

Output image where results are written into. [Array::Pointer ( = None )]

return:

Array::Pointer

auto transpose_yz_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

undefined_to_zero

Copies all pixels instead those which are not a number (NaN) or infinity (inf), which are replaced by 0.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto undefined_to_zero_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

variance_box

Computes the local variance of a pixels box neighborhood. The box size is specified by its halfwidth, halfheight and halfdepth (radius). If 2D images are given, radius_z will be ignored.

Deprecated:

This function is deprecated. Consider using variance() instead.

Note

ā€˜filter’, ā€˜edge detection’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius size along x axis. [float ( = 1 )]

param radius_y:

Radius size along y axis. [float ( = 1 )]

param radius_z:

Radius size along z axis. [float ( = 1 )]

return:

Array::Pointer

auto variance_box_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z) -> Array::Pointer

variance_sphere

Computes the local variance of a pixels sphere neighborhood. The sphere size is specified by its halfwidth, halfheight and halfdepth (radius). If 2D images are given, radius_z will be ignored.

Deprecated:

This function is deprecated. Consider using variance() instead.

Note

ā€˜filter’, ā€˜edge detection’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius size along x axis. [float ( = 1 )]

param radius_y:

Radius size along y axis. [float ( = 1 )]

param radius_z:

Radius size along z axis. [float ( = 1 )]

return:

Array::Pointer

auto variance_sphere_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z) -> Array::Pointer

variance_filter

Computes the local variance of a pixels neighborhood (box or sphere). The neighborhood size is specified by its halfwidth, halfheight and halfdepth (radius). If 2D images are given, radius_z will be ignored.

Note

ā€˜filter’, ā€˜edge detection’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius size along x axis. [float ( = 1 )]

param radius_y:

Radius size along y axis. [float ( = 1 )]

param radius_z:

Radius size along z axis. [float ( = 1 )]

param connectivity:

Filter neigborhood connectivity, ā€œboxā€ or ā€œsphereā€ [std::string ( = ā€œboxā€ )]

return:

Array::Pointer

auto variance_filter_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z, std::string connectivity) -> Array::Pointer

write_values_to_positions

Takes an image with three/four rows (2D: height = 3; 3D: height = 4): x, y [, z] and v and target image. The value v will be written at position x/y[/z] in the target image.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto write_values_to_positions_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

x_position_of_maximum_x_projection

Determines an Xposition of the maximum intensity along X and writes it into the resulting image. If there are multiple xslices with the same value, the smallest X will be chosen.

Note

ā€˜projection’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image stack [const Array::Pointer &]

param dst:

altitude map [Array::Pointer ( = None )]

return:

Array::Pointer

auto x_position_of_maximum_x_projection_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

x_position_of_minimum_x_projection

Determines an Xposition of the minimum intensity along X and writes it into the resulting image. If there are multiple xslices with the same value, the smallest X will be chosen.

Note

ā€˜projection’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image stack [const Array::Pointer &]

param dst:

altitude map [Array::Pointer ( = None )]

return:

Array::Pointer

auto x_position_of_minimum_x_projection_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

y_position_of_maximum_y_projection

Determines an Yposition of the maximum intensity along Y and writes it into the resulting image. If there are multiple yslices with the same value, the smallest Y will be chosen.

Note

ā€˜projection’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image stack [const Array::Pointer &]

param dst:

altitude map [Array::Pointer ( = None )]

return:

Array::Pointer

auto y_position_of_maximum_y_projection_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

y_position_of_minimum_y_projection

Determines an Yposition of the minimum intensity along Y and writes it into the resulting image. If there are multiple yslices with the same value, the smallest Y will be chosen.

Note

ā€˜projection’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image stack [const Array::Pointer &]

param dst:

altitude map [Array::Pointer ( = None )]

return:

Array::Pointer

auto y_position_of_minimum_y_projection_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

z_position_of_maximum_z_projection

Determines a Zposition of the maximum intensity along Z and writes it into the resulting image. If there are multiple zslices with the same value, the smallest Z will be chosen.

Note

ā€˜projection’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image stack [const Array::Pointer &]

param dst:

altitude map [Array::Pointer ( = None )]

return:

Array::Pointer

auto z_position_of_maximum_z_projection_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

z_position_of_minimum_z_projection

Determines a Zposition of the minimum intensity along Z and writes it into the resulting image. If there are multiple zslices with the same value, the smallest Z will be chosen.

Note

ā€˜projection’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image stack [const Array::Pointer &]

param dst:

altitude map [Array::Pointer ( = None )]

return:

Array::Pointer

auto z_position_of_minimum_z_projection_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

z_position_projection

Project a defined Z-slice of a 3D stack into a 2D image. Which Z-slice is defined as the position image, which represents an altitude map.

Note

ā€˜projection’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image stack [const Array::Pointer &]

param position:

altitude map [const Array::Pointer &]

param dst:

Output image [Array::Pointer ( = None )]

return:

Array::Pointer

auto z_position_projection_func(const Device::Pointer &device, const Array::Pointer &src, const Array::Pointer &position, Array::Pointer dst) -> Array::Pointer

mean_of_touching_neighbors

Compute the mean_of_touching_neighbors

param device:

Device to perform the operation on. [const Device::Pointer &]

param vector:

Input vector to process. [const Array::Pointer &]

param matrix:

Input adjacency matrix to process. [const Array::Pointer &]

param dst:

Output result vector. [Array::Pointer ( = None )]

return:

Array::Pointer

auto mean_of_touching_neighbors_func(const Device::Pointer &device, const Array::Pointer &vector, const Array::Pointer &matrix, Array::Pointer dst) -> Array::Pointer

median_of_touching_neighbors

Compute the median_of_touching_neighbors

param device:

Device to perform the operation on. [const Device::Pointer &]

param vector:

Input vector to process. [const Array::Pointer &]

param matrix:

Input adjacency matrix to process. [const Array::Pointer &]

param dst:

Output result vector. [Array::Pointer ( = None )]

return:

Array::Pointer

auto median_of_touching_neighbors_func(const Device::Pointer &device, const Array::Pointer &vector, const Array::Pointer &matrix, Array::Pointer dst) -> Array::Pointer

minimum_of_touching_neighbors

Compute the minimum_of_touching_neighbors

param device:

Device to perform the operation on. [const Device::Pointer &]

param vector:

Input vector to process. [const Array::Pointer &]

param matrix:

Input adjacency matrix to process. [const Array::Pointer &]

param dst:

Output result vector. [Array::Pointer ( = None )]

return:

Array::Pointer

auto minimum_of_touching_neighbors_func(const Device::Pointer &device, const Array::Pointer &vector, const Array::Pointer &matrix, Array::Pointer dst) -> Array::Pointer

maximum_of_touching_neighbors

Compute the maximum_of_touching_neighbors

param device:

Device to perform the operation on. [const Device::Pointer &]

param vector:

Input vector to process. [const Array::Pointer &]

param matrix:

Input adjacency matrix to process. [const Array::Pointer &]

param dst:

Output result vector. [Array::Pointer ( = None )]

return:

Array::Pointer

auto maximum_of_touching_neighbors_func(const Device::Pointer &device, const Array::Pointer &vector, const Array::Pointer &matrix, Array::Pointer dst) -> Array::Pointer

standard_deviation_of_touching_neighbors

Compute the standard_deviation_of_touching_neighbors

param device:

Device to perform the operation on. [const Device::Pointer &]

param vector:

Input vector to process. [const Array::Pointer &]

param matrix:

Input adjacency matrix to process. [const Array::Pointer &]

param dst:

Output result vector. [Array::Pointer ( = None )]

return:

Array::Pointer

auto standard_deviation_of_touching_neighbors_func(const Device::Pointer &device, const Array::Pointer &vector, const Array::Pointer &matrix, Array::Pointer dst) -> Array::Pointer

mode_of_touching_neighbors

Compute the mode_of_touching_neighbors

param device:

Device to perform the operation on. [const Device::Pointer &]

param vector:

Input vector to process. [const Array::Pointer &]

param matrix:

Input adjacency matrix to process. [const Array::Pointer &]

param dst:

Output result vector. [Array::Pointer ( = None )]

return:

Array::Pointer

auto mode_of_touching_neighbors_func(const Device::Pointer &device, const Array::Pointer &vector, const Array::Pointer &matrix, Array::Pointer dst) -> Array::Pointer

tier2

namespace tier2

Namespace container for all Tier 2 functions. Tier 2 functions are advanced and may rely on lower-tier functions.

absolute_difference

Determines the absolute difference, pixel-by-pixel, between two images.

Note

ā€˜combine’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

The input image to be subtracted from. [const Array::Pointer &]

param src1:

The input image which is subtracted. [const Array::Pointer &]

param dst:

The output image where results are written into. [Array::Pointer ( = None )]

return:

Array::Pointer

auto absolute_difference_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1, Array::Pointer dst) -> Array::Pointer

add_images

Calculates the sum of pairs of pixels x and y of two images X and Y.

Note

ā€˜combine’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

The first input image to be added. [const Array::Pointer &]

param src1:

The second image to be added. [const Array::Pointer &]

param dst:

The output image where results are written into. [Array::Pointer ( = None )]

return:

Array::Pointer

auto add_images_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1, Array::Pointer dst) -> Array::Pointer

bottom_hat_box

Applies a bottom-hat filter for background subtraction to the input image.

Deprecated:

This method is deprecated. Consider using bottom_hat() instead.

Note

ā€˜filter’, ā€˜background removal’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

The input image where the background is subtracted from. [const Array::Pointer &]

param dst:

The output image where results are written into. [Array::Pointer ( = None )]

param radius_x:

Radius of the background determination region in X. [float ( = 1 )]

param radius_y:

Radius of the background determination region in Y. [float ( = 1 )]

param radius_z:

Radius of the background determination region in Z. [float ( = 1 )]

return:

Array::Pointer

auto bottom_hat_box_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z) -> Array::Pointer

bottom_hat_sphere

Applies a bottom-hat filter for background subtraction to the input image.

Deprecated:

This method is deprecated. Consider using bottom_hat() instead.

Note

ā€˜filter’, ā€˜background removal’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

The input image where the background is subtracted from. [const Array::Pointer &]

param dst:

The output image where results are written into. [Array::Pointer ( = None )]

param radius_x:

Radius of the background determination region in X. [float ( = 1 )]

param radius_y:

Radius of the background determination region in Y. [float ( = 1 )]

param radius_z:

Radius of the background determination region in Z. [float ( = 1 )]

return:

Array::Pointer

auto bottom_hat_sphere_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z) -> Array::Pointer

bottom_hat

Applies a bottom-hat filter for background subtraction to the input image.

Note

ā€˜filter’, ā€˜background removal’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

The input image where the background is subtracted from. [const Array::Pointer &]

param dst:

The output image where results are written into. [Array::Pointer ( = None )]

param radius_x:

Radius of the background determination region in X. [float ( = 1 )]

param radius_y:

Radius of the background determination region in Y. [float ( = 1 )]

param radius_z:

Radius of the background determination region in Z. [float ( = 1 )]

param connectivity:

Element shape, ā€œboxā€ or ā€œsphereā€. [std::string ( = ā€œboxā€ )]

return:

Array::Pointer

auto bottom_hat_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z, std::string connectivity) -> Array::Pointer

clip

Limits the range of values in an image. This function works similarly to its counterpart in NumPy.

Note

ā€˜combine’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output image. [Array::Pointer ( = None )]

param min_intensity:

New lower limit of the intensity range. [float ( = None )]

param max_intensity:

New upper limit of the intensity range. [float ( = None )]

return:

Array::Pointer

auto clip_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float min_intensity, float max_intensity) -> Array::Pointer

closing_box

Closing operator, applies grayscale morphological closing to intensity images using a box-shaped footprint. This operator also works with binary images.

Deprecated:

This method is deprecated. Consider using closing() instead.

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius along the x axis. [float ( = 1 )]

param radius_y:

Radius along the y axis. [float ( = 1 )]

param radius_z:

Radius along the z axis. [float ( = 1 )]

return:

Array::Pointer

auto closing_box_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z) -> Array::Pointer

closing_sphere

Closing operator, applies grayscale morphological closing to intensity images using a sphere-shaped footprint. This operator also works with binary images.

Deprecated:

This method is deprecated. Consider using closing() instead.

Note

ā€˜filter’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius along the x axis. [float ( = 1 )]

param radius_y:

Radius along the y axis. [float ( = 1 )]

param radius_z:

Radius along the z axis. [float ( = 1 )]

return:

Array::Pointer

auto closing_sphere_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z) -> Array::Pointer

grayscale_closing

Closing operator, applies grayscale morphological closing to intensity images using a box- or sphere-shaped footprint. This operator also works with binary images.

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius along the x axis. [float ( = 1 )]

param radius_y:

Radius along the y axis. [float ( = 1 )]

param radius_z:

Radius along the z axis. [float ( = 1 )]

param connectivity:

Element shape, ā€œboxā€ or ā€œsphereā€ [std::string ( = ā€œboxā€ )]

return:

Array::Pointer

auto grayscale_closing_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z, std::string connectivity) -> Array::Pointer

closing

Closing operator, applies morphological closing to intensity images using a custom structuring element provided as input. This operator also works with binary images.

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param footprint:

Structuring element for the operation. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto closing_func(const Device::Pointer &device, const Array::Pointer &src, const Array::Pointer &footprint, Array::Pointer dst) -> Array::Pointer

binary_closing

Closing operator, applies binary morphological closing to intensity images using a sphere- or box-shaped footprint. This operator also works with binary images.

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius of the sphere or box element along the x axis. [float ( = 1 )]

param radius_y:

Radius of the sphere or box element along the y axis. [float ( = 1 )]

param radius_z:

Radius of the sphere or box element along the z axis. [float ( = 1 )]

param connectivity:

Element shape, ā€œboxā€ or ā€œsphereā€ [std::string ( = ā€œboxā€ )]

return:

Array::Pointer

auto binary_closing_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z, std::string connectivity) -> Array::Pointer

concatenate_along_x

Concatenates two images or stacks along the x axis.

Note

ā€˜combine’, ā€˜transform’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

First input image. [const Array::Pointer &]

param src1:

Second input image. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto concatenate_along_x_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1, Array::Pointer dst) -> Array::Pointer

concatenate_along_y

Concatenates two images or stacks along the y axis.

Note

ā€˜combine’, ā€˜transform’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

First input image. [const Array::Pointer &]

param src1:

Second input image. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto concatenate_along_y_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1, Array::Pointer dst) -> Array::Pointer

concatenate_along_z

Concatenates two images or stacks along the z axis.

Note

ā€˜combine’, ā€˜transform’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

First input image. [const Array::Pointer &]

param src1:

Second input image. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto concatenate_along_z_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1, Array::Pointer dst) -> Array::Pointer

count_touching_neighbors

Takes a touch matrix as input and returns a vector containing the number of touching neighbors per label. Note: Background is considered touchable. To ignore touches with the background, pass a touch matrix where the first column (index = 0) is set to 0. Use set_column for that.

param device:

Device to perform the operation on. [const Device::Pointer &]

param touch_matrix:

Input touch matrix to process. [const Array::Pointer &]

param touching_neighbors_count_destination:

Output vector of touch count. [Array::Pointer ( = None )]

param ignore_background:

[bool ( = True )]

return:

Array::Pointer

auto count_touching_neighbors_func(const Device::Pointer &device, const Array::Pointer &touch_matrix, Array::Pointer touching_neighbors_count_destination, bool ignore_background) -> Array::Pointer

crop_border

Crops an image by removing the outer pixels (default: 1). To ensure the output image has the expected size, set dst = None.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param border_size:

Border size to crop. [int ( = 1 )]

return:

Array::Pointer

auto crop_border_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, int border_size) -> Array::Pointer

divide_by_gaussian_background

Applies Gaussian blur to the input image and divides the original by the result.

Note

ā€˜filter’, ā€˜background removal’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param sigma_x:

Gaussian sigma value along x. [float ( = 2 )]

param sigma_y:

Gaussian sigma value along y. [float ( = 2 )]

param sigma_z:

Gaussian sigma value along z. [float ( = 2 )]

return:

Array::Pointer

auto divide_by_gaussian_background_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float sigma_x, float sigma_y, float sigma_z) -> Array::Pointer

degrees_to_radians

Converts degrees to radians.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto degrees_to_radians_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

detect_maxima_box

Detects local maxima in a given square/cubic neighborhood. Pixels in the resulting image are set to 1 if there is no other pixel in a given radius which has a higher intensity, and to 0 otherwise.

Deprecated:

This method is deprecated. Consider using detect_maxima() instead.

Note

ā€˜binarize’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius along the x axis. [float ( = 0 )]

param radius_y:

Radius along the y axis. [float ( = 0 )]

param radius_z:

Radius along the z axis. [float ( = 0 )]

return:

Array::Pointer

auto detect_maxima_box_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z) -> Array::Pointer

detect_maxima

Detects local maxima in a given square/cubic neighborhood. Pixels in the resulting image are set to 1 if there is no other pixel in a given radius which has a higher intensity, and to 0 otherwise.

Note

ā€˜binarize’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius along the x axis. [float ( = 0 )]

param radius_y:

Radius along the y axis. [float ( = 0 )]

param radius_z:

Radius along the z axis. [float ( = 0 )]

param connectivity:

Element shape, ā€œboxā€ or ā€œsphereā€ [std::string ( = ā€œboxā€ )]

return:

Array::Pointer

auto detect_maxima_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z, std::string connectivity) -> Array::Pointer

detect_minima_box

Detects local minima in a given square/cubic neighborhood. Pixels in the resulting image are set to 1 if there is no other pixel in a given radius which has a lower intensity, and to 0 otherwise.

Deprecated:

This method is deprecated. Consider using detect_minima() instead.

Note

ā€˜binarize’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius along the x axis. [float ( = 0 )]

param radius_y:

Radius along the y axis. [float ( = 0 )]

param radius_z:

Radius along the z axis. [float ( = 0 )]

return:

Array::Pointer

auto detect_minima_box_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z) -> Array::Pointer

detect_minima

Detects local minima in a given square/cubic neighborhood. Pixels in the resulting image are set to 1 if there is no other pixel in a given radius which has a lower intensity, and to 0 otherwise.

Note

ā€˜binarize’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius along the x axis. [float ( = 0 )]

param radius_y:

Radius along the y axis. [float ( = 0 )]

param radius_z:

Radius along the z axis. [float ( = 0 )]

param connectivity:

Element shape, ā€œboxā€ or ā€œsphereā€ [std::string ( = ā€œboxā€ )]

return:

Array::Pointer

auto detect_minima_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z, std::string connectivity) -> Array::Pointer

difference_of_gaussian

Applies Gaussian blur to the input image twice with different sigma values, producing two images, one of which is subtracted from the other. It is recommended to apply this operation to images of type float (32-bit) because results might be negative.

Note

ā€˜filter’, ā€˜background removal’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

The input image to be processed. [const Array::Pointer &]

param dst:

The output image where results are written into. [Array::Pointer ( = None )]

param sigma1_x:

Sigma of the first Gaussian filter in x [float ( = 2 )]

param sigma1_y:

Sigma of the first Gaussian filter in y [float ( = 2 )]

param sigma1_z:

Sigma of the first Gaussian filter in z [float ( = 2 )]

param sigma2_x:

Sigma of the second Gaussian filter in x [float ( = 2 )]

param sigma2_y:

Sigma of the second Gaussian filter in y [float ( = 2 )]

param sigma2_z:

Sigma of the second Gaussian filter in z [float ( = 2 )]

return:

Array::Pointer

auto difference_of_gaussian_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float sigma1_x, float sigma1_y, float sigma1_z, float sigma2_x, float sigma2_y, float sigma2_z) -> Array::Pointer

extend_labeling_via_voronoi

Takes a label map image and dilates the regions using an octagon shape until they touch. The resulting label map is written to the output.

Note

ā€˜label processing’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto extend_labeling_via_voronoi_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

invert

Computes the negative value of all pixels in a given image. It is recommended to convert images to 32-bit float before applying this operation.

For binary images, use binaryNot.

Note

ā€˜filter’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto invert_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

label_spots

Transforms a binary image with single pixels set to 1 into a labeled spots image. Converts a spots image (e.g., from maxima/minima detection) into a label image of the same size, assigning IDs 1, 2, …, n.

Note

ā€˜label’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto label_spots_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

pointlist_to_labelled_spots

Converts a pointlist image (x,y,z) into a labelled spots in a label image.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input pointlist image to process. [const Array::Pointer &]

param dst:

Output result label image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto pointlist_to_labelled_spots_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

large_hessian_eigenvalue

Determines the Hessian eigenvalues and returns the large eigenvalue image.

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto large_hessian_eigenvalue_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

maximum_of_all_pixels

Determines the maximum of all pixels in a given image.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

return:

float

auto maximum_of_all_pixels_func(const Device::Pointer &device, const Array::Pointer &src) -> float

minimum_of_all_pixels

Determines the minimum of all pixels in a given image.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

return:

float

auto minimum_of_all_pixels_func(const Device::Pointer &device, const Array::Pointer &src) -> float

minimum_of_masked_pixels

Determines the minimum intensity in a masked image, but only over pixels that have nonzero values in a separate mask image.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param mask:

Input mask. [const Array::Pointer &]

return:

float

auto minimum_of_masked_pixels_func(const Device::Pointer &device, const Array::Pointer &src, const Array::Pointer &mask) -> float

opening_box

Opening operator, applies morphological opening to intensity images using a box-shaped footprint. This operator also works with binary images.

Deprecated:

This method is deprecated. Consider using opening() instead.

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius along the x axis. [float ( = 1 )]

param radius_y:

Radius along the y axis. [float ( = 1 )]

param radius_z:

Radius along the z axis. [float ( = 1 )]

return:

Array::Pointer

auto opening_box_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z) -> Array::Pointer

opening_sphere

Opening operator, applies morphological opening to intensity images using a sphere-shaped footprint. This operator also works with binary images.

Deprecated:

This method is deprecated. Consider using opening() instead.

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius along the x axis. [float ( = 1 )]

param radius_y:

Radius along the y axis. [float ( = 1 )]

param radius_z:

Radius along the z axis. [float ( = 1 )]

return:

Array::Pointer

auto opening_sphere_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z) -> Array::Pointer

grayscale_opening

Opening operator, applies morphological opening to intensity images using a sphere- or box-shaped footprint. This operator also works with binary images.

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius along the x axis. [float ( = 1 )]

param radius_y:

Radius along the y axis. [float ( = 1 )]

param radius_z:

Radius along the z axis. [float ( = 1 )]

param connectivity:

Element shape, ā€œboxā€ or ā€œsphereā€ [std::string ( = ā€œboxā€ )]

return:

Array::Pointer

auto grayscale_opening_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z, std::string connectivity) -> Array::Pointer

opening

Opening operator, applies morphological opening to intensity images using a custom structuring element provided as input. This operator also works with binary images.

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param footprint:

Structuring element for the operation. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto opening_func(const Device::Pointer &device, const Array::Pointer &src, const Array::Pointer &footprint, Array::Pointer dst) -> Array::Pointer

binary_opening

Opening operator, applies binary morphological opening to intensity images using a sphere- or box-shaped footprint. This operator also works with binary images.

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius of the sphere or box element along the x axis. [float ( = 1 )]

param radius_y:

Radius of the sphere or box element along the y axis. [float ( = 1 )]

param radius_z:

Radius of the sphere or box element along the z axis. [float ( = 1 )]

param connectivity:

Element shape, ā€œboxā€ or ā€œsphereā€ [std::string ( = ā€œboxā€ )]

return:

Array::Pointer

auto binary_opening_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z, std::string connectivity) -> Array::Pointer

radians_to_degrees

Converts radians to degrees.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto radians_to_degrees_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

reduce_labels_to_label_edges

Takes a label map and reduces all labels to their edges. Label IDs stay and background will be zero.

Note

ā€˜label processing’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto reduce_labels_to_label_edges_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

small_hessian_eigenvalue

Determines the Hessian eigenvalues and returns the small eigenvalue image.

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto small_hessian_eigenvalue_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

square

Returns the element-wise square of the input. This function is similar to its counterpart in NumPy.

Note

ā€˜filter’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto square_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

squared_difference

Determines the squared difference pixel by pixel between two images.

Note

ā€˜combine’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

First input image. [const Array::Pointer &]

param src1:

Second input image. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto squared_difference_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1, Array::Pointer dst) -> Array::Pointer

standard_deviation_box

Computes the local standard deviation of each pixel’s box neighborhood. The box size is specified by its half-width, half-height, and half-depth (radius). If 2D images are given, radius_z will be ignored.

Deprecated:

This method is deprecated. Consider using standard_deviation() instead.

Note

ā€˜filter’, ā€˜edge detection’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius along the x axis. [float ( = 1 )]

param radius_y:

Radius along the y axis. [float ( = 1 )]

param radius_z:

Radius along the z axis. [float ( = 1 )]

return:

Array::Pointer

auto standard_deviation_box_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z) -> Array::Pointer

standard_deviation_sphere

Computes the local standard deviation of each pixel’s spherical neighborhood. The neighborhood size is specified by its half-width, half-height, and half-depth (radius). If 2D images are given, radius_z will be ignored.

Deprecated:

This method is deprecated. Consider using standard_deviation() instead.

Note

ā€˜filter’, ā€˜edge detection’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius along the x axis. [float ( = 1 )]

param radius_y:

Radius along the y axis. [float ( = 1 )]

param radius_z:

Radius along the z axis. [float ( = 1 )]

return:

Array::Pointer

auto standard_deviation_sphere_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z) -> Array::Pointer

standard_deviation

Computes the local standard deviation of each pixel’s neighborhood. The neighborhood size is specified by its half-width, half-height, and half-depth (radius). If 2D images are given, radius_z will be ignored.

Note

ā€˜filter’, ā€˜edge detection’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Radius along the x axis. [float ( = 1 )]

param radius_y:

Radius along the y axis. [float ( = 1 )]

param radius_z:

Radius along the z axis. [float ( = 1 )]

param connectivity:

Neighborhood shape, ā€œboxā€ or ā€œsphereā€. [std::string ( = ā€œboxā€ )]

return:

Array::Pointer

auto standard_deviation_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z, std::string connectivity) -> Array::Pointer

subtract_gaussian_background

Applies Gaussian blur to the input image and subtracts the result from the original.

Note

ā€˜filter’, ā€˜background removal’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param sigma_x:

Gaussian sigma value along x. [float ( = 2 )]

param sigma_y:

Gaussian sigma value along y. [float ( = 2 )]

param sigma_z:

Gaussian sigma value along z. [float ( = 2 )]

return:

Array::Pointer

auto subtract_gaussian_background_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float sigma_x, float sigma_y, float sigma_z) -> Array::Pointer

subtract_images

Subtracts one image X from another image Y pixel-wise.

Note

ā€˜combine’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

First input image. [const Array::Pointer &]

param src1:

Second input image. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto subtract_images_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1, Array::Pointer dst) -> Array::Pointer

sub_stack

Crop a volume into a new volume, along the z-axis.

Note

ā€˜transform’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image. [const Array::Pointer &]

param dst:

Output image. [Array::Pointer ( = None )]

param start_z:

Start z coordinate of the crop. [int ( = 0 )]

param end_z:

End z coordinate of the crop. [int ( = 0 )]

return:

Array::Pointer

auto sub_stack_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, int start_z, int end_z) -> Array::Pointer

reduce_stack

Reduces the number of z-slices in a stack by a given factor. With the offset you have control over which slices stay: with factor 3 and offset 0, slices 0, 3, 6, … are kept; with factor 4 and offset 1, slices 1, 5, 9, … are kept.

Note

ā€˜transform’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image. [const Array::Pointer &]

param dst:

Output image. [Array::Pointer ( = None )]

param reduction_factor:

Reduction factor. [int ( = 2 )]

param offset:

Offset. [int ( = 0 )]

return:

Array::Pointer

auto reduce_stack_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, int reduction_factor, int offset) -> Array::Pointer

sum_of_all_pixels

Determines the sum of all pixels in a given image.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer & ( = None )]

return:

float

auto sum_of_all_pixels_func(const Device::Pointer &device, const Array::Pointer &src) -> float

top_hat_box

Applies a top-hat filter for background subtraction to the input image.

Deprecated:

This method is deprecated. Consider using top_hat() instead.

Note

ā€˜filter’, ā€˜background removal’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

The input image where the background is subtracted from. [const Array::Pointer &]

param dst:

The output image where results are written into. [Array::Pointer ( = None )]

param radius_x:

Radius of the background determination region in X. [float ( = 1 )]

param radius_y:

Radius of the background determination region in Y. [float ( = 1 )]

param radius_z:

Radius of the background determination region in Z. [float ( = 1 )]

return:

Array::Pointer

auto top_hat_box_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z) -> Array::Pointer

top_hat_sphere

Applies a top-hat filter for background subtraction to the input image.

Deprecated:

This method is deprecated. Consider using top_hat() instead.

Note

ā€˜filter’, ā€˜background removal’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

The input image where the background is subtracted from. [const Array::Pointer &]

param dst:

The output image where results are written into. [Array::Pointer ( = None )]

param radius_x:

Radius of the background determination region in X. [float ( = 1 )]

param radius_y:

Radius of the background determination region in Y. [float ( = 1 )]

param radius_z:

Radius of the background determination region in Z. [float ( = 1 )]

return:

Array::Pointer

auto top_hat_sphere_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z) -> Array::Pointer

top_hat

Applies a top-hat filter for background subtraction to the input image.

Note

ā€˜filter’, ā€˜background removal’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

The input image where the background is subtracted from. [const Array::Pointer &]

param dst:

The output image where results are written into. [Array::Pointer ( = None )]

param radius_x:

Radius of the background determination region in X. [float ( = 1 )]

param radius_y:

Radius of the background determination region in Y. [float ( = 1 )]

param radius_z:

Radius of the background determination region in Z. [float ( = 1 )]

param connectivity:

Element shape, ā€œboxā€ or ā€œsphereā€ [std::string ( = ā€œboxā€ )]

return:

Array::Pointer

auto top_hat_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float radius_z, std::string connectivity) -> Array::Pointer

extended_depth_of_focus_variance_projection

Depth projection using the local variance maxima to determine the best focus plane. The radius parameter controls the local variance calculation, and sigma applies a Gaussian blur for smoothness of the projection.

Note

ā€˜projection’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param radius_x:

Neighborhood radius along the x axis. [float ( = 10 )]

param radius_y:

Neighborhood radius along the y axis. [float ( = 10 )]

param sigma:

Sigma for Gaussian blur. [float ( = 5 )]

return:

Array::Pointer

auto extended_depth_of_focus_variance_projection_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float radius_x, float radius_y, float sigma) -> Array::Pointer

extended_depth_of_focus_sobel_projection

Depth projection using the local Sobel gradient magnitude maxima to determine the best focus plane. Sigma applies a Gaussian blur for smoothness of the projection.

Note

ā€˜projection’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param sigma:

Sigma for Gaussian blur. [float ( = 5 )]

return:

Array::Pointer

auto extended_depth_of_focus_sobel_projection_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float sigma) -> Array::Pointer

hessian_gaussian_eigenvalues

Determines the Hessian matrix eigenvalues using the Gaussian-derivative method and returns the small, middle and large eigenvalue images.

The function returns the list of eigenvalues as images, in decreasing order. The first image is the largest eigenvalue.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param small_eigenvalue:

Output result image for the small eigenvalue. [Array::Pointer ( = None )]

param middle_eigenvalue:

Output result image for the middle eigenvalue. [Array::Pointer ( = None )]

param large_eigenvalue:

Output result image for the large eigenvalue. [Array::Pointer ( = None )]

param sigma:

Sigma of the Gaussian kernel. [float ( = 1 )]

return:

std::vector<Array::Pointer>

auto hessian_gaussian_eigenvalues_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer small_eigenvalue, Array::Pointer middle_eigenvalue, Array::Pointer large_eigenvalue, float sigma) -> std::vector<Array::Pointer>

generate_proximal_neighbors_matrix

Generates a touch-matrix where the neighbors within a given distance range are marked as touching. It take as input a distance matrix (e.g. from a pointlist of centroids) and marks for every column the neighbors within the given distance range as 1, others as 0. The results is a touch-matrix (adjacency matrix) that can be used for further analysis.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src_matrix:

Input distance matrix. [const Array::Pointer &]

param dst_matrix:

Output touch-matrix. [Array::Pointer ( = None )]

param min_distance:

Minimum distance to consider a neighbor. [float ( = -1 )]

param max_distance:

Maximum distance to consider a neighbor. [float ( = -1 )]

return:

Array::Pointer

auto generate_proximal_neighbors_matrix_func(const Device::Pointer &device, const Array::Pointer &src_matrix, Array::Pointer dst_matrix, float min_distance, float max_distance) -> Array::Pointer

tier3

namespace tier3

Namespace container for all Tier 3 functions. Tier 3 functions are advanced and may rely on lower-tier functions.

bounding_box

Determines the bounding box of all non-zero pixels in a binary image. The positions are returned in an array of six values as follows: minX, minY, minZ, maxX, maxY, maxZ.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input binary image. [const Array::Pointer &]

return:

std::vector<float>

auto bounding_box_func(const Device::Pointer &device, const Array::Pointer &src) -> std::vector<float>

center_of_mass

Determines the center of mass of an image or image stack. The result is written to the Results table in the columns MassX, MassY, and MassZ.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image. [const Array::Pointer &]

return:

std::vector<float>

auto center_of_mass_func(const Device::Pointer &device, const Array::Pointer &src) -> std::vector<float>

clahe

Applies CLAHE (Contrast Limited Adaptive Histogram Equalization) to the input image. The algorithm is adapted from the work of Hugo Raveton (https://github.com/HugoRaveton/pyopencl_clahe).

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param tile_size:

Size of the tiles used for CLAHE. [int ( = 8 )]

param clip_limit:

Clip limit for CLAHE. [float ( = 0.01 )]

param minimum_intensity:

Minimum intensity value. [float ( = float(ā€˜nan’) )]

param maximum_intensity:

Maximum intensity value. [float ( = float(ā€˜nan’) )]

return:

Array::Pointer

auto clahe_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, int tile_size, float clip_limit, float minimum_intensity = NaN, float maximum_intensity = NaN) -> Array::Pointer

remove_labels

Removes labels from a label map and renumbers the remaining labels. Provide a binary flag vector starting with a flag for the background, followed by label 1, label 2, … For example, if you pass 0, 1, 0, 0, 1: labels 1 and 4 will be removed (those with a 1 in the vector will be excluded). Labels 2 and 3 will be kept and renumbered to 1 and 2.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input label image. [const Array::Pointer &]

param list:

Vector of 0/1 flags indicating labels to remove. [const Array::Pointer &]

param dst:

Output label image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto remove_labels_func(const Device::Pointer &device, const Array::Pointer &src, const Array::Pointer &list, Array::Pointer dst) -> Array::Pointer

exclude_labels

Removes labels from a label map and renumbers the remaining labels. Provide a binary flag vector starting with a flag for the background, followed by label 1, label 2, … For example, if you pass 0, 1, 0, 0, 1: labels 1 and 4 will be removed (those with a 1 in the vector will be excluded). Labels 2 and 3 will be kept and renumbered to 1 and 2.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input label image. [const Array::Pointer &]

param list:

Vector of 0/1 flags indicating labels to remove. [const Array::Pointer &]

param dst:

Output label image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto exclude_labels_func(const Device::Pointer &device, const Array::Pointer &src, const Array::Pointer &list, Array::Pointer dst) -> Array::Pointer

remove_labels_on_edges

Removes all labels from a label map that touch the edges of the image. Remaining label elements are renumbered afterwards.

Note

ā€˜label processing’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input label image. [const Array::Pointer &]

param dst:

Output label image. [Array::Pointer ( = None )]

param exclude_x:

Exclude labels touching the min and max x boundaries. [bool ( = True )]

param exclude_y:

Exclude labels touching the min and max y boundaries. [bool ( = True )]

param exclude_z:

Exclude labels touching the min and max z boundaries. [bool ( = True )]

return:

Array::Pointer

auto remove_labels_on_edges_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, bool exclude_x, bool exclude_y, bool exclude_z) -> Array::Pointer

exclude_labels_on_edges

Removes all labels from a label map that touch the edges of the image. Remaining label elements are renumbered afterwards.

Note

ā€˜label processing’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input label image. [const Array::Pointer &]

param dst:

Output label image. [Array::Pointer ( = None )]

param exclude_x:

Exclude labels touching the min and max x boundaries. [bool ( = True )]

param exclude_y:

Exclude labels touching the min and max y boundaries. [bool ( = True )]

param exclude_z:

Exclude labels touching the min and max z boundaries. [bool ( = True )]

return:

Array::Pointer

auto exclude_labels_on_edges_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, bool exclude_x, bool exclude_y, bool exclude_z) -> Array::Pointer

flag_existing_labels

Given a label map, generates a binary vector whose entries are 1 if a label with the given x-coordinate exists. For example, a label image such as: 0 1 3 5 will produce a flag_vector like: 1 1 0 1 0 1.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Label image. [const Array::Pointer &]

param dst:

Binary vector; if provided, it should have size 1Ɨn with n = maximum label + 1. [Array::Pointer ( = None )]

return:

Array::Pointer

auto flag_existing_labels_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

gamma_correction

Applies gamma correction to an image. All pixels x of the image X are normalized, raised to the power gamma g, and then de-normalized. Here, ^ denotes exponentiation:

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image. [const Array::Pointer &]

param dst:

Output image. [Array::Pointer ( = None )]

param gamma:

[float ( = 1 )]

return:

Array::Pointer

auto gamma_correction_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float gamma) -> Array::Pointer

generate_binary_overlap_matrix

Takes two label maps with n and m labels and generates an (n+1)Ɨ(m+1) matrix where all pixels are set to 0 except those where labels overlap between the label maps. For example, if label 3 in labelmap1 and label 4 in labelmap2 are touching, then the pixel (3, 4) in the matrix will be set to 1.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

First input label image. [const Array::Pointer &]

param src1:

Second input label image. [const Array::Pointer &]

param dst:

Output overlap matrix. [Array::Pointer ( = None )]

return:

Array::Pointer

auto generate_binary_overlap_matrix_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1, Array::Pointer dst) -> Array::Pointer

generate_touch_matrix

Takes a label map with n labels and generates an (n+1)Ɨ(n+1) matrix where all pixels are set to 0 except those where labels are touching. Only half of the matrix is filled (for x < y). For example, if labels 3 and 4 are touching, then the pixel (3, 4) in the matrix will be set to 1. The touch matrix is a representation of a region adjacency graph.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input label image [const Array::Pointer &]

param dst_matrix:

Output touch matrix [Array::Pointer ( = None )]

return:

Array::Pointer

auto generate_touch_matrix_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst_matrix) -> Array::Pointer

histogram

Determines the histogram of a given image. The histogram image has dimensions number_of_bins Ɨ 1 Ɨ 1 (a 3D image with height = 1 and depth = 1). Histogram bins contain the number of pixels with intensity in the corresponding bin. The bins are uniformly distributed between the given minimum and maximum gray-value intensities. If the flag determine_min_max is set, the minimum and maximum intensities will be determined. When calling this operation many times, it is recommended to determine minimum and maximum intensities once at the beginning and pass these values. Author(s): Robert Haase; adapted work from Aaftab Munshi, Benedict Gaster, Timothy Mattson, James Fung, Dan Ginsburg License: adapted code from https://github.com/bgaster/openclbooksamples/blob/master/src/Chapter_14/histogram/histogram_image.cl

It was published under the BSD license according to https://code.google.com/archive/p/openclbooksamples/

Book: OpenCL(R) Programming Guide Authors: Aaftab Munshi, Benedict Gaster, Timothy Mattson, James Fung, Dan Ginsburg ISBN10: 0321749642 ISBN13: 9780321749642 Publisher: AddisonWesley Professional URLs: http://safari.informit.com/9780132488006/ http://www.openclprogrammingguide.com

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image from which to derive the histogram. [const Array::Pointer &]

param dst:

Output histogram. [Array::Pointer ( = None )]

param num_bins:

Number of bins. [int ( = 256 )]

param minimum_intensity:

Minimum intensity. [float ( = float(ā€˜nan’) )]

param maximum_intensity:

Maximum intensity. [float ( = float(ā€˜nan’) )]

return:

Array::Pointer

auto histogram_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, int num_bins, float minimum_intensity = NaN, float maximum_intensity = NaN) -> Array::Pointer

jaccard_index

Determines the overlap of two binary images using the Jaccard index. A value of 0 suggests no overlap, 1 means perfect overlap. The resulting Jaccard index is saved to the Results table in the ā€˜Jaccard_Index’ column. Note that the SĆørensen–Dice coefficient can be calculated from the Jaccard index j using this formula:

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

First binary image to compare. [const Array::Pointer &]

param src1:

Second binary image to compare. [const Array::Pointer &]

return:

float

auto jaccard_index_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1) -> float

labelled_spots_to_pointlist

Generates a coordinate list of points in a labelled spot image. Transforms a label map of spots (single pixels with values 1, 2, …, n for n spots), e.g. from connected components analysis, into an image where every column contains d entries (with d = dimensionality of the original image) holding the coordinates of maxima/minima.

param device:

Device to perform the operation on. [const Device::Pointer &]

param label:

Input label image. [const Array::Pointer &]

param dspointlistt:

Output coordinate list. [Array::Pointer ( = None )]

return:

Array::Pointer

auto labelled_spots_to_pointlist_func(const Device::Pointer &device, const Array::Pointer &label, Array::Pointer dspointlistt) -> Array::Pointer

maximum_position

Determines the position of the maximum of all pixels in a given image.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

The image of which the position of the maximum of all pixels will be determined. [const Array::Pointer &]

return:

std::vector<float>

auto maximum_position_func(const Device::Pointer &device, const Array::Pointer &src) -> std::vector<float>

mean_of_all_pixels

Determines the mean of all pixels in a given image.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

The image of which the mean of all pixels will be determined. [const Array::Pointer &]

return:

float

auto mean_of_all_pixels_func(const Device::Pointer &device, const Array::Pointer &src) -> float

minimum_position

Determines the position of the minimum of all pixels in a given image.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

The image of which the position of the minimum of all pixels will be determined. [const Array::Pointer &]

return:

std::vector<float>

auto minimum_position_func(const Device::Pointer &device, const Array::Pointer &src) -> std::vector<float>

morphological_chan_vese

Computes an active contour model using the Chan–Vese morphological algorithm. The output image (dst) should also be the initialization of the contour. If not provided (nullptr), the function uses a checkerboard pattern initialization.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output contour; can also be used to provide initialization. [Array::Pointer ( = None )]

param num_iter:

Number of iterations. [int ( = 100 )]

param smoothing:

Number of smoothing iterations. [int ( = 1 )]

param lambda1:

Lambda1. [float ( = 1 )]

param lambda2:

Lambda2. [float ( = 1 )]

return:

Array::Pointer

auto morphological_chan_vese_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, int num_iter, int smoothing, float lambda1, float lambda2) -> Array::Pointer

statistics_of_labelled_pixels

Computes the bounding box, area (in pixels/voxels), minimum intensity, maximum intensity, average intensity, standard deviation of the intensity, and shape descriptors of labelled objects in a label image and its corresponding intensity image.

If not provided, the intensity image defaults to the label image. If not provided, the label image defaults to a single label covering the entire image.

param device:

Device to perform the operation on. [const Device::Pointer &]

param intensity:

Intensity image. [Array::Pointer ( = None )]

param label:

Label image to compute the statistics. [Array::Pointer ( = None )]

return:

StatisticsMap

auto statistics_of_labelled_pixels_func(const Device::Pointer &device, Array::Pointer intensity, Array::Pointer label) -> StatisticsMap

statistics_of_background_and_labelled_pixels

Computes, for the background and labels, the bounding box, area (in pixels/voxels), minimum intensity, maximum intensity, average intensity, standard deviation of the intensity, and shape descriptors of labelled objects in a label image and its corresponding intensity image.

If not provided, the intensity image defaults to the label image. If not provided, the label image defaults to a single label covering the entire image.

param device:

Device to perform the operation on. [const Device::Pointer &]

param intensity:

Intensity image. [Array::Pointer ( = None )]

param label:

Label image to compute the statistics. [Array::Pointer ( = None )]

return:

StatisticsMap

auto statistics_of_background_and_labelled_pixels_func(const Device::Pointer &device, Array::Pointer intensity, Array::Pointer label) -> StatisticsMap

sato_filter

Applies the multi-scale ridge detection Sato filter. This filter is based on Sato et al., 1998 (https://doi.org/10.1016/S1361-8415(98)80009-1). The filter accumulates the maximum response over the range [sigma_minimum, sigma_maximum).

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param sigma_minimum:

Minimum sigma value for the filter. [float ( = 1 )]

param sigma_maximum:

Maximum sigma value for the filter. [float ( = 3 )]

param sigma_step:

Step size for the sigma values. [float ( = 1 )]

return:

Array::Pointer

auto sato_filter_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float sigma_minimum, float sigma_maximum, float sigma_step) -> Array::Pointer

tubeness

Enhances filamentous structures of a specified thickness in 2D or 3D. This function is a reimplementation of the Tubeness filter from Fiji/ImageJ. It is based on the Sato filter (https://doi.org/10.1016/S1361-8415(98)80009-1). The sigma parameter defines the thickness of the structures to be enhanced.

Note

ā€˜filter’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

param sigma:

Standard deviation of the Gaussian kernel used in the filter. [float ( = 1 )]

return:

Array::Pointer

auto tubeness_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float sigma) -> Array::Pointer

artificial_tissue

Generates 2D or 3D artificial tissue-like image by generating a regular grid point and introducing Gaussian noise.

param device:

Device to perform the operation on. [const Device::Pointer &]

param width:

Width of the generated image. [int ( = 256 ) ]

param height:

Height of the generated image. [int ( = 256 ) ]

param depth:

Depth of the generated image. [int ( = 1 ) ]

param delta_x:

Spacing between pixels in x. [float ( = 1.0 )]

param delta_y:

Spacing between pixels in y. [float ( = 1.0 )]

param delta_z:

Spacing between pixels in z. [float ( = 1.0 )]

param sigma_x:

Standard deviation of the Gaussian noise in x. [float ( = 1.0 )]

param sigma_y:

Standard deviation of the Gaussian noise in y. [float ( = 1.0 )]

param sigma_z:

Standard deviation of the Gaussian noise in z. [float ( = 1.0 )]

return:

Array::Pointer

auto artificial_tissue_func(const Device::Pointer &device, int width, int height, int depth, float delta_x, float delta_y, float delta_z, float sigma_x, float sigma_y, float sigma_z) -> Array::Pointer
auto read_map_values_func(const Device::Pointer &device, const Array::Pointer &map, const Array::Pointer &label, Array::Pointer dst) -> Array::Pointer

read_intensities_from_map

Reads values from a parametric map using its corresponding labels and return it as a vector of values.

Deprecated:

This function is deprecated. Consider using read_map_values() instead.

param device:

Device to perform the operation on. [const Device::Pointer &]

param label:

Input label image. [const Array::Pointer &]

param map:

Input map image. [const Array::Pointer &]

param dst:

Output result image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto read_intensities_from_map_func(const Device::Pointer &device, const Array::Pointer &label, const Array::Pointer &map, Array::Pointer dst) -> Array::Pointer

tier4

namespace tier4

Namespace container for all Tier 4 functions. Tier 4 functions are advanced and may rely on lower-tier functions.

label_bounding_box

Determines the bounding box of the specified label from a label image. The positions are returned in an array of six values as follows: minX, minY, minZ, maxX, maxY, maxZ.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Label image. [const Array::Pointer &]

param label_id:

Identifier of the label. [int]

return:

std::vector<float>

auto label_bounding_box_func(const Device::Pointer &device, const Array::Pointer &src, int label_id) -> std::vector<float>

mean_squared_error

Determines the mean squared error (MSE) between two images.

Note

ā€˜in assistant’, ā€˜combine’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

First image to compare. [const Array::Pointer &]

param src1:

Second image to compare. [const Array::Pointer &]

return:

float

auto mean_squared_error_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1) -> float

spots_to_pointlist

Transforms a spots image (e.g., from maxima/minima detection) into an image where every column contains d entries (with d = dimensionality of the original image) holding the coordinates of the maxima/minima.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input binary image of spots. [const Array::Pointer &]

param dst:

Output coordinate list of spots. [Array::Pointer ( = None )]

return:

Array::Pointer

auto spots_to_pointlist_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

relabel_sequential

Analyzes a label map and if there are gaps in the indexing (e.g., label 5 is not present), all subsequent labels will be relabeled. Afterward, the number of labels and maximum label index are equal. This operation is mostly performed on the CPU.

Note

ā€˜label processing’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input label image. [const Array::Pointer &]

param dst:

Output label image. [Array::Pointer ( = None )]

param blocksize:

Renumbering is done in blocks for performance reasons. [int ( = 4096 )]

return:

Array::Pointer

auto relabel_sequential_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, int blocksize) -> Array::Pointer

threshold_otsu

Binarizes an image using Otsu’s threshold method, implemented in scikit-image, using a histogram determined on the GPU to create binary images.

Note

ā€˜binarize’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to threshold. [const Array::Pointer &]

param dst:

Output binary image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto threshold_otsu_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

threshold_mean

Binarizes an image using the global average intensity in the image

Note

ā€˜binarize’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to threshold. [const Array::Pointer &]

param dst:

Output binary image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto threshold_mean_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

parametric_map

Takes an image, a corresponding label map, and maps a specified property (e.g., ā€˜mean_intensity’) determined per label onto a new image where every label is replaced by the corresponding property value. The property name must be available from the statistics_labelled_pixels function.

Note

ā€˜label measurement’, ā€˜map’, ā€˜in assistant’, ā€˜combine’

param device:

Device to perform the operation on. [const Device::Pointer &]

param labels:

Label image. [const Array::Pointer &]

param intensity:

Intensity image. [Array::Pointer ( = None )]

param property:

Name of the property to map. [std::string ( = ā€œlabelā€ )]

param dst:

Parametric image computed. [Array::Pointer ( = None )]

return:

Array::Pointer

auto parametric_map_func(const Device::Pointer &device, const Array::Pointer &labels, Array::Pointer intensity, const std::string &property, Array::Pointer dst) -> Array::Pointer

mean_intensity_map

Takes an image and a corresponding label map, determines the mean intensity per label, and replaces every label with that number.

This results in a parametric image expressing mean object intensity.

Note

ā€˜label measurement’, ā€˜map’, ā€˜in assistant’, ā€˜combine’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Intensity image. [const Array::Pointer &]

param labels:

Label image. [const Array::Pointer &]

param dst:

Parametric image computed. [Array::Pointer ( = None )]

return:

Array::Pointer

auto mean_intensity_map_func(const Device::Pointer &device, const Array::Pointer &src, const Array::Pointer &labels, Array::Pointer dst) -> Array::Pointer

label_mean_intensity_map

Takes an image and a corresponding label map, determines the mean intensity per label, and replaces every label with that number.

This results in a parametric image expressing mean object intensity.

Deprecated:

This function is deprecated. Use mean_intensity_map_func instead.

Note

ā€˜label measurement’, ā€˜map’, ā€˜in assistant’, ā€˜combine’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Intensity image. [const Array::Pointer &]

param labels:

Label image. [const Array::Pointer &]

param dst:

Parametric image computed. [Array::Pointer ( = None )]

return:

Array::Pointer

auto label_mean_intensity_map_func(const Device::Pointer &device, const Array::Pointer &src, const Array::Pointer &labels, Array::Pointer dst) -> Array::Pointer

pixel_count_map

Takes a label map, determines the number of pixels per label, and replaces every label with that number. This results in a parametric image expressing area or volume.

Note

ā€˜label measurement’, ā€˜map’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Label image to measure. [const Array::Pointer &]

param dst:

Parametric image computed. [Array::Pointer ( = None )]

return:

Array::Pointer

auto pixel_count_map_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

label_pixel_count_map

Takes a label map, determines the number of pixels per label, and replaces every label with that number. This results in a parametric image expressing area or volume.

Deprecated:

This function is deprecated. Use pixel_count_map_func instead.

Note

ā€˜label measurement’, ā€˜map’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Label image to measure. [const Array::Pointer &]

param dst:

Parametric image computed. [Array::Pointer ( = None )]

return:

Array::Pointer

auto label_pixel_count_map_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

centroids_of_labels

Determines the centroids of all labels in a label image or image stack. It writes the resulting coordinates into a point list image of dimensions n Ɨ d where n is the number of labels and d = 3 is the dimensionality (x, y, z) of the original image.

param device:

Device to perform the operation on. [const Device::Pointer &]

param label_image:

Label image from which the centroids will be determined. [const Array::Pointer &]

param centroids_coordinates:

Output list of coordinates where the centroids will be written. [Array::Pointer ( = None )]

param include_background:

Determines if the background label should be included. [bool ( = False )]

return:

Array::Pointer

auto centroids_of_labels_func(const Device::Pointer &device, const Array::Pointer &label_image, Array::Pointer centroids_coordinates, bool include_background) -> Array::Pointer

remove_labels_with_map_values_out_of_range

Remove labels with values outside a given value range based on a vector of values associated with the labels.

Note

ā€˜label processing’, ā€˜combine’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image where labels will be filtered. [const Array::Pointer &]

param values:

Vector of values associated with the labels. [const Array::Pointer &]

param dst:

Output image where labels will be written to. [Array::Pointer ( = None )]

param min_value:

Minimum value to keep. [float ( = 0 )]

param max_value:

Maximum value to keep. [float ( = 100 )]

return:

Array::Pointer

auto remove_labels_with_map_values_out_of_range_func(const Device::Pointer &device, const Array::Pointer &src, const Array::Pointer &values, Array::Pointer dst, float min_value, float max_value) -> Array::Pointer

remove_labels_with_map_values_within_range

Remove labels with values inside a given value range based on a vector of values associated with the labels.

Note

ā€˜label processing’, ā€˜combine’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image where labels will be filtered. [const Array::Pointer &]

param values:

Vector of values associated with the labels. [const Array::Pointer &]

param dst:

Output image where labels will be written to. [Array::Pointer ( = None )]

param min_value:

Minimum value to keep. [float ( = 0 )]

param max_value:

Maximum value to keep. [float ( = 100 )]

return:

Array::Pointer

auto remove_labels_with_map_values_within_range_func(const Device::Pointer &device, const Array::Pointer &src, const Array::Pointer &values, Array::Pointer dst, float min_value, float max_value) -> Array::Pointer

exclude_labels_with_map_values_out_of_range

Exclude labels with values outside a given value range based on a vector of values associated with the labels.

Deprecated:

This function is deprecated. Use remove_labels_with_map_values_out_of_range_func instead.

Note

ā€˜label processing’, ā€˜combine’

param device:

Device to perform the operation on. [const Device::Pointer &]

param values_map:

Vector of values associated with the labels. [const Array::Pointer &]

param label_map_input:

Input image where labels will be filtered. [const Array::Pointer &]

param dst:

Output image where labels will be written to. [Array::Pointer ( = None )]

param minimum_value_range:

Minimum value to keep. [float ( = 0 )]

param maximum_value_range:

Maximum value to keep. [float ( = 100 )]

return:

Array::Pointer

auto exclude_labels_with_map_values_out_of_range_func(const Device::Pointer &device, const Array::Pointer &values_map, const Array::Pointer &label_map_input, Array::Pointer dst, float minimum_value_range, float maximum_value_range) -> Array::Pointer

exclude_labels_with_map_values_within_range

Exclude labels with values inside a given value range based on a vector of values associated with the labels.

Deprecated:

This function is deprecated. Use remove_labels_with_values_within_range_func instead.

Note

ā€˜label processing’, ā€˜combine’

param device:

Device to perform the operation on. [const Device::Pointer &]

param values_map:

Vector of values associated with the labels. [const Array::Pointer &]

param label_map_input:

Input image where labels will be filtered. [const Array::Pointer &]

param dst:

Output image where labels will be written to. [Array::Pointer ( = None )]

param minimum_value_range:

Minimum value to keep. [float ( = 0 )]

param maximum_value_range:

Maximum value to keep. [float ( = 100 )]

return:

Array::Pointer

auto exclude_labels_with_map_values_within_range_func(const Device::Pointer &device, const Array::Pointer &values_map, const Array::Pointer &label_map_input, Array::Pointer dst, float minimum_value_range, float maximum_value_range) -> Array::Pointer

extension_ratio_map

Determines the extension ratio for every label in a label map and returns it as a parametric map.

The extension ratio is defined as the maximum distance of any pixel in the label to the label’s centroid divided by the average distance of all pixels in the label to the centroid.

Note

ā€˜label processing’, ā€˜in assistant’, ā€˜map’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input label image. [const Array::Pointer &]

param dst:

Output parametric image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto extension_ratio_map_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

mean_extension_map

Determines, for every label, the mean distance of all pixels to the centroid in a label map and returns it as a parametric map.

Note

ā€˜label processing’, ā€˜in assistant’, ā€˜map’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input label image. [const Array::Pointer &]

param dst:

Output parametric image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto mean_extension_map_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

maximum_extension_map

Determines, for every label, the maximum distance of any pixel to the centroid in a label map and returns it as a parametric map.

Note

ā€˜label processing’, ā€˜in assistant’, ā€˜map’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input label image. [const Array::Pointer &]

param dst:

Output parametric image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto maximum_extension_map_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

minimum_intensity_map

Takes an image and a corresponding label map, determines the minimum intensity per label, and replaces every label with that number.

This results in a parametric image expressing minimum object intensity.

Note

ā€˜label measurement’, ā€˜map’, ā€˜in assistant’, ā€˜combine’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Intensity image. [const Array::Pointer &]

param labels:

Label image. [const Array::Pointer &]

param dst:

Parametric image computed. [Array::Pointer ( = None )]

return:

Array::Pointer

auto minimum_intensity_map_func(const Device::Pointer &device, const Array::Pointer &src, const Array::Pointer &labels, Array::Pointer dst) -> Array::Pointer

maximum_intensity_map

Takes an image and a corresponding label map, determines the maximum intensity per label, and replaces every label with that number.

This results in a parametric image expressing maximum object intensity.

Note

ā€˜label measurement’, ā€˜map’, ā€˜in assistant’, ā€˜combine’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Intensity image. [const Array::Pointer &]

param labels:

Label image. [const Array::Pointer &]

param dst:

Parametric image computed. [Array::Pointer ( = None )]

return:

Array::Pointer

auto maximum_intensity_map_func(const Device::Pointer &device, const Array::Pointer &src, const Array::Pointer &labels, Array::Pointer dst) -> Array::Pointer

standard_deviation_intensity_map

Takes an image and a corresponding label map, determines the standard deviation of the intensity per label, and replaces every label with that number.

This results in a parametric image expressing standard deviation of object intensity.

Note

ā€˜label measurement’, ā€˜map’, ā€˜in assistant’, ā€˜combine’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Intensity image. [const Array::Pointer &]

param labels:

Label image. [const Array::Pointer &]

param dst:

Parametric image computed. [Array::Pointer ( = None )]

return:

Array::Pointer

auto standard_deviation_intensity_map_func(const Device::Pointer &device, const Array::Pointer &src, const Array::Pointer &labels, Array::Pointer dst) -> Array::Pointer

touching_neighbor_count_map

For each label in a label map, determines how many other labels it is touching and creates a parametric map where each label is replaced by that number.

Note

ā€˜label processing’, ā€˜in assistant’, ā€˜map’

param device:

Device to perform the operation on. [const Device::Pointer &]

param labels:

Input label image. [const Array::Pointer &]

param dst:

Output parametric image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto touching_neighbor_count_map_func(const Device::Pointer &device, const Array::Pointer &labels, Array::Pointer dst) -> Array::Pointer

percentile

Computes the percentile value of an image.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image. [const Array::Pointer &]

param percentile:

Percentile to compute. [float ( = 50.0 )]

return:

float

auto percentile_func(const Device::Pointer &device, const Array::Pointer &src, float percentile) -> float

mean_of_touching_neighbors_map

Compute the mean value of touching neighbors from a parametric map and a label image. Generates a new parametric map where each label is replaced by the mean value of its touching neighbors. The radius parameter allows considering neighbors of neighbors (e.g. radius 1 = direct neighbors, radius 2 = neighbors of neighbors, etc.).

param device:

Device to perform the operation on. [const Device::Pointer &]

param map:

Input parametric map image. [const Array::Pointer &]

param labels:

Input vector image. [const Array::Pointer &]

param dst:

Output parametric image. [Array::Pointer ( = None )]

param radius:

Radius of touching neighbors to consider. [int ( = 1 )]

param ignore_background:

Whether to ignore the background label. [bool ( = True )]

return:

Array::Pointer

auto mean_of_touching_neighbors_map_func(const Device::Pointer &device, const Array::Pointer &map, const Array::Pointer &labels, Array::Pointer dst, int radius, bool ignore_background) -> Array::Pointer

median_of_touching_neighbors_map

Computes the median value of touching neighbors from a parametric map and a label image. Generates a new parametric map where each label is replaced by the mean value of its touching neighbors. The radius parameter allows considering neighbors of neighbors (e.g. radius 1 = direct neighbors, radius 2 = neighbors of neighbors, etc.).

param device:

Device to perform the operation on. [const Device::Pointer &]

param map:

Input parametric map image. [const Array::Pointer &]

param labels:

Input label image. [const Array::Pointer &]

param dst:

Output parametric image. [Array::Pointer ( = None )]

param radius:

Radius of touching neighbors to consider. [int ( = 1 )]

param ignore_background:

Whether to ignore the background label. [bool ( = True )]

return:

Array::Pointer

auto median_of_touching_neighbors_map_func(const Device::Pointer &device, const Array::Pointer &map, const Array::Pointer &labels, Array::Pointer dst, int radius, bool ignore_background) -> Array::Pointer

minimum_of_touching_neighbors_map

Computes the minimum value of touching neighbors from a parametric map and a label image. Generates a new parametric map where each label is replaced by the mean value of its touching neighbors. The radius parameter allows considering neighbors of neighbors (e.g. radius 1 = direct neighbors, radius 2 = neighbors of neighbors, etc.).

param device:

Device to perform the operation on. [const Device::Pointer &]

param map:

Input parametric map image. [const Array::Pointer &]

param labels:

Input label image. [const Array::Pointer &]

param dst:

Output parametric image. [Array::Pointer ( = None )]

param radius:

Radius of touching neighbors to consider. [int ( = 1 )]

param ignore_background:

Whether to ignore the background label. [bool ( = True )]

return:

Array::Pointer

auto minimum_of_touching_neighbors_map_func(const Device::Pointer &device, const Array::Pointer &map, const Array::Pointer &labels, Array::Pointer dst, int radius, bool ignore_background) -> Array::Pointer

maximum_of_touching_neighbors_map

Computes the maximum value of touching neighbors from a parametric map and a label image. Generates a new parametric map where each label is replaced by the mean value of its touching neighbors. The radius parameter allows considering neighbors of neighbors (e.g. radius 1 = direct neighbors, radius 2 = neighbors of neighbors, etc.).

param device:

Device to perform the operation on. [const Device::Pointer &]

param map:

Input parametric map image. [const Array::Pointer &]

param labels:

Input label image. [const Array::Pointer &]

param dst:

Output parametric image. [Array::Pointer ( = None )]

param radius:

Radius of touching neighbors to consider. [int ( = 1 )]

param ignore_background:

Whether to ignore the background label. [bool ( = True )]

return:

Array::Pointer

auto maximum_of_touching_neighbors_map_func(const Device::Pointer &device, const Array::Pointer &map, const Array::Pointer &labels, Array::Pointer dst, int radius, bool ignore_background) -> Array::Pointer

standard_deviation_of_touching_neighbors_map

Computes the standard deviation of touching neighbors from a parametric map and a label image. Generates a new parametric map where each label is replaced by the mean value of its touching neighbors. The radius parameter allows considering neighbors of neighbors (e.g. radius 1 = direct neighbors, radius 2 = neighbors of neighbors, etc.).

param device:

Device to perform the operation on. [const Device::Pointer &]

param map:

Input parametric map image. [const Array::Pointer &]

param labels:

Input label image. [const Array::Pointer &]

param dst:

Output parametric image. [Array::Pointer ( = None )]

param radius:

Radius of touching neighbors to consider. [int ( = 1 )]

param ignore_background:

Whether to ignore the background label. [bool ( = True )]

return:

Array::Pointer

auto standard_deviation_of_touching_neighbors_map_func(const Device::Pointer &device, const Array::Pointer &map, const Array::Pointer &labels, Array::Pointer dst, int radius, bool ignore_background) -> Array::Pointer

mode_of_touching_neighbors_map

Computes the mode value of touching neighbors from a parametric map and a label image. Generates a new parametric map where each label is replaced by the mean value of its touching neighbors. The radius parameter allows considering neighbors of neighbors (e.g. radius 1 = direct neighbors, radius 2 = neighbors of neighbors, etc.).

param device:

Device to perform the operation on. [const Device::Pointer &]

param map:

Input parametric map image. [const Array::Pointer &]

param labels:

Input label image. [const Array::Pointer &]

param dst:

Output parametric image. [Array::Pointer ( = None )]

param radius:

Radius of touching neighbors to consider. [int ( = 1 )]

param ignore_background:

Whether to ignore the background label. [bool ( = True )]

return:

Array::Pointer

auto mode_of_touching_neighbors_map_func(const Device::Pointer &device, const Array::Pointer &map, const Array::Pointer &labels, Array::Pointer dst, int radius, bool ignore_background) -> Array::Pointer

tier5

namespace tier5

Namespace container for all Tier 5 functions. Tier 5 functions are advanced and may rely on lower-tier functions.

array_equal

Compares if all pixels of two images are identical. If the shape of the images or any pixel are different, returns false; true otherwise. This function works similarly to its counterpart in NumPy.

Note

ā€˜combine’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

First array to compare. [const Array::Pointer &]

param src1:

Second array to compare. [const Array::Pointer &]

return:

bool

auto array_equal_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1) -> bool

combine_labels

Combines two label images by adding labels from one label image to another. Labels in the second image overwrite labels in the first image. Afterward, labels are relabeled sequentially.

Note

ā€˜label processing’, ā€˜combine labels’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

Label image to add labels to. [const Array::Pointer &]

param src1:

Label image to add labels from. [const Array::Pointer &]

param dst:

Output label image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto combine_labels_func(const Device::Pointer &device, const Array::Pointer &src0, const Array::Pointer &src1, Array::Pointer dst) -> Array::Pointer

connected_components_labeling

Performs connected components analysis by inspecting the neighborhood of every pixel in a binary image and generates a label map.

Deprecated:

This method is deprecated. Consider using connected_component_labeling() instead.

Note

ā€˜label’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Binary image to label. [const Array::Pointer &]

param dst:

Output label image. [Array::Pointer ( = None )]

param connectivity:

Defines pixel neighborhood relationship, ā€œboxā€ or ā€œsphereā€. [const std::string & ( = ā€˜box’ )]

return:

Array::Pointer

auto connected_components_labeling_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, const std::string &connectivity) -> Array::Pointer

connected_component_labeling

Performs connected components analysis by inspecting the neighborhood of every pixel in a binary image and generates a label map.

Note

ā€˜label’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Binary image to label. [const Array::Pointer &]

param dst:

Output label image. [Array::Pointer ( = None )]

param connectivity:

Defines pixel neighborhood relationship, ā€œboxā€ or ā€œsphereā€. [const std::string & ( = ā€˜box’ )]

return:

Array::Pointer

auto connected_component_labeling_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, const std::string &connectivity) -> Array::Pointer

reduce_labels_to_centroids

Takes a label map and reduces each label to its centroid.

Note

ā€˜label processing’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Label image to reduce. [const Array::Pointer &]

param dst:

Output label image with centroids. [Array::Pointer ( = None )]

return:

Array::Pointer

auto reduce_labels_to_centroids_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

filter_label_by_size

Filters labelled objects outside the min/max size range.

Note

ā€˜label processing’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input label image. [const Array::Pointer &]

param dst:

Output label image. [Array::Pointer ( = None )]

param minimum_size:

Minimum size of labels to keep. [float ( = 0 )]

param maximum_size:

Maximum size of labels to keep. [float ( = 100 )]

return:

Array::Pointer

auto filter_label_by_size_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float minimum_size, float maximum_size) -> Array::Pointer

exclude_labels_outside_size_range

Filters labelled objects outside the min/max size range.

Note

ā€˜label processing’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input label image. [const Array::Pointer &]

param dst:

Output label image. [Array::Pointer ( = None )]

param minimum_size:

Minimum size of labels to keep. [float ( = 0 )]

param maximum_size:

Maximum size of labels to keep. [float ( = 100 )]

return:

Array::Pointer

auto exclude_labels_outside_size_range_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float minimum_size, float maximum_size) -> Array::Pointer

merge_touching_labels

Merges touching labels of a label image and relabels the result sequentially.

Note

ā€˜label processing’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input label image. [const Array::Pointer &]

param dst:

Output label image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto merge_touching_labels_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

proximal_neighbor_count

From a label map, determines which labels are whithin a given distance range of each other and returns the number of those in vector.

Note

ā€˜label measurement’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input label image. [const Array::Pointer &]

param dst:

Output parametric image. [Array::Pointer ( = None )]

param min_distance:

Minimum distance to consider a neighbor. [float ( = -1 )]

param max_distance:

Maximum distance to consider a neighbor. [float ( = -1 )]

return:

Array::Pointer

auto proximal_neighbor_count_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float min_distance, float max_distance) -> Array::Pointer

normalize

Normalizes the pixel values of an image to the range [0, 1]. This function normalize the pixel values between [0, 1] following the linear normalization formula:

where the I_min and I_max are determined by the low_percentile and high_percentile parameters, respectively. If not specified, the minimum and maximum pixel values of the image are used.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to normalize. [const Array::Pointer &]

param dst:

Output normalized image. [Array::Pointer ( = None )]

param low_percentile:

Low percentile to determine the minimum pixel value. [float ( = -1 )]

param high_percentile:

High percentile to determine the maximum pixel value. [float ( = -1 )]

return:

Array::Pointer

auto normalize_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float low_percentile, float high_percentile) -> Array::Pointer

tier6

namespace tier6

Namespace container for all Tier 6 functions. Tier 6 functions are advanced and may rely on lower-tier functions.

dilate_labels

Dilates labels to a larger size. No label overwrites another label. Similar to the implementation in scikit-image and MorphoLibJ. Note: This operation assumes input images are isotropic.

Note

ā€˜label processing’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input label image to dilate. [const Array::Pointer &]

param dst:

Output label image. [Array::Pointer ( = None )]

param radius:

Dilation radius. [int ( = 2 )]

return:

Array::Pointer

auto dilate_labels_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, int radius) -> Array::Pointer

erode_labels

Erodes labels to a smaller size. Note: Depending on the label image and the radius, labels may disappear and labels may split into multiple islands. Thus, overlapping labels of input and output may not have the same identifier. This operation assumes input images are isotropic.

Note

ā€˜label processing’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input label image. [const Array::Pointer &]

param dst:

Output label image. [Array::Pointer ( = None )]

param radius:

Erosion radius. [int ( = 1 )]

param relabel:

Relabel the image, e.g., if objects disappear or split. [bool ( = False )]

return:

Array::Pointer

auto erode_labels_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, int radius, bool relabel) -> Array::Pointer

gauss_otsu_labeling

Labels objects directly from gray-value images.

The outline_sigma parameter allows tuning the segmentation result. Under the hood, this filter applies a Gaussian blur, Otsu thresholding, and connected component labeling. The thresholded binary image is flooded using the Voronoi tessellation approach starting from the found local maxima.

Note

ā€˜label’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src0:

Intensity image to segment. [const Array::Pointer &]

param dst:

Output label image. [Array::Pointer ( = None )]

param outline_sigma:

Gaussian blur sigma along all axes. [float ( = 0 )]

return:

Array::Pointer

auto gauss_otsu_labeling_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float outline_sigma) -> Array::Pointer

masked_voronoi_labeling

Takes a binary image, labels connected components, and dilates the regions using an octagon shape until they touch. The region growing is limited to a masked area. The resulting label map is written to the output.

Note

ā€˜label’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input binary image. [const Array::Pointer &]

param mask:

Input mask. [const Array::Pointer &]

param dst:

Output label image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto masked_voronoi_labeling_func(const Device::Pointer &device, const Array::Pointer &src, const Array::Pointer &mask, Array::Pointer dst) -> Array::Pointer

voronoi_labeling

Takes a binary image, labels connected components, and dilates the regions using an octagon shape until they touch. The resulting label map is written to the output.

Note

ā€˜label’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param input_binary:

Input binary image. [const Array::Pointer &]

param output_labels:

Output label image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto voronoi_labeling_func(const Device::Pointer &device, const Array::Pointer &input_binary, Array::Pointer output_labels) -> Array::Pointer

remove_small_labels

Removes labelled objects smaller than a given size (in pixels) from a label map.

Note

ā€˜label processing’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Label image to filter. [const Array::Pointer &]

param dst:

Filtered output label image. [Array::Pointer ( = None )]

param minimum_size:

Smallest size object allowed. [float ( = 100 )]

return:

Array::Pointer

auto remove_small_labels_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float minimum_size) -> Array::Pointer

exclude_small_labels

Removes labels from a label map that are below a given maximum size.

Note

ā€˜label processing’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Label image to filter. [const Array::Pointer &]

param dst:

Filtered output label image. [Array::Pointer ( = None )]

param maximum_size:

Largest size object to exclude. [float ( = 100 )]

return:

Array::Pointer

auto exclude_small_labels_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float maximum_size) -> Array::Pointer

remove_large_labels

Removes labelled objects larger than a given size (in pixels) from a label map.

Note

ā€˜label processing’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Label image to filter. [const Array::Pointer &]

param dst:

Filtered output label image. [Array::Pointer ( = None )]

param maximum_size:

Largest size object allowed. [float ( = 100 )]

return:

Array::Pointer

auto remove_large_labels_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float maximum_size) -> Array::Pointer

exclude_large_labels

Removes labels from a label map that are above a given minimum size.

Note

ā€˜label processing’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Label image to filter. [const Array::Pointer &]

param dst:

Filtered output label image. [Array::Pointer ( = None )]

param minimum_size:

Smallest size object to exclude. [float ( = 100 )]

return:

Array::Pointer

auto exclude_large_labels_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float minimum_size) -> Array::Pointer

proximal_neighbor_count_map

From a label map, generates a map where each label is replaced by the count of neighboring labels within a specified distance range.

Note

ā€˜label measurement’, ā€˜map’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param labels:

Input label image. [const Array::Pointer &]

param dst:

Output parametric image. [Array::Pointer ( = None )]

param min_distance:

Minimum distance to consider a neighbor. [float ( = -1 )]

param max_distance:

Maximum distance to consider a neighbor. [float ( = -1 )]

return:

Array::Pointer

auto proximal_neighbor_count_map_func(const Device::Pointer &device, const Array::Pointer &labels, Array::Pointer dst, float min_distance, float max_distance) -> Array::Pointer

tier7

namespace tier7

Namespace container for all Tier 7 functions. Tier 7 functions are advanced and may rely on lower-tier functions.

affine_transform

Applies an affine transformation matrix to an array and returns the result. The transformation matrix must be 3Ɨ3 or 4Ɨ4, stored as a 1D array. The matrix should be row-major, i.e., the first 3 elements are the first row of the matrix. If no matrix is given, the identity matrix will be used.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to be transformed. [const Array::Pointer &]

param dst:

Output image. [Array::Pointer ( = None )]

param transform_matrix:

Affine transformation matrix (3Ɨ3 or 4Ɨ4). [std::vector<float> * ( = None )]

param interpolate:

If true, bi/trilinear interpolation will be applied, if hardware allows. [bool ( = False )]

param resize:

Automatically determines the size of the output depending on the rotation angles. [bool ( = False )]

return:

Array::Pointer

auto affine_transform_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, std::vector<float> *transform_matrix, bool interpolate, bool resize) -> Array::Pointer

eroded_otsu_labeling

Segments and labels an image using blurring, Otsu thresholding, binary erosion, and masked Voronoi labeling.

After blurring and Otsu thresholding the image, iterative binary erosion is applied. Objects in the eroded image are labeled, and the labels are extended to fit again into the initial binary image using masked Voronoi labeling.

This function is similar to voronoi_otsu_labeling. It is intended to deal better with cases where labels of objects swap into each other when objects are dense. As when using Voronoi-Otsu labeling, small objects may disappear when applying this operation.

This function is inspired by a similar implementation in Java by Jan Brocher (Biovoxxel).

Note

ā€˜label’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to be transformed. [const Array::Pointer &]

param dst:

Output label image. [Array::Pointer ( = None )]

param number_of_erosions:

Number of erosion iterations. [int ( = 5 )]

param outline_sigma:

Gaussian blur sigma applied before Otsu thresholding. [float ( = 2 )]

return:

Array::Pointer

auto eroded_otsu_labeling_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, int number_of_erosions, float outline_sigma) -> Array::Pointer

rigid_transform

Translates the image by a given vector and rotates it by given angles. Angles are given in radians. To convert degrees to radians, use this formula: angle_in_radians = angle_in_degrees Ɨ Ļ€ / 180.0

Note

ā€˜transform’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to be transformed. [const Array::Pointer &]

param dst:

Output image. [Array::Pointer ( = None )]

param translate_x:

Translation along x axis in pixels. [float ( = 0 )]

param translate_y:

Translation along y axis in pixels. [float ( = 0 )]

param translate_z:

Translation along z axis in pixels. [float ( = 0 )]

param angle_x:

Rotation around x axis in radians. [float ( = 0 )]

param angle_y:

Rotation around y axis in radians. [float ( = 0 )]

param angle_z:

Rotation around z axis in radians. [float ( = 0 )]

param centered:

If true, rotate image around center; otherwise, around the origin. [bool ( = True )]

param interpolate:

If true, bi/trilinear interpolation will be applied, if hardware allows. [bool ( = False )]

param resize:

Automatically determines the size of the output depending on the rotation angles. [bool ( = False )]

return:

Array::Pointer

auto rigid_transform_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float translate_x, float translate_y, float translate_z, float angle_x, float angle_y, float angle_z, bool centered, bool interpolate, bool resize) -> Array::Pointer

rotate

Rotates the image by given angles. Angles are given in degrees. To convert radians to degrees, use this formula: angle_in_degrees = angle_in_radians Ɨ 180.0 / Ļ€

Note

ā€˜transform’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to be rotated. [const Array::Pointer &]

param dst:

Output image. [Array::Pointer ( = None )]

param angle_x:

Rotation around x axis in degrees. [float ( = 0 )]

param angle_y:

Rotation around y axis in degrees. [float ( = 0 )]

param angle_z:

Rotation around z axis in degrees. [float ( = 0 )]

param centered:

If true, rotate image around center; otherwise, around the origin. [bool ( = True )]

param interpolate:

If true, bi/trilinear interpolation will be applied, if hardware allows. [bool ( = False )]

param resize:

Automatically determines the size of the output depending on the rotation angles. [bool ( = False )]

return:

Array::Pointer

auto rotate_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float angle_x, float angle_y, float angle_z, bool centered, bool interpolate, bool resize) -> Array::Pointer

scale

Scales the image by given factors.

Note

ā€˜transform’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to be scaled. [const Array::Pointer &]

param dst:

Output image. [Array::Pointer ( = None )]

param factor_x:

Scaling factor along x axis. [float ( = 1 )]

param factor_y:

Scaling factor along y axis. [float ( = 1 )]

param factor_z:

Scaling factor along z axis. [float ( = 1 )]

param centered:

If true, the image will be scaled around the center of the image. [bool ( = True )]

param interpolate:

If true, bi/trilinear interpolation will be applied. [bool ( = False )]

param resize:

Automatically determines the output image size. [bool ( = False )]

return:

Array::Pointer

auto scale_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float factor_x, float factor_y, float factor_z, bool centered, bool interpolate, bool resize) -> Array::Pointer

translate

Translates the image by a given vector.

Note

ā€˜transform’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to be translated. [const Array::Pointer &]

param dst:

Output image. [Array::Pointer ( = None )]

param translate_x:

Translation along x axis in pixels. [float ( = 0 )]

param translate_y:

Translation along y axis in pixels. [float ( = 0 )]

param translate_z:

Translation along z axis in pixels. [float ( = 0 )]

param interpolate:

If true, bi/trilinear interpolation will be applied. [bool ( = False )]

return:

Array::Pointer

auto translate_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float translate_x, float translate_y, float translate_z, bool interpolate) -> Array::Pointer

deskew_x

Deskews a volume as acquired with oblique plane light-sheet microscopy with skew in the x direction.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to be deskewed. [const Array::Pointer &]

param dst:

Output image. [Array::Pointer ( = None )]

param angle:

Angle in degrees. [float ( = 30 )]

param voxel_size_x:

Voxel size in x direction. [float ( = 1.0 )]

param voxel_size_y:

Voxel size in y direction. [float ( = 1.0 )]

param voxel_size_z:

Voxel size in z direction. [float ( = 1.0 )]

param scale_factor:

Downscaling factor after deskewing. [float ( = 1.0 )]

return:

Array::Pointer

auto deskew_x_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float angle, float voxel_size_x, float voxel_size_y, float voxel_size_z, float scale_factor) -> Array::Pointer

deskew_y

Deskews a volume as acquired with oblique plane light-sheet microscopy with skew in the y direction.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to be deskewed. [const Array::Pointer &]

param dst:

Output image. [Array::Pointer ( = None )]

param angle:

Angle in degrees. [float ( = 30 )]

param voxel_size_x:

Voxel size in x direction. [float ( = 1.0 )]

param voxel_size_y:

Voxel size in y direction. [float ( = 1.0 )]

param voxel_size_z:

Voxel size in z direction. [float ( = 1.0 )]

param scale_factor:

Downscaling factor after deskewing. [float ( = 1.0 )]

return:

Array::Pointer

auto deskew_y_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float angle, float voxel_size_x, float voxel_size_y, float voxel_size_z, float scale_factor) -> Array::Pointer

closing_labels

Applies a morphological closing operation to a label image. The operation consists of iterative dilation and erosion of the labels. With every iteration, box and diamond/sphere structuring elements are used; thus, the operation has an octagon as the structuring element. Note: This operation assumes input images are isotropic.

Note

ā€˜label processing’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input label image. [const Array::Pointer &]

param dst:

Output label image. [Array::Pointer ( = None )]

param radius:

Radius size for the closing. [int ( = 0 )]

return:

Array::Pointer

auto closing_labels_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, int radius) -> Array::Pointer

erode_connected_labels

Erodes labels to a smaller size. Note: Depending on the label image and the radius, labels may disappear and labels may split into multiple islands. Thus, overlapping labels of input and output may not have the same identifier.

Note

ā€˜label processing’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image to process. [const Array::Pointer &]

param dst:

Output label image. [Array::Pointer ( = None )]

param radius:

Erosion radius. [int ( = 1 )]

return:

Array::Pointer

auto erode_connected_labels_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, int radius) -> Array::Pointer

opening_labels

Applies a morphological opening operation to a label image. The operation consists of iterative erosion and dilation of the labels. With every iteration, box and diamond/sphere structuring elements are used; thus, the operation has an octagon as the structuring element. Note: This operation assumes input images are isotropic.

Note

ā€˜label processing’, ā€˜in assistant’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input label image. [const Array::Pointer &]

param dst:

Output label image. [Array::Pointer ( = None )]

param radius:

Radius size for the opening. [int ( = 0 )]

return:

Array::Pointer

auto opening_labels_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, int radius) -> Array::Pointer

voronoi_otsu_labeling

Labels objects directly from gray-value images. The two sigma parameters allow tuning the segmentation result. Under the hood, this filter applies two Gaussian blurs, spot detection, Otsu thresholding, and Voronoi labeling. The thresholded binary image is flooded using the Voronoi tessellation approach starting from the found local maxima. Note: This operation assumes input images are isotropic.

Note

ā€˜label’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input intensity image. [const Array::Pointer &]

param dst:

Output label image. [Array::Pointer ( = None )]

param spot_sigma:

Controls how close detected cells can be. [float ( = 2 )]

param outline_sigma:

Controls how precisely segmented objects are outlined. [float ( = 2 )]

return:

Array::Pointer

auto voronoi_otsu_labeling_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, float spot_sigma, float outline_sigma) -> Array::Pointer

tier8

namespace tier8

Namespace container for all functions of Tier 8 category. Tier 8 functions are advanced functions that may rely on previous tier functions.

smooth_labels

Applies a morphological opening operation to a label image and afterward fills gaps between the labels using Voronoi labeling. Finally, the result label image is masked so that all background pixels remain background pixels. Note: It is recommended to process isotropic label images.

Note

ā€˜label processing’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input label image. [const Array::Pointer &]

param dst:

Output label image. [Array::Pointer ( = None )]

param radius:

Smoothing radius. [int ( = 0 )]

return:

Array::Pointer

auto smooth_labels_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, int radius) -> Array::Pointer

smooth_connected_labels

Applies a morphological erosion and dilation of the label image with respect to the connectivity of the labels. Note: It is recommended to process isotropic label images.

Note

ā€˜label processing’, ā€˜in assistant’, ā€˜bia-bob-suggestion’

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input label image. [const Array::Pointer &]

param dst:

Output label image. [Array::Pointer ( = None )]

param radius:

Smoothing radius. [int ( = 0 )]

return:

Array::Pointer

auto smooth_connected_labels_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst, int radius) -> Array::Pointer

fft

Performs a 1D, 2D, or 3D FFT (Fast Fourier Transform) on the input image.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image. [const Array::Pointer &]

param dst:

Output image. [Array::Pointer ( = None )]

return:

Array::Pointer

auto fft_func(const Device::Pointer &device, const Array::Pointer &src, Array::Pointer dst) -> Array::Pointer

ifft

Performs a 1D, 2D, or 3D IFFT (Inverse Fast Fourier Transform) on the input image. The input image must be Hermitian, and the output image must be provided as the second argument.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image. [const Array::Pointer &]

param dst:

Output image. [const Array::Pointer &]

return:

Array::Pointer

auto ifft_func(const Device::Pointer &device, const Array::Pointer &src, const Array::Pointer &dst) -> Array::Pointer

convolve_fft

Performs a 1D, 2D, or 3D convolution using FFT between an input image and a kernel.

Input image, PSF kernel, and normalization image are expected to be in the spatial domain. The function will automatically pad the input image and PSF kernel to the same size as the closest smooth size and will take care of the PSF kernel centering.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image. [const Array::Pointer &]

param kernel:

Kernel image. [const Array::Pointer &]

param dst:

Output image. [Array::Pointer ( = None )]

param correlate:

If true, convolution with the PSF reversed. [bool ( = False )]

return:

Array::Pointer

auto convolve_fft_func(const Device::Pointer &device, const Array::Pointer &src, const Array::Pointer &kernel, Array::Pointer dst, bool correlate) -> Array::Pointer

deconvolve_fft

Performs a 1D, 2D, or 3D deconvolution using FFT between an input image and a PSF kernel. The deconvolution is performed using the Richardson-Lucy algorithm and requires a maximum iteration number. The user can specify a normalization image (optional) and a regularization parameter (optional) to apply Total Variation regularization.

Input image, PSF kernel, and normalization image are expected to be in the spatial domain. The function will automatically pad the input image and PSF kernel to the same size as the closest smooth size and will take care of the PSF kernel centering.

param device:

Device to perform the operation on. [const Device::Pointer &]

param src:

Input image. [const Array::Pointer &]

param psf:

Kernel image. [const Array::Pointer &]

param normalization:

Normalization image. [const Array::Pointer ( = None )]

param dst:

Output image. [Array::Pointer ( = None )]

param iteration:

Maximum number of iterations. [int ( = 100 )]

param regularization:

Regularization parameter. [float ( = 0.0 )]

return:

Array::Pointer

auto deconvolve_fft_func(const Device::Pointer &device, const Array::Pointer &src, const Array::Pointer &psf, Array::Pointer normalization, Array::Pointer dst, int iteration, float regularization) -> Array::Pointer