import type { BitDepth } from 'fast-png'; import type { Image } from './Image.js'; import type { HistogramOptions } from './compute/index.js'; import type { ImageColorModel } from './utils/constants/colorModels.js'; export declare class Stack { /** * The array of images. */ private readonly images; /** * The stack size. */ readonly size: number; /** * Do the images have an alpha channel? */ readonly alpha: boolean; /** * The color model of the images. */ readonly colorModel: ImageColorModel; /** * The bit depth of the images. */ readonly bitDepth: BitDepth; /** * Whether all the images of the stack have the same dimensions. */ readonly sameDimensions: boolean; /** * The number of channels of the images. */ readonly channels: number; /** * Create a new stack from an array of images. * The images must have the same bit depth and color model. * @param images - Array of images from which to create the stack. */ constructor(images: Image[]); [Symbol.iterator](): IterableIterator; /** * Clone a stack. The images are a copy of the original images. * @returns A new stack with the same images. */ clone(): Stack; /** * Get the images of the stack. Mainly for debugging purposes. * @returns The images. */ getImages(): Image[]; /** * Get the image at the given index. * @param index - The index of the image. * @returns The image. */ getImage(index: number): Image; /** * Get a value from an image of the stack. * @param stackIndex - Index of the image in the stack. * @param row - Row index of the pixel. * @param column - Column index of the pixel. * @param channel - The channel to retrieve. * @returns The value at the given position. */ getValue(stackIndex: number, row: number, column: number, channel: number): number; /** * Get a value from an image of the stack. Specify the pixel position using its index. * @param stackIndex - Index of the image in the stack. * @param index - The index of the pixel. * @param channel - The channel to retrieve. * @returns The value at the given position. */ getValueByIndex(stackIndex: number, index: number, channel: number): number; /** * Return the image containing the minimum values of all the images in the stack for * each pixel. All the images must have the same dimensions. * @returns The minimum image. */ minImage(): Image; /** * Return the image containing the maximum values of all the images in the stack for * each pixel. All the images must have the same dimensions. * @returns The maximum image. */ maxImage(): Image; /** * Return the image containing the median values of all the images in the stack for * each pixel. All the images must have the same dimensions. * @returns The median image. */ medianImage(): Image; /** * Return the image containing the average values of all the images in the stack for * each pixel. All the images must have the same dimensions. * @returns The mean image. */ meanImage(): Image; /** * Return a 16 bits depth image containing the sum values of all the images in the stack for * each pixel. * @returns The sum image. */ sum(): Image; /** * Get the sum of all the histograms of the stack's images. If no channel is specified in the options, the images must be GREY. * @param options - Histogram options. * @returns The histogram of the stack. */ histogram(options?: HistogramOptions): Uint32Array; /** * Align all the images of the stack on the image at the given index. * @param refIndex - The index of the reference image. */ /** * Map a function on all the images of the stack. * @param callback - Function to apply on each image. * @returns New stack with the modified images. */ map(callback: (image: Image) => Image): Stack; /** * Filter the images in the stack. * @param callback - Function to decide which images to keep. * @returns New filtered stack. */ filter(callback: (image: Image) => boolean): Stack; } //# sourceMappingURL=Stack.d.ts.map