image-js
Version:
Image processing and manipulation in JavaScript
36 lines • 1.68 kB
TypeScript
import type { Image } from '../Image.js';
import type { Mask } from '../Mask.js';
import type { Point } from '../geometry/index.js';
import { RoiMapManager } from './RoiMapManager.js';
export interface WaterShedOptions {
/**
* @param points - Points which should be filled by watershed filter.
* @default - minimum points from getExtrema() function.
*/
points?: Point[];
/**
* @param mask - A binary image, the same size as the image. The algorithm will fill only if the current pixel in the binary mask is not null.
* @default undefined
*/
mask?: Mask;
/**
* @param threshold - Limit of filling. Maximum value that pixel can have.
* @default 1
*/
threshold?: number;
}
/**
* This method allows to create a ROIMap using the water shed algorithm. By default this algorithm
* will fill the holes and therefore the lowest value of the image (black zones).
* If no points are given, the function will look for all the minimal points.
* If no mask is given the algorithm will completely fill the image.
* Please take care about the value that has be in the mask ! In order to be coherent with the expected mask,
* meaning that if it is a dark zone, the mask will be dark the normal behavior to fill a zone
* is that the mask pixel is clear (value of 0) !
* If you are looking for 'maxima' the image must be inverted before applying the algorithm
* @param image - Image that the filter will be applied to.
* @param options - WaterShedOptions
* @returns RoiMapManager
*/
export declare function waterShed(image: Image, options: WaterShedOptions): RoiMapManager;
//# sourceMappingURL=waterShed.d.ts.map