image-js 0.35.3 → 0.35.4

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
@@ -159,7 +159,7 @@ export declare class Image {
159
159
  getRow(row: number, channel?: number): Array<number>;
160
160
  getColumn(row: number, channel?: number): Array<number>;
161
161
  getMatrix(options?: { channel?: number }): Matrix;
162
- setMatrix(matrix: Matrix, options?: { channel?: number });
162
+ setMatrix(matrix: Matrix, options?: { channel?: number }): this;
163
163
  getPixelsArray(): Array<Array<number>>;
164
164
  getIntersection(mask2: Image): object;
165
165
  getClosestCommonParent(mask: Image): Image;
@@ -10,7 +10,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
10
10
  * Direction of a gradient filter
11
11
  * @typedef {('x'|'y'|'xy')} GradientDirection
12
12
  */
13
-
14
13
  /**
15
14
  * @memberof Image
16
15
  * @instance
@@ -17,7 +17,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
17
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
18
  // Many measurements:
19
19
  // https://www.sympatec.com/en/particle-measurement/glossary/particle-shape/#
20
-
21
20
  /**
22
21
  * Class to manage Region Of Interests
23
22
  * @class Roi
@@ -16,7 +16,6 @@ var _greyAlgorithms = require("./greyAlgorithms");
16
16
  * @param {number} blue - value of the blue channel
17
17
  * @return {number} value of the grey channel
18
18
  */
19
-
20
19
  /**
21
20
  * Converts the current image to greyscale.
22
21
  * The source image has to be RGB.
@@ -12,6 +12,8 @@ var _mlMatrix = require("ml-matrix");
12
12
  * @param {Matrix} matrix
13
13
  * @param {object} [options]
14
14
  * @param {number} [options.channel]
15
+ *
16
+ * @return {this}
15
17
  */
16
18
  function setMatrix(matrix, options = {}) {
17
19
  matrix = new _mlMatrix.Matrix(matrix);
@@ -35,4 +37,5 @@ function setMatrix(matrix, options = {}) {
35
37
  this.setValueXY(y, x, channel, matrix.get(x, y));
36
38
  }
37
39
  }
40
+ return this;
38
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "image-js",
3
- "version": "0.35.3",
3
+ "version": "0.35.4",
4
4
  "description": "Image processing and manipulation in JavaScript",
5
5
  "keywords": [
6
6
  "image",
@@ -7,6 +7,8 @@ import { Matrix } from 'ml-matrix';
7
7
  * @param {Matrix} matrix
8
8
  * @param {object} [options]
9
9
  * @param {number} [options.channel]
10
+ *
11
+ * @return {this}
10
12
  */
11
13
  export default function setMatrix(matrix, options = {}) {
12
14
  matrix = new Matrix(matrix);
@@ -35,4 +37,6 @@ export default function setMatrix(matrix, options = {}) {
35
37
  this.setValueXY(y, x, channel, matrix.get(x, y));
36
38
  }
37
39
  }
40
+
41
+ return this;
38
42
  }