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;
|
package/lib/image/roi/Roi.js
CHANGED
|
@@ -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
|
|
@@ -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
|
@@ -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
|
}
|