Skip to content
This repository was archived by the owner on Jul 26, 2025. It is now read-only.

Commit 04f73e6

Browse files
feat: add ROI features that calculate convexHull, borders length etc. (#237)
feat: add features that calculate convexHull, borders length etc. Co-authored-by: Luc Patiny <[email protected]>
1 parent a902790 commit 04f73e6

20 files changed

+1170
-122
lines changed

src/Mask.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export interface MaskOptions {
6666
/**
6767
* Origin of the image relative to a parent image.
6868
*
69-
* @default {row: 0, column: 0}
69+
* @default {row: 0, column: 0 }
7070
*/
7171
origin?: Point;
7272
/**
@@ -512,7 +512,7 @@ export class Mask {
512512
* Get the coordinates of the points on the border of a shape defined in a mask.
513513
*
514514
* @param options - Get border points options.
515-
* @returns Array of boder points.
515+
* @returns Array of border points.
516516
*/
517517
public getBorderPoints(options?: GetBorderPointsOptions): Point[] {
518518
return getBorderPoints(this, options);

src/__tests__/Mask.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ test('fill with a value', () => {
114114

115115
test('createFrom', () => {
116116
const mask = new Mask(2, 20);
117+
117118
const newMask = Mask.createFrom(mask);
118119
expect(mask.width).toBe(newMask.width);
119120
expect(mask.height).toBe(newMask.height);
@@ -138,11 +139,11 @@ test('clone', () => {
138139

139140
test('check custom inspect', () => {
140141
const mask = new Mask(1, 2);
142+
141143
expect(util.inspect(mask)).toMatchSnapshot();
142144
});
143145

144146
test('check custom inspect with image too large', () => {
145147
const image = new Mask(25, 25);
146-
147148
expect(util.inspect(image)).toMatchSnapshot();
148149
});

0 commit comments

Comments
 (0)