image-js 0.36.1 → 0.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -501,6 +501,9 @@ export declare class Roi {
501
501
  height: number;
502
502
  width: number;
503
503
  surface: number;
504
+ filledSurface: number;
505
+ hullSurface: number;
506
+ hullPerimeter: number;
504
507
  mbrWidth: number;
505
508
  mbrHeight: number;
506
509
  mbrSurface: number;
@@ -453,6 +453,9 @@ class Roi {
453
453
  }
454
454
  return this.computed.mbr;
455
455
  }
456
+ get filledSurface() {
457
+ return this.surface + this.holesInfo.surface;
458
+ }
456
459
  get fillRatio() {
457
460
  return this.surface / (this.surface + this.holesInfo.surface);
458
461
  }
@@ -634,7 +637,10 @@ class Roi {
634
637
  meanY: this.meanY,
635
638
  height: this.height,
636
639
  width: this.width,
640
+ filledSurface: this.filledSurface,
637
641
  surface: this.surface,
642
+ hullSurface: this.convexHull.surface,
643
+ hullPerimeter: this.convexHull.perimeter,
638
644
  mbrWidth: this.mbr.width,
639
645
  mbrHeight: this.mbr.height,
640
646
  mbrSurface: this.mbr.surface,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "image-js",
3
- "version": "0.36.1",
3
+ "version": "0.37.0",
4
4
  "description": "Image processing and manipulation in JavaScript",
5
5
  "keywords": [
6
6
  "image",
@@ -524,6 +524,10 @@ export default class Roi {
524
524
  return this.computed.mbr;
525
525
  }
526
526
 
527
+ get filledSurface() {
528
+ return this.surface + this.holesInfo.surface;
529
+ }
530
+
527
531
  get fillRatio() {
528
532
  return this.surface / (this.surface + this.holesInfo.surface);
529
533
  }
@@ -740,7 +744,10 @@ export default class Roi {
740
744
  meanY: this.meanY,
741
745
  height: this.height,
742
746
  width: this.width,
747
+ filledSurface: this.filledSurface,
743
748
  surface: this.surface,
749
+ hullSurface: this.convexHull.surface,
750
+ hullPerimeter: this.convexHull.perimeter,
744
751
  mbrWidth: this.mbr.width,
745
752
  mbrHeight: this.mbr.height,
746
753
  mbrSurface: this.mbr.surface,