Skip to content

Commit

Permalink
feat: add Stack class to public API
Browse files Browse the repository at this point in the history
  • Loading branch information
EscapedGibbon committed Jul 5, 2024
1 parent 37db7e3 commit 1bf0fde
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { BitDepth } from 'fast-png';

import { Image } from './Image';
import { HistogramOptions } from './compute';
import { histogram } from './stack/compute/histogram';
import { maxImage } from './stack/compute/maxImage';
import { meanImage } from './stack/compute/meanImage';
import { medianImage } from './stack/compute/medianImage';
import { minImage } from './stack/compute/minImage';
import { stackHistogram } from './stack/compute/stackHistogram';
import { sum } from './stack/compute/sum';
import {
checkImagesValid,
Expand Down Expand Up @@ -174,7 +174,7 @@ export class Stack {
* @returns The histogram of the stack.
*/
public histogram(options: HistogramOptions = {}): Uint32Array {
return histogram(this, options);
return stackHistogram(this, options);
}
/**
* Align all the images of the stack on the image at the given index.
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export * from './morphology';
export * from './operations';
export * from './roi';
export * from './save';
export * from './Stack';
export * from './stack/index';
export * from './utils/utils.types';
export * from './utils/constants/channelLabels';
export * from './utils/constants/colorModels';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { checkProcessable } from '../utils/checkProcessable';
* @param options - Histogram options.
* @returns The histogram of the stack.
*/
export function histogram(
export function stackHistogram(
stack: Stack,
options: HistogramOptions,
): Uint32Array {
Expand Down
2 changes: 1 addition & 1 deletion src/stack/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from './compute/histogram';
export * from './compute/stackHistogram';
export * from './compute/maxImage';
export * from './compute/meanImage';
export * from './compute/medianImage';
Expand Down

0 comments on commit 1bf0fde

Please sign in to comment.