image-js 1.0.0-alpha.3 → 1.0.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/LICENSE +2 -2
- package/README.md +37 -0
- package/dist/image-js.esm.js +33179 -0
- package/dist/image-js.esm.js.map +1 -0
- package/dist/image-js.esm.min.js +3 -0
- package/dist/image-js.esm.min.js.map +1 -0
- package/dist/image-js.umd.js +33324 -0
- package/dist/image-js.umd.js.map +1 -0
- package/dist/image-js.umd.min.js +3 -0
- package/dist/image-js.umd.min.js.map +1 -0
- package/dist-types/image-js.d.ts +4260 -0
- package/lib/Image.d.ts +536 -179
- package/lib/Image.d.ts.map +1 -1
- package/lib/Image.js +867 -334
- package/lib/Image.js.map +1 -1
- package/lib/Mask.d.ts +378 -0
- package/lib/Mask.d.ts.map +1 -0
- package/lib/Mask.js +557 -0
- package/lib/Mask.js.map +1 -0
- package/lib/Stack.d.ts +127 -0
- package/lib/Stack.d.ts.map +1 -0
- package/lib/Stack.js +165 -0
- package/lib/Stack.js.map +1 -0
- package/lib/align/affineTransfrom/affineFitFunction.d.ts +10 -0
- package/lib/align/affineTransfrom/affineFitFunction.d.ts.map +1 -0
- package/lib/align/affineTransfrom/affineFitFunction.js +21 -0
- package/lib/align/affineTransfrom/affineFitFunction.js.map +1 -0
- package/lib/align/affineTransfrom/applyAffineTransform.d.ts +10 -0
- package/lib/align/affineTransfrom/applyAffineTransform.d.ts.map +1 -0
- package/lib/align/affineTransfrom/applyAffineTransform.js +19 -0
- package/lib/align/affineTransfrom/applyAffineTransform.js.map +1 -0
- package/lib/align/affineTransfrom/createAffineTransformModel.d.ts +10 -0
- package/lib/align/affineTransfrom/createAffineTransformModel.d.ts.map +1 -0
- package/lib/align/affineTransfrom/createAffineTransformModel.js +23 -0
- package/lib/align/affineTransfrom/createAffineTransformModel.js.map +1 -0
- package/lib/align/affineTransfrom/drawResult.d.ts +12 -0
- package/lib/align/affineTransfrom/drawResult.d.ts.map +1 -0
- package/lib/align/affineTransfrom/drawResult.js +38 -0
- package/lib/align/affineTransfrom/drawResult.js.map +1 -0
- package/lib/align/affineTransfrom/getAffineTransform.d.ts +97 -0
- package/lib/align/affineTransfrom/getAffineTransform.d.ts.map +1 -0
- package/lib/align/affineTransfrom/getAffineTransform.js +145 -0
- package/lib/align/affineTransfrom/getAffineTransform.js.map +1 -0
- package/lib/align/affineTransfrom/getEuclideanDistance.d.ts +9 -0
- package/lib/align/affineTransfrom/getEuclideanDistance.d.ts.map +1 -0
- package/lib/align/affineTransfrom/getEuclideanDistance.js +10 -0
- package/lib/align/affineTransfrom/getEuclideanDistance.js.map +1 -0
- package/lib/align/affineTransfrom/getMatrixFromPoints.d.ts +10 -0
- package/lib/align/affineTransfrom/getMatrixFromPoints.d.ts.map +1 -0
- package/lib/align/affineTransfrom/getMatrixFromPoints.js +17 -0
- package/lib/align/affineTransfrom/getMatrixFromPoints.js.map +1 -0
- package/lib/align/affineTransfrom/getPointsFromMatrix.d.ts +9 -0
- package/lib/align/affineTransfrom/getPointsFromMatrix.d.ts.map +1 -0
- package/lib/align/affineTransfrom/getPointsFromMatrix.js +13 -0
- package/lib/align/affineTransfrom/getPointsFromMatrix.js.map +1 -0
- package/lib/align/affineTransfrom/utils/getSourceWithoutMargins.d.ts +11 -0
- package/lib/align/affineTransfrom/utils/getSourceWithoutMargins.d.ts.map +1 -0
- package/lib/align/affineTransfrom/utils/getSourceWithoutMargins.js +17 -0
- package/lib/align/affineTransfrom/utils/getSourceWithoutMargins.js.map +1 -0
- package/lib/align/alignMinDifference.d.ts +25 -0
- package/lib/align/alignMinDifference.d.ts.map +1 -0
- package/lib/align/alignMinDifference.js +79 -0
- package/lib/align/alignMinDifference.js.map +1 -0
- package/lib/align/index.d.ts +3 -0
- package/lib/align/index.d.ts.map +1 -0
- package/lib/align/index.js +3 -0
- package/lib/align/index.js.map +1 -0
- package/lib/compare/add.d.ts +10 -0
- package/lib/compare/add.d.ts.map +1 -0
- package/lib/compare/add.js +32 -0
- package/lib/compare/add.js.map +1 -0
- package/lib/compare/computePsnr.d.ts +11 -0
- package/lib/compare/computePsnr.d.ts.map +1 -0
- package/lib/compare/computePsnr.js +14 -0
- package/lib/compare/computePsnr.js.map +1 -0
- package/lib/compare/computeRmse.d.ts +18 -0
- package/lib/compare/computeRmse.d.ts.map +1 -0
- package/lib/compare/computeRmse.js +30 -0
- package/lib/compare/computeRmse.js.map +1 -0
- package/lib/compare/divide.d.ts +22 -0
- package/lib/compare/divide.d.ts.map +1 -0
- package/lib/compare/divide.js +31 -0
- package/lib/compare/divide.js.map +1 -0
- package/lib/compare/index.d.ts +7 -0
- package/lib/compare/index.d.ts.map +1 -0
- package/lib/compare/index.js +7 -0
- package/lib/compare/index.js.map +1 -0
- package/lib/compare/multiply.d.ts +22 -0
- package/lib/compare/multiply.d.ts.map +1 -0
- package/lib/compare/multiply.js +28 -0
- package/lib/compare/multiply.js.map +1 -0
- package/lib/compare/subtract.d.ts +13 -0
- package/lib/compare/subtract.d.ts.map +1 -0
- package/lib/compare/subtract.js +58 -0
- package/lib/compare/subtract.js.map +1 -0
- package/lib/compute/getExtrema.d.ts +33 -0
- package/lib/compute/getExtrema.d.ts.map +1 -0
- package/lib/compute/getExtrema.js +72 -0
- package/lib/compute/getExtrema.js.map +1 -0
- package/lib/compute/histogram.d.ts +22 -14
- package/lib/compute/histogram.d.ts.map +1 -1
- package/lib/compute/histogram.js +29 -23
- package/lib/compute/histogram.js.map +1 -1
- package/lib/compute/index.d.ts +5 -1
- package/lib/compute/index.d.ts.map +1 -1
- package/lib/compute/index.js +5 -6
- package/lib/compute/index.js.map +1 -1
- package/lib/compute/mean.d.ts +17 -0
- package/lib/compute/mean.d.ts.map +1 -0
- package/lib/compute/mean.js +37 -0
- package/lib/compute/mean.js.map +1 -0
- package/lib/compute/median.d.ts +16 -0
- package/lib/compute/median.d.ts.map +1 -0
- package/lib/compute/median.js +37 -0
- package/lib/compute/median.js.map +1 -0
- package/lib/compute/variance.d.ts +17 -0
- package/lib/compute/variance.d.ts.map +1 -0
- package/lib/compute/variance.js +33 -0
- package/lib/compute/variance.js.map +1 -0
- package/lib/correctColor/correctColor.d.ts +22 -0
- package/lib/correctColor/correctColor.d.ts.map +1 -0
- package/lib/correctColor/correctColor.js +75 -0
- package/lib/correctColor/correctColor.js.map +1 -0
- package/lib/correctColor/index.d.ts +2 -0
- package/lib/correctColor/index.d.ts.map +1 -0
- package/lib/correctColor/index.js +2 -0
- package/lib/correctColor/index.js.map +1 -0
- package/lib/correctColor/utils/formatData.d.ts +37 -0
- package/lib/correctColor/utils/formatData.d.ts.map +1 -0
- package/lib/correctColor/utils/formatData.js +60 -0
- package/lib/correctColor/utils/formatData.js.map +1 -0
- package/lib/correctColor/utils/getImageColors.d.ts +9 -0
- package/lib/correctColor/utils/getImageColors.d.ts.map +1 -0
- package/lib/correctColor/utils/getImageColors.js +19 -0
- package/lib/correctColor/utils/getImageColors.js.map +1 -0
- package/lib/correctColor/utils/referenceColorCard.d.ts +42 -0
- package/lib/correctColor/utils/referenceColorCard.d.ts.map +1 -0
- package/lib/correctColor/utils/referenceColorCard.js +146 -0
- package/lib/correctColor/utils/referenceColorCard.js.map +1 -0
- package/lib/draw/drawCircleOnImage.d.ts +28 -0
- package/lib/draw/drawCircleOnImage.d.ts.map +1 -0
- package/lib/draw/drawCircleOnImage.js +75 -0
- package/lib/draw/drawCircleOnImage.js.map +1 -0
- package/lib/draw/drawLineOnImage.d.ts +28 -0
- package/lib/draw/drawLineOnImage.d.ts.map +1 -0
- package/lib/draw/drawLineOnImage.js +27 -0
- package/lib/draw/drawLineOnImage.js.map +1 -0
- package/lib/draw/drawLineOnMask.d.ts +23 -0
- package/lib/draw/drawLineOnMask.d.ts.map +1 -0
- package/lib/draw/drawLineOnMask.js +19 -0
- package/lib/draw/drawLineOnMask.js.map +1 -0
- package/lib/draw/drawMarker.d.ts +36 -0
- package/lib/draw/drawMarker.d.ts.map +1 -0
- package/lib/draw/drawMarker.js +62 -0
- package/lib/draw/drawMarker.js.map +1 -0
- package/lib/draw/drawMarkers.d.ts +12 -0
- package/lib/draw/drawMarkers.d.ts.map +1 -0
- package/lib/draw/drawMarkers.js +17 -0
- package/lib/draw/drawMarkers.js.map +1 -0
- package/lib/draw/drawPoints.d.ts +22 -0
- package/lib/draw/drawPoints.d.ts.map +1 -0
- package/lib/draw/drawPoints.js +32 -0
- package/lib/draw/drawPoints.js.map +1 -0
- package/lib/draw/drawPolygonOnImage.d.ts +24 -0
- package/lib/draw/drawPolygonOnImage.d.ts.map +1 -0
- package/lib/draw/drawPolygonOnImage.js +44 -0
- package/lib/draw/drawPolygonOnImage.js.map +1 -0
- package/lib/draw/drawPolygonOnMask.d.ts +23 -0
- package/lib/draw/drawPolygonOnMask.d.ts.map +1 -0
- package/lib/draw/drawPolygonOnMask.js +35 -0
- package/lib/draw/drawPolygonOnMask.js.map +1 -0
- package/lib/draw/drawPolylineOnImage.d.ts +27 -0
- package/lib/draw/drawPolylineOnImage.d.ts.map +1 -0
- package/lib/draw/drawPolylineOnImage.js +26 -0
- package/lib/draw/drawPolylineOnImage.js.map +1 -0
- package/lib/draw/drawPolylineOnMask.d.ts +22 -0
- package/lib/draw/drawPolylineOnMask.d.ts.map +1 -0
- package/lib/draw/drawPolylineOnMask.js +18 -0
- package/lib/draw/drawPolylineOnMask.js.map +1 -0
- package/lib/draw/drawRectangle.d.ts +37 -0
- package/lib/draw/drawRectangle.d.ts.map +1 -0
- package/lib/draw/drawRectangle.js +50 -0
- package/lib/draw/drawRectangle.js.map +1 -0
- package/lib/draw/index.d.ts +12 -0
- package/lib/draw/index.d.ts.map +1 -0
- package/lib/draw/index.js +12 -0
- package/lib/draw/index.js.map +1 -0
- package/lib/draw/utils/deleteDuplicates.d.ts +8 -0
- package/lib/draw/utils/deleteDuplicates.d.ts.map +1 -0
- package/lib/draw/utils/deleteDuplicates.js +19 -0
- package/lib/draw/utils/deleteDuplicates.js.map +1 -0
- package/lib/draw/utils/roundPoint.d.ts +8 -0
- package/lib/draw/utils/roundPoint.d.ts.map +1 -0
- package/lib/draw/utils/roundPoint.js +12 -0
- package/lib/draw/utils/roundPoint.js.map +1 -0
- package/lib/featureMatching/descriptors/getBrief.d.ts +15 -0
- package/lib/featureMatching/descriptors/getBrief.d.ts.map +1 -0
- package/lib/featureMatching/descriptors/getBrief.js +29 -0
- package/lib/featureMatching/descriptors/getBrief.js.map +1 -0
- package/lib/featureMatching/descriptors/getBriefDescriptors.d.ts +43 -0
- package/lib/featureMatching/descriptors/getBriefDescriptors.d.ts.map +1 -0
- package/lib/featureMatching/descriptors/getBriefDescriptors.js +58 -0
- package/lib/featureMatching/descriptors/getBriefDescriptors.js.map +1 -0
- package/lib/featureMatching/descriptors/utils/getKeypointPatch.d.ts +18 -0
- package/lib/featureMatching/descriptors/utils/getKeypointPatch.d.ts.map +1 -0
- package/lib/featureMatching/descriptors/utils/getKeypointPatch.js +32 -0
- package/lib/featureMatching/descriptors/utils/getKeypointPatch.js.map +1 -0
- package/lib/featureMatching/descriptors/utils/sliceBrief.d.ts +21 -0
- package/lib/featureMatching/descriptors/utils/sliceBrief.d.ts.map +1 -0
- package/lib/featureMatching/descriptors/utils/sliceBrief.js +17 -0
- package/lib/featureMatching/descriptors/utils/sliceBrief.js.map +1 -0
- package/lib/featureMatching/featureMatching.types.d.ts +26 -0
- package/lib/featureMatching/featureMatching.types.d.ts.map +1 -0
- package/lib/featureMatching/featureMatching.types.js +2 -0
- package/lib/featureMatching/featureMatching.types.js.map +1 -0
- package/lib/featureMatching/index.d.ts +13 -0
- package/lib/featureMatching/index.d.ts.map +1 -0
- package/lib/featureMatching/index.js +13 -0
- package/lib/featureMatching/index.js.map +1 -0
- package/lib/featureMatching/keypoints/getBestKeypointsInRadius.d.ts +9 -0
- package/lib/featureMatching/keypoints/getBestKeypointsInRadius.d.ts.map +1 -0
- package/lib/featureMatching/keypoints/getBestKeypointsInRadius.js +30 -0
- package/lib/featureMatching/keypoints/getBestKeypointsInRadius.js.map +1 -0
- package/lib/featureMatching/keypoints/getFastKeypoints.d.ts +53 -0
- package/lib/featureMatching/keypoints/getFastKeypoints.d.ts.map +1 -0
- package/lib/featureMatching/keypoints/getFastKeypoints.js +71 -0
- package/lib/featureMatching/keypoints/getFastKeypoints.js.map +1 -0
- package/lib/featureMatching/keypoints/getFastScore.d.ts +13 -0
- package/lib/featureMatching/keypoints/getFastScore.d.ts.map +1 -0
- package/lib/featureMatching/keypoints/getFastScore.js +25 -0
- package/lib/featureMatching/keypoints/getFastScore.js.map +1 -0
- package/lib/featureMatching/keypoints/getHarrisScore.d.ts +20 -0
- package/lib/featureMatching/keypoints/getHarrisScore.d.ts.map +1 -0
- package/lib/featureMatching/keypoints/getHarrisScore.js +55 -0
- package/lib/featureMatching/keypoints/getHarrisScore.js.map +1 -0
- package/lib/featureMatching/keypoints/getIntensityCentroid.d.ts +11 -0
- package/lib/featureMatching/keypoints/getIntensityCentroid.d.ts.map +1 -0
- package/lib/featureMatching/keypoints/getIntensityCentroid.js +30 -0
- package/lib/featureMatching/keypoints/getIntensityCentroid.js.map +1 -0
- package/lib/featureMatching/keypoints/getIntensityMoment.d.ts +22 -0
- package/lib/featureMatching/keypoints/getIntensityMoment.d.ts.map +1 -0
- package/lib/featureMatching/keypoints/getIntensityMoment.js +27 -0
- package/lib/featureMatching/keypoints/getIntensityMoment.js.map +1 -0
- package/lib/featureMatching/keypoints/getOrientedFastKeypoints.d.ts +26 -0
- package/lib/featureMatching/keypoints/getOrientedFastKeypoints.d.ts.map +1 -0
- package/lib/featureMatching/keypoints/getOrientedFastKeypoints.js +38 -0
- package/lib/featureMatching/keypoints/getOrientedFastKeypoints.js.map +1 -0
- package/lib/featureMatching/keypoints/getPatchIntensityCentroid.d.ts +13 -0
- package/lib/featureMatching/keypoints/getPatchIntensityCentroid.d.ts.map +1 -0
- package/lib/featureMatching/keypoints/getPatchIntensityCentroid.js +31 -0
- package/lib/featureMatching/keypoints/getPatchIntensityCentroid.js.map +1 -0
- package/lib/featureMatching/keypoints/getPatchIntensityMoment.d.ts +27 -0
- package/lib/featureMatching/keypoints/getPatchIntensityMoment.d.ts.map +1 -0
- package/lib/featureMatching/keypoints/getPatchIntensityMoment.js +29 -0
- package/lib/featureMatching/keypoints/getPatchIntensityMoment.js.map +1 -0
- package/lib/featureMatching/keypoints/isFastKeypoint.d.ts +26 -0
- package/lib/featureMatching/keypoints/isFastKeypoint.d.ts.map +1 -0
- package/lib/featureMatching/keypoints/isFastKeypoint.js +74 -0
- package/lib/featureMatching/keypoints/isFastKeypoint.js.map +1 -0
- package/lib/featureMatching/keypoints/utils/getDistanceMatrix.d.ts +9 -0
- package/lib/featureMatching/keypoints/utils/getDistanceMatrix.d.ts.map +1 -0
- package/lib/featureMatching/keypoints/utils/getDistanceMatrix.js +26 -0
- package/lib/featureMatching/keypoints/utils/getDistanceMatrix.js.map +1 -0
- package/lib/featureMatching/keypoints/utils/getKeypointsInRadius.d.ts +10 -0
- package/lib/featureMatching/keypoints/utils/getKeypointsInRadius.d.ts.map +1 -0
- package/lib/featureMatching/keypoints/utils/getKeypointsInRadius.js +26 -0
- package/lib/featureMatching/keypoints/utils/getKeypointsInRadius.js.map +1 -0
- package/lib/featureMatching/matching/bruteForceMatch.d.ts +36 -0
- package/lib/featureMatching/matching/bruteForceMatch.d.ts.map +1 -0
- package/lib/featureMatching/matching/bruteForceMatch.js +33 -0
- package/lib/featureMatching/matching/bruteForceMatch.js.map +1 -0
- package/lib/featureMatching/matching/filterEuclideanDistance.d.ts +21 -0
- package/lib/featureMatching/matching/filterEuclideanDistance.d.ts.map +1 -0
- package/lib/featureMatching/matching/filterEuclideanDistance.js +43 -0
- package/lib/featureMatching/matching/filterEuclideanDistance.js.map +1 -0
- package/lib/featureMatching/matching/filterSmallestDistanceMatches.d.ts +9 -0
- package/lib/featureMatching/matching/filterSmallestDistanceMatches.d.ts.map +1 -0
- package/lib/featureMatching/matching/filterSmallestDistanceMatches.js +25 -0
- package/lib/featureMatching/matching/filterSmallestDistanceMatches.js.map +1 -0
- package/lib/featureMatching/matching/getCrosscheckMatches.d.ts +19 -0
- package/lib/featureMatching/matching/getCrosscheckMatches.d.ts.map +1 -0
- package/lib/featureMatching/matching/getCrosscheckMatches.js +55 -0
- package/lib/featureMatching/matching/getCrosscheckMatches.js.map +1 -0
- package/lib/featureMatching/matching/getHammingDistance.d.ts +10 -0
- package/lib/featureMatching/matching/getHammingDistance.d.ts.map +1 -0
- package/lib/featureMatching/matching/getHammingDistance.js +15 -0
- package/lib/featureMatching/matching/getHammingDistance.js.map +1 -0
- package/lib/featureMatching/utils/checkBorderDistance.d.ts +11 -0
- package/lib/featureMatching/utils/checkBorderDistance.d.ts.map +1 -0
- package/lib/featureMatching/utils/checkBorderDistance.js +14 -0
- package/lib/featureMatching/utils/checkBorderDistance.js.map +1 -0
- package/lib/featureMatching/utils/compareIntensity.d.ts +19 -0
- package/lib/featureMatching/utils/compareIntensity.d.ts.map +1 -0
- package/lib/featureMatching/utils/compareIntensity.js +18 -0
- package/lib/featureMatching/utils/compareIntensity.js.map +1 -0
- package/lib/featureMatching/utils/extractSquareImage.d.ts +11 -0
- package/lib/featureMatching/utils/extractSquareImage.d.ts.map +1 -0
- package/lib/featureMatching/utils/extractSquareImage.js +20 -0
- package/lib/featureMatching/utils/extractSquareImage.js.map +1 -0
- package/lib/featureMatching/utils/getColors.d.ts +11 -0
- package/lib/featureMatching/utils/getColors.d.ts.map +1 -0
- package/lib/featureMatching/utils/getColors.js +25 -0
- package/lib/featureMatching/utils/getColors.js.map +1 -0
- package/lib/featureMatching/utils/getGaussianPoints.d.ts +23 -0
- package/lib/featureMatching/utils/getGaussianPoints.d.ts.map +1 -0
- package/lib/featureMatching/utils/getGaussianPoints.js +46 -0
- package/lib/featureMatching/utils/getGaussianPoints.js.map +1 -0
- package/lib/featureMatching/utils/getKeypointColor.d.ts +11 -0
- package/lib/featureMatching/utils/getKeypointColor.d.ts.map +1 -0
- package/lib/featureMatching/utils/getKeypointColor.js +21 -0
- package/lib/featureMatching/utils/getKeypointColor.js.map +1 -0
- package/lib/featureMatching/utils/getMatchColor.d.ts +11 -0
- package/lib/featureMatching/utils/getMatchColor.d.ts.map +1 -0
- package/lib/featureMatching/utils/getMatchColor.js +20 -0
- package/lib/featureMatching/utils/getMatchColor.js.map +1 -0
- package/lib/featureMatching/utils/sortByDistance.d.ts +8 -0
- package/lib/featureMatching/utils/sortByDistance.d.ts.map +1 -0
- package/lib/featureMatching/utils/sortByDistance.js +11 -0
- package/lib/featureMatching/utils/sortByDistance.js.map +1 -0
- package/lib/featureMatching/utils/sortBySourceDest.d.ts +14 -0
- package/lib/featureMatching/utils/sortBySourceDest.d.ts.map +1 -0
- package/lib/featureMatching/utils/sortBySourceDest.js +29 -0
- package/lib/featureMatching/utils/sortBySourceDest.js.map +1 -0
- package/lib/featureMatching/visualize/Montage.d.ts +84 -0
- package/lib/featureMatching/visualize/Montage.d.ts.map +1 -0
- package/lib/featureMatching/visualize/Montage.js +113 -0
- package/lib/featureMatching/visualize/Montage.js.map +1 -0
- package/lib/featureMatching/visualize/drawKeypoints.d.ts +55 -0
- package/lib/featureMatching/visualize/drawKeypoints.d.ts.map +1 -0
- package/lib/featureMatching/visualize/drawKeypoints.js +58 -0
- package/lib/featureMatching/visualize/drawKeypoints.js.map +1 -0
- package/lib/featureMatching/visualize/drawMatches.d.ts +42 -0
- package/lib/featureMatching/visualize/drawMatches.d.ts.map +1 -0
- package/lib/featureMatching/visualize/drawMatches.js +52 -0
- package/lib/featureMatching/visualize/drawMatches.js.map +1 -0
- package/lib/featureMatching/visualize/overlapImages.d.ts +30 -0
- package/lib/featureMatching/visualize/overlapImages.d.ts.map +1 -0
- package/lib/featureMatching/visualize/overlapImages.js +35 -0
- package/lib/featureMatching/visualize/overlapImages.js.map +1 -0
- package/lib/featureMatching/visualize/scaleKeypoints.d.ts +9 -0
- package/lib/featureMatching/visualize/scaleKeypoints.d.ts.map +1 -0
- package/lib/featureMatching/visualize/scaleKeypoints.js +20 -0
- package/lib/featureMatching/visualize/scaleKeypoints.js.map +1 -0
- package/lib/filters/and.d.ts +16 -0
- package/lib/filters/and.d.ts.map +1 -0
- package/lib/filters/and.js +24 -0
- package/lib/filters/and.js.map +1 -0
- package/lib/filters/blur.d.ts +33 -10
- package/lib/filters/blur.d.ts.map +1 -1
- package/lib/filters/blur.js +22 -13
- package/lib/filters/blur.js.map +1 -1
- package/lib/filters/convolution.d.ts +71 -10
- package/lib/filters/convolution.d.ts.map +1 -1
- package/lib/filters/convolution.js +160 -128
- package/lib/filters/convolution.js.map +1 -1
- package/lib/filters/derivativeFilter.d.ts +38 -0
- package/lib/filters/derivativeFilter.d.ts.map +1 -0
- package/lib/filters/derivativeFilter.js +26 -0
- package/lib/filters/derivativeFilter.js.map +1 -0
- package/lib/filters/flip.d.ts +20 -0
- package/lib/filters/flip.d.ts.map +1 -0
- package/lib/filters/flip.js +23 -0
- package/lib/filters/flip.js.map +1 -0
- package/lib/filters/flipX.d.ts +8 -0
- package/lib/filters/flipX.d.ts.map +1 -0
- package/lib/filters/flipX.js +24 -0
- package/lib/filters/flipX.js.map +1 -0
- package/lib/filters/flipY.d.ts +8 -0
- package/lib/filters/flipY.d.ts.map +1 -0
- package/lib/filters/flipY.js +24 -0
- package/lib/filters/flipY.js.map +1 -0
- package/lib/filters/gaussianBlur.d.ts +53 -17
- package/lib/filters/gaussianBlur.d.ts.map +1 -1
- package/lib/filters/gaussianBlur.js +52 -47
- package/lib/filters/gaussianBlur.js.map +1 -1
- package/lib/filters/gradientFilter.d.ts +51 -0
- package/lib/filters/gradientFilter.d.ts.map +1 -0
- package/lib/filters/gradientFilter.js +49 -0
- package/lib/filters/gradientFilter.js.map +1 -0
- package/lib/filters/hypotenuse.d.ts +16 -0
- package/lib/filters/hypotenuse.d.ts.map +1 -0
- package/lib/filters/hypotenuse.js +36 -0
- package/lib/filters/hypotenuse.js.map +1 -0
- package/lib/filters/increaseContrast.d.ts +21 -0
- package/lib/filters/increaseContrast.d.ts.map +1 -0
- package/lib/filters/increaseContrast.js +49 -0
- package/lib/filters/increaseContrast.js.map +1 -0
- package/lib/filters/index.d.ts +14 -4
- package/lib/filters/index.d.ts.map +1 -1
- package/lib/filters/index.js +14 -9
- package/lib/filters/index.js.map +1 -1
- package/lib/filters/invert.d.ts +10 -9
- package/lib/filters/invert.d.ts.map +1 -1
- package/lib/filters/invert.js +31 -16
- package/lib/filters/invert.js.map +1 -1
- package/lib/filters/level.d.ts +46 -0
- package/lib/filters/level.d.ts.map +1 -0
- package/lib/filters/level.js +63 -0
- package/lib/filters/level.js.map +1 -0
- package/lib/filters/medianFilter.d.ts +26 -0
- package/lib/filters/medianFilter.d.ts.map +1 -0
- package/lib/filters/medianFilter.js +42 -0
- package/lib/filters/medianFilter.js.map +1 -0
- package/lib/filters/or.d.ts +16 -0
- package/lib/filters/or.d.ts.map +1 -0
- package/lib/filters/or.js +24 -0
- package/lib/filters/or.js.map +1 -0
- package/lib/filters/pixelate.d.ts +24 -0
- package/lib/filters/pixelate.d.ts.map +1 -0
- package/lib/filters/pixelate.js +105 -0
- package/lib/filters/pixelate.js.map +1 -0
- package/lib/geometry/getPerspectiveWarp.d.ts +37 -0
- package/lib/geometry/getPerspectiveWarp.d.ts.map +1 -0
- package/lib/geometry/getPerspectiveWarp.js +131 -0
- package/lib/geometry/getPerspectiveWarp.js.map +1 -0
- package/lib/geometry/index.d.ts +6 -3
- package/lib/geometry/index.d.ts.map +1 -1
- package/lib/geometry/index.js +5 -8
- package/lib/geometry/index.js.map +1 -1
- package/lib/geometry/resize.d.ts +48 -13
- package/lib/geometry/resize.d.ts.map +1 -1
- package/lib/geometry/resize.js +86 -90
- package/lib/geometry/resize.js.map +1 -1
- package/lib/geometry/rotate.d.ts +9 -13
- package/lib/geometry/rotate.d.ts.map +1 -1
- package/lib/geometry/rotate.js +46 -26
- package/lib/geometry/rotate.js.map +1 -1
- package/lib/geometry/transform.d.ts +45 -12
- package/lib/geometry/transform.d.ts.map +1 -1
- package/lib/geometry/transform.js +102 -84
- package/lib/geometry/transform.js.map +1 -1
- package/lib/geometry/transformRotate.d.ts +24 -0
- package/lib/geometry/transformRotate.d.ts.map +1 -0
- package/lib/geometry/transformRotate.js +38 -0
- package/lib/geometry/transformRotate.js.map +1 -0
- package/lib/index.d.ts +24 -8
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +24 -13
- package/lib/index.js.map +1 -1
- package/lib/load/decode.d.ts +8 -7
- package/lib/load/decode.d.ts.map +1 -1
- package/lib/load/decode.js +22 -28
- package/lib/load/decode.js.map +1 -1
- package/lib/load/decodeJpeg.d.ts +7 -6
- package/lib/load/decodeJpeg.d.ts.map +1 -1
- package/lib/load/decodeJpeg.js +26 -16
- package/lib/load/decodeJpeg.js.map +1 -1
- package/lib/load/decodePng.d.ts +7 -6
- package/lib/load/decodePng.d.ts.map +1 -1
- package/lib/load/decodePng.js +67 -67
- package/lib/load/decodePng.js.map +1 -1
- package/lib/load/decodeTiff.d.ts +17 -0
- package/lib/load/decodeTiff.d.ts.map +1 -0
- package/lib/load/decodeTiff.js +57 -0
- package/lib/load/decodeTiff.js.map +1 -0
- package/lib/load/fetchURL.d.ts +7 -0
- package/lib/load/fetchURL.d.ts.map +1 -0
- package/lib/load/fetchURL.js +13 -0
- package/lib/load/fetchURL.js.map +1 -0
- package/lib/load/getMetadata.d.ts +16 -0
- package/lib/load/getMetadata.d.ts.map +1 -0
- package/lib/load/getMetadata.js +15 -0
- package/lib/load/getMetadata.js.map +1 -0
- package/lib/load/index.d.ts +9 -6
- package/lib/load/index.d.ts.map +1 -1
- package/lib/load/index.js +9 -11
- package/lib/load/index.js.map +1 -1
- package/lib/load/load.types.d.ts +8 -0
- package/lib/load/load.types.d.ts.map +1 -0
- package/lib/load/load.types.js +2 -0
- package/lib/load/load.types.js.map +1 -0
- package/lib/load/read.d.ts +16 -11
- package/lib/load/read.d.ts.map +1 -1
- package/lib/load/read.js +24 -23
- package/lib/load/read.js.map +1 -1
- package/lib/load/readCanvas.d.ts +7 -2
- package/lib/load/readCanvas.d.ts.map +1 -1
- package/lib/load/readCanvas.js +16 -17
- package/lib/load/readCanvas.js.map +1 -1
- package/lib/load/readImg.d.ts +7 -2
- package/lib/load/readImg.d.ts.map +1 -1
- package/lib/load/readImg.js +17 -16
- package/lib/load/readImg.js.map +1 -1
- package/lib/maskAnalysis/getBorderPoints.d.ts +12 -0
- package/lib/maskAnalysis/getBorderPoints.d.ts.map +1 -0
- package/lib/maskAnalysis/getBorderPoints.js +53 -0
- package/lib/maskAnalysis/getBorderPoints.js.map +1 -0
- package/lib/maskAnalysis/getConvexHull.d.ts +9 -0
- package/lib/maskAnalysis/getConvexHull.d.ts.map +1 -0
- package/lib/maskAnalysis/getConvexHull.js +23 -0
- package/lib/maskAnalysis/getConvexHull.js.map +1 -0
- package/lib/maskAnalysis/getFeret.d.ts +11 -0
- package/lib/maskAnalysis/getFeret.d.ts.map +1 -0
- package/lib/maskAnalysis/getFeret.js +181 -0
- package/lib/maskAnalysis/getFeret.js.map +1 -0
- package/lib/maskAnalysis/getMbr.d.ts +9 -0
- package/lib/maskAnalysis/getMbr.d.ts.map +1 -0
- package/lib/maskAnalysis/getMbr.js +13 -0
- package/lib/maskAnalysis/getMbr.js.map +1 -0
- package/lib/maskAnalysis/index.d.ts +2 -0
- package/lib/maskAnalysis/index.d.ts.map +1 -0
- package/lib/maskAnalysis/index.js +2 -0
- package/lib/maskAnalysis/index.js.map +1 -0
- package/lib/maskAnalysis/maskAnalysis.types.d.ts +97 -0
- package/lib/maskAnalysis/maskAnalysis.types.d.ts.map +1 -0
- package/lib/maskAnalysis/maskAnalysis.types.js +2 -0
- package/lib/maskAnalysis/maskAnalysis.types.js.map +1 -0
- package/lib/maskAnalysis/utils/getAngle.d.ts +19 -0
- package/lib/maskAnalysis/utils/getAngle.d.ts.map +1 -0
- package/lib/maskAnalysis/utils/getAngle.js +41 -0
- package/lib/maskAnalysis/utils/getAngle.js.map +1 -0
- package/lib/maskAnalysis/utils/getExtendedBorderPoints.d.ts +12 -0
- package/lib/maskAnalysis/utils/getExtendedBorderPoints.d.ts.map +1 -0
- package/lib/maskAnalysis/utils/getExtendedBorderPoints.js +20 -0
- package/lib/maskAnalysis/utils/getExtendedBorderPoints.js.map +1 -0
- package/lib/maskAnalysis/utils/getMbrAngle.d.ts +8 -0
- package/lib/maskAnalysis/utils/getMbrAngle.d.ts.map +1 -0
- package/lib/maskAnalysis/utils/getMbrAngle.js +20 -0
- package/lib/maskAnalysis/utils/getMbrAngle.js.map +1 -0
- package/lib/maskAnalysis/utils/getMbrFromPoints.d.ts +10 -0
- package/lib/maskAnalysis/utils/getMbrFromPoints.d.ts.map +1 -0
- package/lib/maskAnalysis/utils/getMbrFromPoints.js +102 -0
- package/lib/maskAnalysis/utils/getMbrFromPoints.js.map +1 -0
- package/lib/maskAnalysis/utils/monotoneChainConvexHull.d.ts +18 -0
- package/lib/maskAnalysis/utils/monotoneChainConvexHull.d.ts.map +1 -0
- package/lib/maskAnalysis/utils/monotoneChainConvexHull.js +44 -0
- package/lib/maskAnalysis/utils/monotoneChainConvexHull.js.map +1 -0
- package/lib/morphology/bottomHat.d.ts +18 -0
- package/lib/morphology/bottomHat.d.ts.map +1 -0
- package/lib/morphology/bottomHat.js +38 -0
- package/lib/morphology/bottomHat.js.map +1 -0
- package/lib/morphology/cannyEdgeDetector.d.ts +44 -0
- package/lib/morphology/cannyEdgeDetector.d.ts.map +1 -0
- package/lib/morphology/cannyEdgeDetector.js +146 -0
- package/lib/morphology/cannyEdgeDetector.js.map +1 -0
- package/lib/morphology/clearBorder.d.ts +26 -0
- package/lib/morphology/clearBorder.d.ts.map +1 -0
- package/lib/morphology/clearBorder.js +19 -0
- package/lib/morphology/clearBorder.js.map +1 -0
- package/lib/morphology/close.d.ts +18 -0
- package/lib/morphology/close.d.ts.map +1 -0
- package/lib/morphology/close.js +33 -0
- package/lib/morphology/close.js.map +1 -0
- package/lib/morphology/dilate.d.ts +18 -0
- package/lib/morphology/dilate.d.ts.map +1 -0
- package/lib/morphology/dilate.js +191 -0
- package/lib/morphology/dilate.js.map +1 -0
- package/lib/morphology/erode.d.ts +18 -0
- package/lib/morphology/erode.d.ts.map +1 -0
- package/lib/morphology/erode.js +191 -0
- package/lib/morphology/erode.js.map +1 -0
- package/lib/morphology/floodFill.d.ts +26 -0
- package/lib/morphology/floodFill.d.ts.map +1 -0
- package/lib/morphology/floodFill.js +18 -0
- package/lib/morphology/floodFill.js.map +1 -0
- package/lib/morphology/index.d.ts +12 -0
- package/lib/morphology/index.d.ts.map +1 -0
- package/lib/morphology/index.js +12 -0
- package/lib/morphology/index.js.map +1 -0
- package/lib/morphology/morphologicalGradient.d.ts +18 -0
- package/lib/morphology/morphologicalGradient.d.ts.map +1 -0
- package/lib/morphology/morphologicalGradient.js +34 -0
- package/lib/morphology/morphologicalGradient.js.map +1 -0
- package/lib/morphology/multipleFloodFill.d.ts +36 -0
- package/lib/morphology/multipleFloodFill.d.ts.map +1 -0
- package/lib/morphology/multipleFloodFill.js +87 -0
- package/lib/morphology/multipleFloodFill.js.map +1 -0
- package/lib/morphology/open.d.ts +18 -0
- package/lib/morphology/open.d.ts.map +1 -0
- package/lib/morphology/open.js +35 -0
- package/lib/morphology/open.js.map +1 -0
- package/lib/morphology/solidFill.d.ts +20 -0
- package/lib/morphology/solidFill.d.ts.map +1 -0
- package/lib/morphology/solidFill.js +15 -0
- package/lib/morphology/solidFill.js.map +1 -0
- package/lib/morphology/topHat.d.ts +18 -0
- package/lib/morphology/topHat.d.ts.map +1 -0
- package/lib/morphology/topHat.js +36 -0
- package/lib/morphology/topHat.js.map +1 -0
- package/lib/operations/convertBitDepth.d.ts +16 -0
- package/lib/operations/convertBitDepth.d.ts.map +1 -0
- package/lib/operations/convertBitDepth.js +56 -0
- package/lib/operations/convertBitDepth.js.map +1 -0
- package/lib/operations/convertColor.d.ts +35 -5
- package/lib/operations/convertColor.d.ts.map +1 -1
- package/lib/operations/convertColor.js +143 -75
- package/lib/operations/convertColor.js.map +1 -1
- package/lib/operations/copyTo.d.ts +17 -0
- package/lib/operations/copyTo.d.ts.map +1 -0
- package/lib/operations/copyTo.js +36 -0
- package/lib/operations/copyTo.js.map +1 -0
- package/lib/operations/correctBackground.d.ts +27 -0
- package/lib/operations/correctBackground.d.ts.map +1 -0
- package/lib/operations/correctBackground.js +44 -0
- package/lib/operations/correctBackground.js.map +1 -0
- package/lib/operations/crop.d.ts +32 -0
- package/lib/operations/crop.d.ts.map +1 -0
- package/lib/operations/crop.js +48 -0
- package/lib/operations/crop.js.map +1 -0
- package/lib/operations/cropAlpha.d.ts +11 -0
- package/lib/operations/cropAlpha.d.ts.map +1 -0
- package/lib/operations/cropAlpha.js +70 -0
- package/lib/operations/cropAlpha.js.map +1 -0
- package/lib/operations/cropRectangle.d.ts +14 -0
- package/lib/operations/cropRectangle.d.ts.map +1 -0
- package/lib/operations/cropRectangle.js +75 -0
- package/lib/operations/cropRectangle.js.map +1 -0
- package/lib/operations/extendBorders.d.ts +30 -0
- package/lib/operations/extendBorders.d.ts.map +1 -0
- package/lib/operations/extendBorders.js +61 -0
- package/lib/operations/extendBorders.js.map +1 -0
- package/lib/operations/extract.d.ts +19 -0
- package/lib/operations/extract.d.ts.map +1 -0
- package/lib/operations/extract.js +41 -0
- package/lib/operations/extract.js.map +1 -0
- package/lib/operations/getMaskFromCannyEdge.d.ts +11 -0
- package/lib/operations/getMaskFromCannyEdge.d.ts.map +1 -0
- package/lib/operations/getMaskFromCannyEdge.js +35 -0
- package/lib/operations/getMaskFromCannyEdge.js.map +1 -0
- package/lib/operations/grey.d.ts +62 -0
- package/lib/operations/grey.d.ts.map +1 -0
- package/lib/operations/grey.js +84 -0
- package/lib/operations/grey.js.map +1 -0
- package/lib/operations/greyAlgorithms.d.ts +133 -0
- package/lib/operations/greyAlgorithms.d.ts.map +1 -0
- package/lib/operations/greyAlgorithms.js +205 -0
- package/lib/operations/greyAlgorithms.js.map +1 -0
- package/lib/operations/index.d.ts +16 -5
- package/lib/operations/index.d.ts.map +1 -1
- package/lib/operations/index.js +16 -10
- package/lib/operations/index.js.map +1 -1
- package/lib/operations/merge.d.ts +7 -6
- package/lib/operations/merge.d.ts.map +1 -1
- package/lib/operations/merge.js +50 -47
- package/lib/operations/merge.js.map +1 -1
- package/lib/operations/operations.types.d.ts +7 -0
- package/lib/operations/operations.types.d.ts.map +1 -0
- package/lib/operations/operations.types.js +2 -0
- package/lib/operations/operations.types.js.map +1 -0
- package/lib/operations/paintMaskOnImage.d.ts +33 -0
- package/lib/operations/paintMaskOnImage.d.ts.map +1 -0
- package/lib/operations/paintMaskOnImage.js +53 -0
- package/lib/operations/paintMaskOnImage.js.map +1 -0
- package/lib/operations/paintMaskOnMask.d.ts +27 -0
- package/lib/operations/paintMaskOnMask.d.ts.map +1 -0
- package/lib/operations/paintMaskOnMask.js +24 -0
- package/lib/operations/paintMaskOnMask.js.map +1 -0
- package/lib/operations/split.d.ts +7 -2
- package/lib/operations/split.d.ts.map +1 -1
- package/lib/operations/split.js +19 -15
- package/lib/operations/split.js.map +1 -1
- package/lib/operations/threshold.d.ts +60 -18
- package/lib/operations/threshold.d.ts.map +1 -1
- package/lib/operations/threshold.js +90 -58
- package/lib/operations/threshold.js.map +1 -1
- package/lib/operations/thresholds/huang.d.ts +7 -0
- package/lib/operations/thresholds/huang.d.ts.map +1 -0
- package/lib/operations/thresholds/huang.js +78 -0
- package/lib/operations/thresholds/huang.js.map +1 -0
- package/lib/operations/thresholds/intermodes.d.ts +7 -0
- package/lib/operations/thresholds/intermodes.d.ts.map +1 -0
- package/lib/operations/thresholds/intermodes.js +57 -0
- package/lib/operations/thresholds/intermodes.js.map +1 -0
- package/lib/operations/thresholds/isodata.d.ts +7 -0
- package/lib/operations/thresholds/isodata.d.ts.map +1 -0
- package/lib/operations/thresholds/isodata.js +50 -0
- package/lib/operations/thresholds/isodata.js.map +1 -0
- package/lib/operations/thresholds/li.d.ts +8 -0
- package/lib/operations/thresholds/li.d.ts.map +1 -0
- package/lib/operations/thresholds/li.js +73 -0
- package/lib/operations/thresholds/li.js.map +1 -0
- package/lib/operations/thresholds/maxEntropy.d.ts +8 -0
- package/lib/operations/thresholds/maxEntropy.d.ts.map +1 -0
- package/lib/operations/thresholds/maxEntropy.js +76 -0
- package/lib/operations/thresholds/maxEntropy.js.map +1 -0
- package/lib/operations/thresholds/mean.d.ts +8 -0
- package/lib/operations/thresholds/mean.d.ts.map +1 -0
- package/lib/operations/thresholds/mean.js +22 -0
- package/lib/operations/thresholds/mean.js.map +1 -0
- package/lib/operations/thresholds/minError.d.ts +8 -0
- package/lib/operations/thresholds/minError.d.ts.map +1 -0
- package/lib/operations/thresholds/minError.js +86 -0
- package/lib/operations/thresholds/minError.js.map +1 -0
- package/lib/operations/thresholds/minimum.d.ts +7 -0
- package/lib/operations/thresholds/minimum.d.ts.map +1 -0
- package/lib/operations/thresholds/minimum.js +74 -0
- package/lib/operations/thresholds/minimum.js.map +1 -0
- package/lib/operations/thresholds/moments.d.ts +8 -0
- package/lib/operations/thresholds/moments.d.ts.map +1 -0
- package/lib/operations/thresholds/moments.js +58 -0
- package/lib/operations/thresholds/moments.js.map +1 -0
- package/lib/operations/thresholds/otsu.d.ts +7 -1
- package/lib/operations/thresholds/otsu.d.ts.map +1 -1
- package/lib/operations/thresholds/otsu.js +37 -34
- package/lib/operations/thresholds/otsu.js.map +1 -1
- package/lib/operations/thresholds/percentile.d.ts +7 -0
- package/lib/operations/thresholds/percentile.d.ts.map +1 -0
- package/lib/operations/thresholds/percentile.js +35 -0
- package/lib/operations/thresholds/percentile.js.map +1 -0
- package/lib/operations/thresholds/renyiEntropy.d.ts +8 -0
- package/lib/operations/thresholds/renyiEntropy.d.ts.map +1 -0
- package/lib/operations/thresholds/renyiEntropy.js +127 -0
- package/lib/operations/thresholds/renyiEntropy.js.map +1 -0
- package/lib/operations/thresholds/shanbhag.d.ts +8 -0
- package/lib/operations/thresholds/shanbhag.d.ts.map +1 -0
- package/lib/operations/thresholds/shanbhag.js +72 -0
- package/lib/operations/thresholds/shanbhag.js.map +1 -0
- package/lib/operations/thresholds/triangle.d.ts +6 -1
- package/lib/operations/thresholds/triangle.d.ts.map +1 -1
- package/lib/operations/thresholds/triangle.js +107 -105
- package/lib/operations/thresholds/triangle.js.map +1 -1
- package/lib/operations/thresholds/yen.d.ts +8 -0
- package/lib/operations/thresholds/yen.d.ts.map +1 -0
- package/lib/operations/thresholds/yen.js +55 -0
- package/lib/operations/thresholds/yen.js.map +1 -0
- package/lib/point/operations.d.ts +10 -0
- package/lib/point/operations.d.ts.map +1 -0
- package/lib/point/operations.js +21 -0
- package/lib/point/operations.js.map +1 -0
- package/lib/roi/Roi.d.ts +218 -0
- package/lib/roi/Roi.d.ts.map +1 -0
- package/lib/roi/Roi.js +553 -0
- package/lib/roi/Roi.js.map +1 -0
- package/lib/roi/RoiMapManager.d.ts +59 -0
- package/lib/roi/RoiMapManager.d.ts.map +1 -0
- package/lib/roi/RoiMapManager.js +51 -0
- package/lib/roi/RoiMapManager.js.map +1 -0
- package/lib/roi/colorRois.d.ts +38 -0
- package/lib/roi/colorRois.d.ts.map +1 -0
- package/lib/roi/colorRois.js +41 -0
- package/lib/roi/colorRois.js.map +1 -0
- package/lib/roi/computeRois.d.ts +7 -0
- package/lib/roi/computeRois.d.ts.map +1 -0
- package/lib/roi/computeRois.js +81 -0
- package/lib/roi/computeRois.js.map +1 -0
- package/lib/roi/fromMask.d.ts +17 -0
- package/lib/roi/fromMask.d.ts.map +1 -0
- package/lib/roi/fromMask.js +139 -0
- package/lib/roi/fromMask.js.map +1 -0
- package/lib/roi/getBorderPoints.d.ts +12 -0
- package/lib/roi/getBorderPoints.d.ts.map +1 -0
- package/lib/roi/getBorderPoints.js +12 -0
- package/lib/roi/getBorderPoints.js.map +1 -0
- package/lib/roi/getMask.d.ts +17 -0
- package/lib/roi/getMask.d.ts.map +1 -0
- package/lib/roi/getMask.js +27 -0
- package/lib/roi/getMask.js.map +1 -0
- package/lib/roi/getRois.d.ts +33 -0
- package/lib/roi/getRois.d.ts.map +1 -0
- package/lib/roi/getRois.js +27 -0
- package/lib/roi/getRois.js.map +1 -0
- package/lib/roi/index.d.ts +11 -0
- package/lib/roi/index.d.ts.map +1 -0
- package/lib/roi/index.js +11 -0
- package/lib/roi/index.js.map +1 -0
- package/lib/roi/properties/getEllipse.d.ts +9 -0
- package/lib/roi/properties/getEllipse.d.ts.map +1 -0
- package/lib/roi/properties/getEllipse.js +96 -0
- package/lib/roi/properties/getEllipse.js.map +1 -0
- package/lib/roi/roi.types.d.ts +29 -0
- package/lib/roi/roi.types.d.ts.map +1 -0
- package/lib/roi/roi.types.js +2 -0
- package/lib/roi/roi.types.js.map +1 -0
- package/lib/roi/utils/colorMaps/getBinaryMap.d.ts +33 -0
- package/lib/roi/utils/colorMaps/getBinaryMap.d.ts.map +1 -0
- package/lib/roi/utils/colorMaps/getBinaryMap.js +27 -0
- package/lib/roi/utils/colorMaps/getBinaryMap.js.map +1 -0
- package/lib/roi/utils/colorMaps/getRainbowMap.d.ts +23 -0
- package/lib/roi/utils/colorMaps/getRainbowMap.d.ts.map +1 -0
- package/lib/roi/utils/colorMaps/getRainbowMap.js +37 -0
- package/lib/roi/utils/colorMaps/getRainbowMap.js.map +1 -0
- package/lib/roi/utils/colorMaps/getSaturationMap.d.ts +33 -0
- package/lib/roi/utils/colorMaps/getSaturationMap.d.ts.map +1 -0
- package/lib/roi/utils/colorMaps/getSaturationMap.js +32 -0
- package/lib/roi/utils/colorMaps/getSaturationMap.js.map +1 -0
- package/lib/roi/utils/getColorMap.d.ts +29 -0
- package/lib/roi/utils/getColorMap.d.ts.map +1 -0
- package/lib/roi/utils/getColorMap.js +19 -0
- package/lib/roi/utils/getColorMap.js.map +1 -0
- package/lib/roi/utils/hsvToRgb.d.ts +20 -0
- package/lib/roi/utils/hsvToRgb.d.ts.map +1 -0
- package/lib/roi/utils/hsvToRgb.js +53 -0
- package/lib/roi/utils/hsvToRgb.js.map +1 -0
- package/lib/roi/utils/rgbToNumber.d.ts +7 -0
- package/lib/roi/utils/rgbToNumber.d.ts.map +1 -0
- package/lib/roi/utils/rgbToNumber.js +9 -0
- package/lib/roi/utils/rgbToNumber.js.map +1 -0
- package/lib/roi/waterShed.d.ts +36 -0
- package/lib/roi/waterShed.d.ts.map +1 -0
- package/lib/roi/waterShed.js +91 -0
- package/lib/roi/waterShed.js.map +1 -0
- package/lib/save/encode.d.ts +30 -34
- package/lib/save/encode.d.ts.map +1 -1
- package/lib/save/encode.js +24 -24
- package/lib/save/encode.js.map +1 -1
- package/lib/save/encodeBmp.d.ts +9 -0
- package/lib/save/encodeBmp.d.ts.map +1 -0
- package/lib/save/encodeBmp.js +22 -0
- package/lib/save/encodeBmp.js.map +1 -0
- package/lib/save/encodeDataURL.d.ts +10 -0
- package/lib/save/encodeDataURL.d.ts.map +1 -0
- package/lib/save/encodeDataURL.js +15 -0
- package/lib/save/encodeDataURL.js.map +1 -0
- package/lib/save/encodeJpeg.d.ts +16 -5
- package/lib/save/encodeJpeg.d.ts.map +1 -1
- package/lib/save/encodeJpeg.js +20 -18
- package/lib/save/encodeJpeg.js.map +1 -1
- package/lib/save/encodePng.d.ts +11 -4
- package/lib/save/encodePng.d.ts.map +1 -1
- package/lib/save/encodePng.js +22 -7
- package/lib/save/encodePng.js.map +1 -1
- package/lib/save/index.d.ts +6 -5
- package/lib/save/index.d.ts.map +1 -1
- package/lib/save/index.js +6 -10
- package/lib/save/index.js.map +1 -1
- package/lib/save/write.d.ts +61 -22
- package/lib/save/write.d.ts.map +1 -1
- package/lib/save/write.js +72 -49
- package/lib/save/write.js.map +1 -1
- package/lib/save/writeCanvas.d.ts +40 -14
- package/lib/save/writeCanvas.d.ts.map +1 -1
- package/lib/save/writeCanvas.js +28 -21
- package/lib/save/writeCanvas.js.map +1 -1
- package/lib/ssim/compute_dssim.d.ts +12 -0
- package/lib/ssim/compute_dssim.d.ts.map +1 -0
- package/lib/ssim/compute_dssim.js +14 -0
- package/lib/ssim/compute_dssim.js.map +1 -0
- package/lib/ssim/compute_ssim.d.ts +42 -0
- package/lib/ssim/compute_ssim.d.ts.map +1 -0
- package/lib/ssim/compute_ssim.js +56 -0
- package/lib/ssim/compute_ssim.js.map +1 -0
- package/lib/ssim/index.d.ts +3 -0
- package/lib/ssim/index.d.ts.map +1 -0
- package/lib/ssim/index.js +3 -0
- package/lib/ssim/index.js.map +1 -0
- package/lib/stack/compute/histogram.d.ts +10 -0
- package/lib/stack/compute/histogram.d.ts.map +1 -0
- package/lib/stack/compute/histogram.js +21 -0
- package/lib/stack/compute/histogram.js.map +1 -0
- package/lib/stack/compute/maxImage.d.ts +9 -0
- package/lib/stack/compute/maxImage.d.ts.map +1 -0
- package/lib/stack/compute/maxImage.js +21 -0
- package/lib/stack/compute/maxImage.js.map +1 -0
- package/lib/stack/compute/meanImage.d.ts +9 -0
- package/lib/stack/compute/meanImage.d.ts.map +1 -0
- package/lib/stack/compute/meanImage.js +29 -0
- package/lib/stack/compute/meanImage.js.map +1 -0
- package/lib/stack/compute/medianImage.d.ts +9 -0
- package/lib/stack/compute/medianImage.d.ts.map +1 -0
- package/lib/stack/compute/medianImage.js +25 -0
- package/lib/stack/compute/medianImage.js.map +1 -0
- package/lib/stack/compute/minImage.d.ts +9 -0
- package/lib/stack/compute/minImage.d.ts.map +1 -0
- package/lib/stack/compute/minImage.js +22 -0
- package/lib/stack/compute/minImage.js.map +1 -0
- package/lib/stack/compute/sum.d.ts +9 -0
- package/lib/stack/compute/sum.d.ts.map +1 -0
- package/lib/stack/compute/sum.js +30 -0
- package/lib/stack/compute/sum.js.map +1 -0
- package/lib/stack/index.d.ts +8 -0
- package/lib/stack/index.d.ts.map +1 -0
- package/lib/stack/index.js +8 -0
- package/lib/stack/index.js.map +1 -0
- package/lib/stack/load/decodeStack.d.ts +9 -0
- package/lib/stack/load/decodeStack.d.ts.map +1 -0
- package/lib/stack/load/decodeStack.js +19 -0
- package/lib/stack/load/decodeStack.js.map +1 -0
- package/lib/stack/load/decodeTiff.d.ts +8 -0
- package/lib/stack/load/decodeTiff.d.ts.map +1 -0
- package/lib/stack/load/decodeTiff.js +17 -0
- package/lib/stack/load/decodeTiff.js.map +1 -0
- package/lib/stack/utils/checkImagesValid.d.ts +13 -0
- package/lib/stack/utils/checkImagesValid.d.ts.map +1 -0
- package/lib/stack/utils/checkImagesValid.js +29 -0
- package/lib/stack/utils/checkImagesValid.js.map +1 -0
- package/lib/stack/utils/checkProcessable.d.ts +24 -0
- package/lib/stack/utils/checkProcessable.d.ts.map +1 -0
- package/lib/stack/utils/checkProcessable.js +32 -0
- package/lib/stack/utils/checkProcessable.js.map +1 -0
- package/lib/stack/utils/getStackFromFolder.d.ts +8 -0
- package/lib/stack/utils/getStackFromFolder.d.ts.map +1 -0
- package/lib/stack/utils/getStackFromFolder.js +16 -0
- package/lib/stack/utils/getStackFromFolder.js.map +1 -0
- package/lib/utils/arrayPointsToObjects.d.ts +8 -0
- package/lib/utils/arrayPointsToObjects.d.ts.map +1 -0
- package/lib/utils/arrayPointsToObjects.js +13 -0
- package/lib/utils/arrayPointsToObjects.js.map +1 -0
- package/lib/utils/boolToNumber.d.ts +8 -0
- package/lib/utils/boolToNumber.d.ts.map +1 -0
- package/lib/utils/boolToNumber.js +16 -0
- package/lib/utils/boolToNumber.js.map +1 -0
- package/lib/utils/borderIterator.d.ts +9 -0
- package/lib/utils/borderIterator.d.ts.map +1 -0
- package/lib/utils/borderIterator.js +20 -0
- package/lib/utils/borderIterator.js.map +1 -0
- package/lib/utils/clamp.d.ts +15 -3
- package/lib/utils/clamp.d.ts.map +1 -1
- package/lib/utils/clamp.js +42 -18
- package/lib/utils/clamp.js.map +1 -1
- package/lib/utils/constants/channelLabels.d.ts +8 -0
- package/lib/utils/constants/channelLabels.d.ts.map +1 -0
- package/lib/utils/constants/channelLabels.js +8 -0
- package/lib/utils/constants/channelLabels.js.map +1 -0
- package/lib/utils/constants/colorModels.d.ts +14 -0
- package/lib/utils/constants/colorModels.d.ts.map +1 -0
- package/lib/utils/constants/colorModels.js +35 -0
- package/lib/utils/constants/colorModels.js.map +1 -0
- package/lib/utils/constants/kernels.d.ts +13 -0
- package/lib/utils/constants/kernels.d.ts.map +1 -0
- package/lib/utils/constants/kernels.js +63 -0
- package/lib/utils/constants/kernels.js.map +1 -0
- package/lib/utils/constants/kinds.d.ts +7 -0
- package/lib/utils/constants/kinds.d.ts.map +1 -0
- package/lib/utils/constants/kinds.js +19 -0
- package/lib/utils/constants/kinds.js.map +1 -0
- package/lib/utils/copyData.d.ts +5 -0
- package/lib/utils/copyData.d.ts.map +1 -0
- package/lib/utils/copyData.js +15 -0
- package/lib/utils/copyData.js.map +1 -0
- package/lib/utils/cross_platform.d.ts +11 -0
- package/lib/utils/cross_platform.d.ts.map +1 -0
- package/lib/utils/cross_platform.js +17 -0
- package/lib/utils/cross_platform.js.map +1 -0
- package/lib/utils/geometry/angles.d.ts +16 -0
- package/lib/utils/geometry/angles.d.ts.map +1 -0
- package/lib/utils/geometry/angles.js +24 -0
- package/lib/utils/geometry/angles.js.map +1 -0
- package/lib/utils/geometry/getCirclePoints.d.ts +30 -0
- package/lib/utils/geometry/getCirclePoints.d.ts.map +1 -0
- package/lib/utils/geometry/getCirclePoints.js +88 -0
- package/lib/utils/geometry/getCirclePoints.js.map +1 -0
- package/lib/utils/geometry/index.d.ts +2 -0
- package/lib/utils/geometry/index.d.ts.map +1 -0
- package/lib/utils/geometry/index.js +2 -0
- package/lib/utils/geometry/index.js.map +1 -0
- package/lib/utils/geometry/lines.d.ts +23 -0
- package/lib/utils/geometry/lines.d.ts.map +1 -0
- package/lib/utils/geometry/lines.js +10 -0
- package/lib/utils/geometry/lines.js.map +1 -0
- package/lib/utils/geometry/points.d.ts +67 -0
- package/lib/utils/geometry/points.d.ts.map +1 -0
- package/lib/utils/geometry/points.js +78 -0
- package/lib/utils/geometry/points.js.map +1 -0
- package/lib/utils/geometry/polygons.d.ts +16 -0
- package/lib/utils/geometry/polygons.d.ts.map +1 -0
- package/lib/utils/geometry/polygons.js +30 -0
- package/lib/utils/geometry/polygons.js.map +1 -0
- package/lib/utils/geometry/removeClosePoints.d.ts +28 -0
- package/lib/utils/geometry/removeClosePoints.d.ts.map +1 -0
- package/lib/utils/geometry/removeClosePoints.js +43 -0
- package/lib/utils/geometry/removeClosePoints.js.map +1 -0
- package/lib/utils/getDefaultColor.d.ts +10 -0
- package/lib/utils/getDefaultColor.d.ts.map +1 -0
- package/lib/utils/getDefaultColor.js +17 -0
- package/lib/utils/getDefaultColor.js.map +1 -0
- package/lib/utils/getIndex.d.ts +5 -0
- package/lib/utils/getIndex.d.ts.map +1 -0
- package/lib/utils/getIndex.js +12 -0
- package/lib/utils/getIndex.js.map +1 -0
- package/lib/utils/getMinMax.d.ts +11 -0
- package/lib/utils/getMinMax.d.ts.map +1 -0
- package/lib/utils/getMinMax.js +24 -0
- package/lib/utils/getMinMax.js.map +1 -0
- package/lib/utils/getOutputImage.d.ts +57 -25
- package/lib/utils/getOutputImage.d.ts.map +1 -1
- package/lib/utils/getOutputImage.js +138 -37
- package/lib/utils/getOutputImage.js.map +1 -1
- package/lib/utils/getRadius.d.ts +7 -0
- package/lib/utils/getRadius.d.ts.map +1 -0
- package/lib/utils/getRadius.js +12 -0
- package/lib/utils/getRadius.js.map +1 -0
- package/lib/utils/interpolateBorder.d.ts +53 -9
- package/lib/utils/interpolateBorder.d.ts.map +1 -1
- package/lib/utils/interpolateBorder.js +136 -106
- package/lib/utils/interpolateBorder.js.map +1 -1
- package/lib/utils/interpolatePixel.d.ts +16 -7
- package/lib/utils/interpolatePixel.d.ts.map +1 -1
- package/lib/utils/interpolatePixel.js +121 -80
- package/lib/utils/interpolatePixel.js.map +1 -1
- package/lib/utils/round.d.ts +6 -1
- package/lib/utils/round.d.ts.map +1 -1
- package/lib/utils/round.js +18 -9
- package/lib/utils/round.js.map +1 -1
- package/lib/utils/sampleBackgroundPoints.d.ts +34 -0
- package/lib/utils/sampleBackgroundPoints.d.ts.map +1 -0
- package/lib/utils/sampleBackgroundPoints.js +37 -0
- package/lib/utils/sampleBackgroundPoints.js.map +1 -0
- package/lib/utils/setBlendedPixel.d.ts +11 -0
- package/lib/utils/setBlendedPixel.d.ts.map +1 -0
- package/lib/utils/setBlendedPixel.js +36 -0
- package/lib/utils/setBlendedPixel.js.map +1 -0
- package/lib/utils/setBlendedVisiblePixel.d.ts +11 -0
- package/lib/utils/setBlendedVisiblePixel.d.ts.map +1 -0
- package/lib/utils/setBlendedVisiblePixel.js +14 -0
- package/lib/utils/setBlendedVisiblePixel.js.map +1 -0
- package/lib/utils/surroundingPixels.d.ts +9 -0
- package/lib/utils/surroundingPixels.d.ts.map +1 -0
- package/lib/utils/surroundingPixels.js +15 -0
- package/lib/utils/surroundingPixels.js.map +1 -0
- package/lib/utils/utils.types.d.ts +25 -0
- package/lib/utils/utils.types.d.ts.map +1 -0
- package/lib/utils/utils.types.js +2 -0
- package/lib/utils/utils.types.js.map +1 -0
- package/lib/utils/validators/assert.d.ts +12 -0
- package/lib/utils/validators/assert.d.ts.map +1 -0
- package/lib/utils/validators/assert.js +18 -0
- package/lib/utils/validators/assert.js.map +1 -0
- package/lib/utils/validators/checkKernel.d.ts +6 -0
- package/lib/utils/validators/checkKernel.d.ts.map +1 -0
- package/lib/utils/validators/checkKernel.js +10 -0
- package/lib/utils/validators/checkKernel.js.map +1 -0
- package/lib/utils/validators/checkPointIsInteger.d.ts +8 -0
- package/lib/utils/validators/checkPointIsInteger.d.ts.map +1 -0
- package/lib/utils/validators/checkPointIsInteger.js +11 -0
- package/lib/utils/validators/checkPointIsInteger.js.map +1 -0
- package/lib/utils/validators/checkProcessable.d.ts +25 -0
- package/lib/utils/validators/checkProcessable.d.ts.map +1 -0
- package/lib/utils/validators/checkProcessable.js +64 -0
- package/lib/utils/validators/checkProcessable.js.map +1 -0
- package/lib/utils/validators/validators.d.ts +39 -0
- package/lib/utils/validators/validators.d.ts.map +1 -0
- package/lib/utils/validators/validators.js +66 -0
- package/lib/utils/validators/validators.js.map +1 -0
- package/package.json +91 -18
- package/src/Image.ts +922 -238
- package/src/Mask.ts +731 -0
- package/src/Stack.ts +204 -0
- package/src/align/affineTransfrom/affineFitFunction.ts +27 -0
- package/src/align/affineTransfrom/applyAffineTransform.ts +27 -0
- package/src/align/affineTransfrom/createAffineTransformModel.ts +31 -0
- package/src/align/affineTransfrom/drawResult.ts +56 -0
- package/src/align/affineTransfrom/getAffineTransform.ts +310 -0
- package/src/align/affineTransfrom/getEuclideanDistance.ts +11 -0
- package/src/align/affineTransfrom/getMatrixFromPoints.ts +20 -0
- package/src/align/affineTransfrom/getPointsFromMatrix.ts +17 -0
- package/src/align/affineTransfrom/utils/getSourceWithoutMargins.ts +30 -0
- package/src/align/alignMinDifference.ts +114 -0
- package/src/align/index.ts +2 -0
- package/src/compare/add.ts +34 -0
- package/src/compare/computePsnr.ts +17 -0
- package/src/compare/computeRmse.ts +33 -0
- package/src/compare/divide.ts +50 -0
- package/src/compare/index.ts +6 -0
- package/src/compare/multiply.ts +48 -0
- package/src/compare/subtract.ts +86 -0
- package/src/compute/getExtrema.ts +103 -0
- package/src/compute/histogram.ts +32 -10
- package/src/compute/index.ts +5 -1
- package/src/compute/mean.ts +48 -0
- package/src/compute/median.ts +50 -0
- package/src/compute/variance.ts +41 -0
- package/src/correctColor/correctColor.ts +109 -0
- package/src/correctColor/index.ts +1 -0
- package/src/correctColor/utils/formatData.ts +86 -0
- package/src/correctColor/utils/getImageColors.ts +23 -0
- package/src/correctColor/utils/referenceColorCard.ts +175 -0
- package/src/draw/drawCircleOnImage.ts +123 -0
- package/src/draw/drawLineOnImage.ts +64 -0
- package/src/draw/drawLineOnMask.ts +45 -0
- package/src/draw/drawMarker.ts +108 -0
- package/src/draw/drawMarkers.ts +25 -0
- package/src/draw/drawPoints.ts +74 -0
- package/src/draw/drawPolygonOnImage.ts +80 -0
- package/src/draw/drawPolygonOnMask.ts +69 -0
- package/src/draw/drawPolylineOnImage.ts +56 -0
- package/src/draw/drawPolylineOnMask.ts +37 -0
- package/src/draw/drawRectangle.ts +123 -0
- package/src/draw/index.ts +11 -0
- package/src/draw/utils/deleteDuplicates.ts +21 -0
- package/src/draw/utils/roundPoint.ts +13 -0
- package/src/featureMatching/descriptors/getBrief.ts +42 -0
- package/src/featureMatching/descriptors/getBriefDescriptors.ts +108 -0
- package/src/featureMatching/descriptors/utils/getKeypointPatch.ts +59 -0
- package/src/featureMatching/descriptors/utils/sliceBrief.ts +34 -0
- package/src/featureMatching/featureMatching.types.ts +26 -0
- package/src/featureMatching/index.ts +12 -0
- package/src/featureMatching/keypoints/getBestKeypointsInRadius.ts +39 -0
- package/src/featureMatching/keypoints/getFastKeypoints.ts +157 -0
- package/src/featureMatching/keypoints/getFastScore.ts +37 -0
- package/src/featureMatching/keypoints/getHarrisScore.ts +73 -0
- package/src/featureMatching/keypoints/getIntensityCentroid.ts +34 -0
- package/src/featureMatching/keypoints/getIntensityMoment.ts +43 -0
- package/src/featureMatching/keypoints/getOrientedFastKeypoints.ts +67 -0
- package/src/featureMatching/keypoints/getPatchIntensityCentroid.ts +39 -0
- package/src/featureMatching/keypoints/getPatchIntensityMoment.ts +56 -0
- package/src/featureMatching/keypoints/isFastKeypoint.ts +101 -0
- package/src/featureMatching/keypoints/utils/getDistanceMatrix.ts +35 -0
- package/src/featureMatching/keypoints/utils/getKeypointsInRadius.ts +34 -0
- package/src/featureMatching/matching/bruteForceMatch.ts +79 -0
- package/src/featureMatching/matching/filterEuclideanDistance.ts +71 -0
- package/src/featureMatching/matching/filterSmallestDistanceMatches.ts +33 -0
- package/src/featureMatching/matching/getCrosscheckMatches.ts +69 -0
- package/src/featureMatching/matching/getHammingDistance.ts +20 -0
- package/src/featureMatching/utils/checkBorderDistance.ts +22 -0
- package/src/featureMatching/utils/compareIntensity.ts +35 -0
- package/src/featureMatching/utils/extractSquareImage.ts +27 -0
- package/src/featureMatching/utils/getColors.ts +34 -0
- package/src/featureMatching/utils/getGaussianPoints.ts +64 -0
- package/src/featureMatching/utils/getKeypointColor.ts +29 -0
- package/src/featureMatching/utils/getMatchColor.ts +27 -0
- package/src/featureMatching/utils/sortByDistance.ts +12 -0
- package/src/featureMatching/utils/sortBySourceDest.ts +27 -0
- package/src/featureMatching/visualize/Montage.ts +165 -0
- package/src/featureMatching/visualize/drawKeypoints.ts +146 -0
- package/src/featureMatching/visualize/drawMatches.ts +107 -0
- package/src/featureMatching/visualize/overlapImages.ts +67 -0
- package/src/featureMatching/visualize/scaleKeypoints.ts +24 -0
- package/src/filters/and.ts +33 -0
- package/src/filters/blur.ts +41 -6
- package/src/filters/convolution.ts +173 -137
- package/src/filters/derivativeFilter.ts +71 -0
- package/src/filters/flip.ts +35 -0
- package/src/filters/flipX.ts +32 -0
- package/src/filters/flipY.ts +34 -0
- package/src/filters/gaussianBlur.ts +74 -27
- package/src/filters/gradientFilter.ts +103 -0
- package/src/filters/hypotenuse.ts +62 -0
- package/src/filters/increaseContrast.ts +69 -0
- package/src/filters/index.ts +14 -4
- package/src/filters/invert.ts +42 -11
- package/src/filters/level.ts +131 -0
- package/src/filters/medianFilter.ts +83 -0
- package/src/filters/or.ts +33 -0
- package/src/filters/pixelate.ts +178 -0
- package/src/geometry/getPerspectiveWarp.ts +169 -0
- package/src/geometry/index.ts +6 -3
- package/src/geometry/resize.ts +89 -57
- package/src/geometry/rotate.ts +56 -44
- package/src/geometry/transform.ts +137 -51
- package/src/geometry/transformRotate.ts +65 -0
- package/src/index.ts +24 -8
- package/src/load/decode.ts +18 -16
- package/src/load/decodeJpeg.ts +20 -4
- package/src/load/decodePng.ts +30 -27
- package/src/load/decodeTiff.ts +63 -0
- package/src/load/fetchURL.ts +13 -0
- package/src/load/getMetadata.ts +18 -0
- package/src/load/index.ts +9 -6
- package/src/load/load.types.ts +7 -0
- package/src/load/read.ts +15 -12
- package/src/load/readCanvas.ts +11 -9
- package/src/load/readImg.ts +15 -9
- package/src/maskAnalysis/getBorderPoints.ts +70 -0
- package/src/maskAnalysis/getConvexHull.ts +29 -0
- package/src/maskAnalysis/getFeret.ts +239 -0
- package/src/maskAnalysis/getMbr.ts +17 -0
- package/src/maskAnalysis/index.ts +1 -0
- package/src/maskAnalysis/maskAnalysis.types.ts +100 -0
- package/src/maskAnalysis/utils/getAngle.ts +40 -0
- package/src/maskAnalysis/utils/getExtendedBorderPoints.ts +30 -0
- package/src/maskAnalysis/utils/getMbrAngle.ts +25 -0
- package/src/maskAnalysis/utils/getMbrFromPoints.ts +112 -0
- package/src/maskAnalysis/utils/monotoneChainConvexHull.ts +65 -0
- package/src/morphology/bottomHat.ts +64 -0
- package/src/morphology/cannyEdgeDetector.ts +209 -0
- package/src/morphology/clearBorder.ts +41 -0
- package/src/morphology/close.ts +59 -0
- package/src/morphology/dilate.ts +261 -0
- package/src/morphology/erode.ts +261 -0
- package/src/morphology/floodFill.ts +38 -0
- package/src/morphology/index.ts +11 -0
- package/src/morphology/morphologicalGradient.ts +66 -0
- package/src/morphology/multipleFloodFill.ts +135 -0
- package/src/morphology/open.ts +62 -0
- package/src/morphology/solidFill.ts +29 -0
- package/src/morphology/topHat.ts +62 -0
- package/src/operations/convertBitDepth.ts +74 -0
- package/src/operations/convertColor.ts +143 -66
- package/src/operations/copyTo.ts +79 -0
- package/src/operations/correctBackground.ts +71 -0
- package/src/operations/crop.ts +94 -0
- package/src/operations/cropAlpha.ts +108 -0
- package/src/operations/cropRectangle.ts +112 -0
- package/src/operations/extendBorders.ts +119 -0
- package/src/operations/extract.ts +76 -0
- package/src/operations/getMaskFromCannyEdge.ts +41 -0
- package/src/operations/grey.ts +139 -0
- package/src/operations/greyAlgorithms.ts +248 -0
- package/src/operations/index.ts +16 -5
- package/src/operations/merge.ts +36 -20
- package/src/operations/operations.types.ts +6 -0
- package/src/operations/paintMaskOnImage.ts +111 -0
- package/src/operations/paintMaskOnMask.ts +59 -0
- package/src/operations/split.ts +11 -4
- package/src/operations/threshold.ts +111 -52
- package/src/operations/thresholds/huang.ts +84 -0
- package/src/operations/thresholds/intermodes.ts +61 -0
- package/src/operations/thresholds/isodata.ts +53 -0
- package/src/operations/thresholds/li.ts +80 -0
- package/src/operations/thresholds/maxEntropy.ts +88 -0
- package/src/operations/thresholds/mean.ts +22 -0
- package/src/operations/thresholds/minError.ts +101 -0
- package/src/operations/thresholds/minimum.ts +77 -0
- package/src/operations/thresholds/moments.ts +59 -0
- package/src/operations/thresholds/otsu.ts +7 -1
- package/src/operations/thresholds/percentile.ts +39 -0
- package/src/operations/thresholds/renyiEntropy.ts +145 -0
- package/src/operations/thresholds/shanbhag.ts +80 -0
- package/src/operations/thresholds/triangle.ts +8 -2
- package/src/operations/thresholds/yen.ts +59 -0
- package/src/point/operations.ts +29 -0
- package/src/roi/Roi.ts +661 -0
- package/src/roi/RoiMapManager.ts +97 -0
- package/src/roi/colorRois.ts +68 -0
- package/src/roi/computeRois.ts +90 -0
- package/src/roi/fromMask.ts +182 -0
- package/src/roi/getBorderPoints.ts +20 -0
- package/src/roi/getMask.ts +41 -0
- package/src/roi/getRois.ts +65 -0
- package/src/roi/index.ts +10 -0
- package/src/roi/properties/getEllipse.ts +124 -0
- package/src/roi/roi.types.ts +23 -0
- package/src/roi/utils/colorMaps/getBinaryMap.ts +67 -0
- package/src/roi/utils/colorMaps/getRainbowMap.ts +59 -0
- package/src/roi/utils/colorMaps/getSaturationMap.ts +70 -0
- package/src/roi/utils/getColorMap.ts +46 -0
- package/src/roi/utils/hsvToRgb.ts +61 -0
- package/src/roi/utils/rgbToNumber.ts +8 -0
- package/src/roi/waterShed.ts +146 -0
- package/src/save/encode.ts +41 -43
- package/src/save/encodeBmp.ts +24 -0
- package/src/save/encodeDataURL.ts +25 -0
- package/src/save/encodeJpeg.ts +22 -13
- package/src/save/encodePng.ts +30 -6
- package/src/save/index.ts +6 -5
- package/src/save/write.ts +129 -50
- package/src/save/writeCanvas.ts +45 -19
- package/src/ssim/compute_dssim.ts +21 -0
- package/src/ssim/compute_ssim.ts +94 -0
- package/src/ssim/index.ts +2 -0
- package/src/stack/compute/histogram.ts +26 -0
- package/src/stack/compute/maxImage.ts +31 -0
- package/src/stack/compute/meanImage.ts +37 -0
- package/src/stack/compute/medianImage.ts +30 -0
- package/src/stack/compute/minImage.ts +32 -0
- package/src/stack/compute/sum.ts +37 -0
- package/src/stack/index.ts +7 -0
- package/src/stack/load/decodeStack.ts +26 -0
- package/src/stack/load/decodeTiff.ts +19 -0
- package/src/stack/utils/checkImagesValid.ts +35 -0
- package/src/stack/utils/checkProcessable.ts +61 -0
- package/src/stack/utils/getStackFromFolder.ts +17 -0
- package/src/types/bresenham-zingl.d.ts +50 -0
- package/src/utils/arrayPointsToObjects.ts +15 -0
- package/src/utils/boolToNumber.ts +17 -0
- package/src/utils/borderIterator.ts +22 -0
- package/src/utils/clamp.ts +32 -5
- package/src/utils/constants/channelLabels.ts +9 -0
- package/src/utils/constants/colorModels.ts +45 -0
- package/src/utils/constants/kernels.ts +73 -0
- package/src/utils/constants/kinds.ts +26 -0
- package/src/utils/copyData.ts +21 -0
- package/src/utils/cross_platform.ts +18 -0
- package/src/utils/geometry/angles.ts +26 -0
- package/src/utils/geometry/getCirclePoints.ts +123 -0
- package/src/utils/geometry/index.ts +1 -0
- package/src/utils/geometry/lines.ts +26 -0
- package/src/utils/geometry/points.ts +102 -0
- package/src/utils/geometry/polygons.ts +32 -0
- package/src/utils/geometry/removeClosePoints.ts +82 -0
- package/src/utils/getDefaultColor.ts +20 -0
- package/src/utils/getIndex.ts +26 -0
- package/src/utils/getMinMax.ts +27 -0
- package/src/utils/getOutputImage.ts +149 -32
- package/src/utils/getRadius.ts +11 -0
- package/src/utils/interpolateBorder.ts +95 -62
- package/src/utils/interpolatePixel.ts +107 -57
- package/src/utils/round.ts +13 -3
- package/src/utils/sampleBackgroundPoints.ts +84 -0
- package/src/utils/setBlendedPixel.ts +54 -0
- package/src/utils/setBlendedVisiblePixel.ts +22 -0
- package/src/utils/surroundingPixels.ts +14 -0
- package/src/utils/utils.types.ts +32 -0
- package/src/utils/validators/assert.ts +18 -0
- package/src/utils/validators/checkKernel.ts +11 -0
- package/src/utils/validators/checkPointIsInteger.ts +12 -0
- package/src/utils/validators/checkProcessable.ts +95 -0
- package/src/utils/validators/validators.ts +82 -0
- package/lib/load/checkHeader.d.ts +0 -8
- package/lib/load/checkHeader.d.ts.map +0 -1
- package/lib/load/checkHeader.js +0 -21
- package/lib/load/checkHeader.js.map +0 -1
- package/lib/operations/convertDepth.d.ts +0 -3
- package/lib/operations/convertDepth.d.ts.map +0 -1
- package/lib/operations/convertDepth.js +0 -40
- package/lib/operations/convertDepth.js.map +0 -1
- package/lib/types.d.ts +0 -13
- package/lib/types.d.ts.map +0 -1
- package/lib/types.js +0 -17
- package/lib/types.js.map +0 -1
- package/lib/utils/kinds.d.ts +0 -9
- package/lib/utils/kinds.d.ts.map +0 -1
- package/lib/utils/kinds.js +0 -22
- package/lib/utils/kinds.js.map +0 -1
- package/lib/utils/validators.d.ts +0 -7
- package/lib/utils/validators.d.ts.map +0 -1
- package/lib/utils/validators.js +0 -19
- package/lib/utils/validators.js.map +0 -1
- package/lib-esm/Image.d.ts +0 -180
- package/lib-esm/Image.d.ts.map +0 -1
- package/lib-esm/Image.js +0 -337
- package/lib-esm/Image.js.map +0 -1
- package/lib-esm/compute/histogram.d.ts +0 -15
- package/lib-esm/compute/histogram.d.ts.map +0 -1
- package/lib-esm/compute/histogram.js +0 -21
- package/lib-esm/compute/histogram.js.map +0 -1
- package/lib-esm/compute/index.d.ts +0 -2
- package/lib-esm/compute/index.d.ts.map +0 -1
- package/lib-esm/compute/index.js +0 -2
- package/lib-esm/compute/index.js.map +0 -1
- package/lib-esm/filters/blur.d.ts +0 -11
- package/lib-esm/filters/blur.d.ts.map +0 -1
- package/lib-esm/filters/blur.js +0 -11
- package/lib-esm/filters/blur.js.map +0 -1
- package/lib-esm/filters/convolution.d.ts +0 -11
- package/lib-esm/filters/convolution.d.ts.map +0 -1
- package/lib-esm/filters/convolution.js +0 -125
- package/lib-esm/filters/convolution.js.map +0 -1
- package/lib-esm/filters/gaussianBlur.d.ts +0 -18
- package/lib-esm/filters/gaussianBlur.d.ts.map +0 -1
- package/lib-esm/filters/gaussianBlur.js +0 -45
- package/lib-esm/filters/gaussianBlur.js.map +0 -1
- package/lib-esm/filters/index.d.ts +0 -5
- package/lib-esm/filters/index.d.ts.map +0 -1
- package/lib-esm/filters/index.js +0 -5
- package/lib-esm/filters/index.js.map +0 -1
- package/lib-esm/filters/invert.d.ts +0 -10
- package/lib-esm/filters/invert.d.ts.map +0 -1
- package/lib-esm/filters/invert.js +0 -14
- package/lib-esm/filters/invert.js.map +0 -1
- package/lib-esm/geometry/index.d.ts +0 -4
- package/lib-esm/geometry/index.d.ts.map +0 -1
- package/lib-esm/geometry/index.js +0 -4
- package/lib-esm/geometry/index.js.map +0 -1
- package/lib-esm/geometry/resize.d.ts +0 -14
- package/lib-esm/geometry/resize.d.ts.map +0 -1
- package/lib-esm/geometry/resize.js +0 -88
- package/lib-esm/geometry/resize.js.map +0 -1
- package/lib-esm/geometry/rotate.d.ts +0 -14
- package/lib-esm/geometry/rotate.d.ts.map +0 -1
- package/lib-esm/geometry/rotate.js +0 -24
- package/lib-esm/geometry/rotate.js.map +0 -1
- package/lib-esm/geometry/transform.d.ts +0 -13
- package/lib-esm/geometry/transform.d.ts.map +0 -1
- package/lib-esm/geometry/transform.js +0 -82
- package/lib-esm/geometry/transform.js.map +0 -1
- package/lib-esm/index.d.ts +0 -9
- package/lib-esm/index.d.ts.map +0 -1
- package/lib-esm/index.js +0 -9
- package/lib-esm/index.js.map +0 -1
- package/lib-esm/load/checkHeader.d.ts +0 -8
- package/lib-esm/load/checkHeader.d.ts.map +0 -1
- package/lib-esm/load/checkHeader.js +0 -18
- package/lib-esm/load/checkHeader.js.map +0 -1
- package/lib-esm/load/decode.d.ts +0 -8
- package/lib-esm/load/decode.d.ts.map +0 -1
- package/lib-esm/load/decode.js +0 -23
- package/lib-esm/load/decode.js.map +0 -1
- package/lib-esm/load/decodeJpeg.d.ts +0 -7
- package/lib-esm/load/decodeJpeg.d.ts.map +0 -1
- package/lib-esm/load/decodeJpeg.js +0 -14
- package/lib-esm/load/decodeJpeg.js.map +0 -1
- package/lib-esm/load/decodePng.d.ts +0 -7
- package/lib-esm/load/decodePng.d.ts.map +0 -1
- package/lib-esm/load/decodePng.js +0 -65
- package/lib-esm/load/decodePng.js.map +0 -1
- package/lib-esm/load/index.d.ts +0 -7
- package/lib-esm/load/index.d.ts.map +0 -1
- package/lib-esm/load/index.js +0 -7
- package/lib-esm/load/index.js.map +0 -1
- package/lib-esm/load/read.d.ts +0 -12
- package/lib-esm/load/read.d.ts.map +0 -1
- package/lib-esm/load/read.js +0 -20
- package/lib-esm/load/read.js.map +0 -1
- package/lib-esm/load/readCanvas.d.ts +0 -3
- package/lib-esm/load/readCanvas.d.ts.map +0 -1
- package/lib-esm/load/readCanvas.js +0 -15
- package/lib-esm/load/readCanvas.js.map +0 -1
- package/lib-esm/load/readImg.d.ts +0 -3
- package/lib-esm/load/readImg.d.ts.map +0 -1
- package/lib-esm/load/readImg.js +0 -14
- package/lib-esm/load/readImg.js.map +0 -1
- package/lib-esm/operations/convertColor.d.ts +0 -6
- package/lib-esm/operations/convertColor.d.ts.map +0 -1
- package/lib-esm/operations/convertColor.js +0 -73
- package/lib-esm/operations/convertColor.js.map +0 -1
- package/lib-esm/operations/convertDepth.d.ts +0 -3
- package/lib-esm/operations/convertDepth.d.ts.map +0 -1
- package/lib-esm/operations/convertDepth.js +0 -37
- package/lib-esm/operations/convertDepth.js.map +0 -1
- package/lib-esm/operations/index.d.ts +0 -6
- package/lib-esm/operations/index.d.ts.map +0 -1
- package/lib-esm/operations/index.js +0 -6
- package/lib-esm/operations/index.js.map +0 -1
- package/lib-esm/operations/merge.d.ts +0 -7
- package/lib-esm/operations/merge.d.ts.map +0 -1
- package/lib-esm/operations/merge.js +0 -45
- package/lib-esm/operations/merge.js.map +0 -1
- package/lib-esm/operations/split.d.ts +0 -3
- package/lib-esm/operations/split.d.ts.map +0 -1
- package/lib-esm/operations/split.js +0 -13
- package/lib-esm/operations/split.js.map +0 -1
- package/lib-esm/operations/threshold.d.ts +0 -19
- package/lib-esm/operations/threshold.d.ts.map +0 -1
- package/lib-esm/operations/threshold.js +0 -55
- package/lib-esm/operations/threshold.js.map +0 -1
- package/lib-esm/operations/thresholds/otsu.d.ts +0 -2
- package/lib-esm/operations/thresholds/otsu.d.ts.map +0 -1
- package/lib-esm/operations/thresholds/otsu.js +0 -32
- package/lib-esm/operations/thresholds/otsu.js.map +0 -1
- package/lib-esm/operations/thresholds/triangle.d.ts +0 -2
- package/lib-esm/operations/thresholds/triangle.d.ts.map +0 -1
- package/lib-esm/operations/thresholds/triangle.js +0 -103
- package/lib-esm/operations/thresholds/triangle.js.map +0 -1
- package/lib-esm/save/encode.d.ts +0 -35
- package/lib-esm/save/encode.d.ts.map +0 -1
- package/lib-esm/save/encode.js +0 -22
- package/lib-esm/save/encode.js.map +0 -1
- package/lib-esm/save/encodeJpeg.d.ts +0 -6
- package/lib-esm/save/encodeJpeg.d.ts.map +0 -1
- package/lib-esm/save/encodeJpeg.js +0 -16
- package/lib-esm/save/encodeJpeg.js.map +0 -1
- package/lib-esm/save/encodePng.d.ts +0 -5
- package/lib-esm/save/encodePng.d.ts.map +0 -1
- package/lib-esm/save/encodePng.js +0 -5
- package/lib-esm/save/encodePng.js.map +0 -1
- package/lib-esm/save/index.d.ts +0 -6
- package/lib-esm/save/index.d.ts.map +0 -1
- package/lib-esm/save/index.js +0 -6
- package/lib-esm/save/index.js.map +0 -1
- package/lib-esm/save/write.d.ts +0 -23
- package/lib-esm/save/write.d.ts.map +0 -1
- package/lib-esm/save/write.js +0 -46
- package/lib-esm/save/write.js.map +0 -1
- package/lib-esm/save/writeCanvas.d.ts +0 -15
- package/lib-esm/save/writeCanvas.d.ts.map +0 -1
- package/lib-esm/save/writeCanvas.js +0 -19
- package/lib-esm/save/writeCanvas.js.map +0 -1
- package/lib-esm/types.d.ts +0 -13
- package/lib-esm/types.d.ts.map +0 -1
- package/lib-esm/types.js +0 -15
- package/lib-esm/types.js.map +0 -1
- package/lib-esm/utils/clamp.d.ts +0 -4
- package/lib-esm/utils/clamp.d.ts.map +0 -1
- package/lib-esm/utils/clamp.js +0 -16
- package/lib-esm/utils/clamp.js.map +0 -1
- package/lib-esm/utils/getOutputImage.d.ts +0 -26
- package/lib-esm/utils/getOutputImage.d.ts.map +0 -1
- package/lib-esm/utils/getOutputImage.js +0 -35
- package/lib-esm/utils/getOutputImage.js.map +0 -1
- package/lib-esm/utils/interpolateBorder.d.ts +0 -10
- package/lib-esm/utils/interpolateBorder.d.ts.map +0 -1
- package/lib-esm/utils/interpolateBorder.js +0 -99
- package/lib-esm/utils/interpolateBorder.js.map +0 -1
- package/lib-esm/utils/interpolatePixel.d.ts +0 -8
- package/lib-esm/utils/interpolatePixel.d.ts.map +0 -1
- package/lib-esm/utils/interpolatePixel.js +0 -78
- package/lib-esm/utils/interpolatePixel.js.map +0 -1
- package/lib-esm/utils/kinds.d.ts +0 -9
- package/lib-esm/utils/kinds.d.ts.map +0 -1
- package/lib-esm/utils/kinds.js +0 -20
- package/lib-esm/utils/kinds.js.map +0 -1
- package/lib-esm/utils/round.d.ts +0 -2
- package/lib-esm/utils/round.d.ts.map +0 -1
- package/lib-esm/utils/round.js +0 -7
- package/lib-esm/utils/round.js.map +0 -1
- package/lib-esm/utils/validators.d.ts +0 -7
- package/lib-esm/utils/validators.d.ts.map +0 -1
- package/lib-esm/utils/validators.js +0 -15
- package/lib-esm/utils/validators.js.map +0 -1
- package/src/load/checkHeader.ts +0 -20
- package/src/operations/convertDepth.ts +0 -43
- package/src/operations/thresholds/huang.js +0 -80
- package/src/operations/thresholds/intermodes.js +0 -56
- package/src/operations/thresholds/isodata.js +0 -47
- package/src/operations/thresholds/li.js +0 -74
- package/src/operations/thresholds/maxEntropy.js +0 -79
- package/src/operations/thresholds/mean.js +0 -16
- package/src/operations/thresholds/minError.js +0 -92
- package/src/operations/thresholds/minimum.js +0 -75
- package/src/operations/thresholds/moments.js +0 -52
- package/src/operations/thresholds/percentile.js +0 -33
- package/src/operations/thresholds/renyiEntropy.js +0 -142
- package/src/operations/thresholds/shanbhag.js +0 -74
- package/src/operations/thresholds/yen.js +0 -56
- package/src/types.ts +0 -13
- package/src/utils/kinds.ts +0 -27
- package/src/utils/validators.ts +0 -23
package/lib/roi/Roi.js
ADDED
|
@@ -0,0 +1,553 @@
|
|
|
1
|
+
import { getConvexHull } from '../maskAnalysis/getConvexHull.js';
|
|
2
|
+
import { getFeret } from '../maskAnalysis/getFeret.js';
|
|
3
|
+
import { getMbr } from '../maskAnalysis/getMbr.js';
|
|
4
|
+
import { getBorderPoints } from './getBorderPoints.js';
|
|
5
|
+
import { getMask } from './getMask.js';
|
|
6
|
+
import { getEllipse } from './properties/getEllipse.js';
|
|
7
|
+
export class Roi {
|
|
8
|
+
/**
|
|
9
|
+
* Original map with all the ROI IDs.
|
|
10
|
+
*/
|
|
11
|
+
map;
|
|
12
|
+
/**
|
|
13
|
+
* ID of the ROI. Positive for white ROIs and negative for black ones.
|
|
14
|
+
*/
|
|
15
|
+
id;
|
|
16
|
+
/**
|
|
17
|
+
* Origin of the ROI. The top-left corner of the rectangle around
|
|
18
|
+
* the ROI relative to the original image.
|
|
19
|
+
*/
|
|
20
|
+
origin;
|
|
21
|
+
/**
|
|
22
|
+
* Width of the ROI.
|
|
23
|
+
*/
|
|
24
|
+
width;
|
|
25
|
+
/**
|
|
26
|
+
* Height of the ROI.
|
|
27
|
+
*/
|
|
28
|
+
height;
|
|
29
|
+
/**
|
|
30
|
+
* Surface of the ROI.
|
|
31
|
+
*/
|
|
32
|
+
surface;
|
|
33
|
+
/**
|
|
34
|
+
* Cached values of properties to improve performance.
|
|
35
|
+
*/
|
|
36
|
+
#computed;
|
|
37
|
+
constructor(map, id, width, height, origin, surface) {
|
|
38
|
+
this.map = map;
|
|
39
|
+
this.id = id;
|
|
40
|
+
this.origin = origin;
|
|
41
|
+
this.width = width;
|
|
42
|
+
this.height = height;
|
|
43
|
+
this.surface = surface;
|
|
44
|
+
this.#computed = {};
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Return the value at the given coordinates in an ROI map.
|
|
48
|
+
* @param column - Column of the value.
|
|
49
|
+
* @param row - Row of the value.
|
|
50
|
+
* @returns The value at the given coordinates.
|
|
51
|
+
*/
|
|
52
|
+
getMapValue(column, row) {
|
|
53
|
+
return this.map.data[this.map.width * row + column];
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Returns the ratio between the width and the height of the bounding rectangle of the ROI.
|
|
57
|
+
* @returns The width by height ratio.
|
|
58
|
+
*/
|
|
59
|
+
getRatio() {
|
|
60
|
+
return this.width / this.height;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Generates a mask of an ROI. You can specify the kind of mask you want using the `kind` option.
|
|
64
|
+
* @param options - Get Mask options.
|
|
65
|
+
* @returns The ROI mask.
|
|
66
|
+
*/
|
|
67
|
+
getMask(options) {
|
|
68
|
+
return getMask(this, options);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Computes the diameter of a circle that has the same perimeter as the particle image.
|
|
72
|
+
* @returns Ped value in pixels.
|
|
73
|
+
*/
|
|
74
|
+
get ped() {
|
|
75
|
+
return this.perimeter / Math.PI;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Return an array with the coordinates of the pixels that are on the border of the ROI.
|
|
79
|
+
* The points are defined as [column, row].
|
|
80
|
+
* @param options - Get border points options.
|
|
81
|
+
* @returns The array of border pixels.
|
|
82
|
+
*/
|
|
83
|
+
getBorderPoints(options) {
|
|
84
|
+
return getBorderPoints(this, options);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Returns an array of ROIs IDs that are included in the current ROI.
|
|
88
|
+
* This will be useful to know if there are some holes in the ROI.
|
|
89
|
+
* @returns InternalIDs.
|
|
90
|
+
*/
|
|
91
|
+
get internalIDs() {
|
|
92
|
+
return this.#getComputed('internalIDs', () => {
|
|
93
|
+
const internal = [this.id];
|
|
94
|
+
const roiMap = this.map;
|
|
95
|
+
const data = roiMap.data;
|
|
96
|
+
if (this.height > 2) {
|
|
97
|
+
for (let column = 0; column < this.width; column++) {
|
|
98
|
+
const target = this.#computeIndex(0, column);
|
|
99
|
+
if (internal.includes(data[target])) {
|
|
100
|
+
const id = data[target + roiMap.width];
|
|
101
|
+
if (!internal.includes(id) && !this.boxIDs.includes(id)) {
|
|
102
|
+
internal.push(id);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
const array = new Array(4);
|
|
108
|
+
for (let column = 1; column < this.width - 1; column++) {
|
|
109
|
+
for (let row = 1; row < this.height - 1; row++) {
|
|
110
|
+
const target = this.#computeIndex(row, column);
|
|
111
|
+
if (internal.includes(data[target])) {
|
|
112
|
+
// We check if one of the neighbor is not yet in.
|
|
113
|
+
array[0] = data[target - 1];
|
|
114
|
+
array[1] = data[target + 1];
|
|
115
|
+
array[2] = data[target - roiMap.width];
|
|
116
|
+
array[3] = data[target + roiMap.width];
|
|
117
|
+
for (let i = 0; i < 4; i++) {
|
|
118
|
+
const id = array[i];
|
|
119
|
+
if (!internal.includes(id) && !this.boxIDs.includes(id)) {
|
|
120
|
+
internal.push(id);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return internal;
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Returns an array of ROIs IDs that touch the current ROI.
|
|
131
|
+
* @returns The array of Borders.
|
|
132
|
+
*/
|
|
133
|
+
get externalBorders() {
|
|
134
|
+
return this.#getComputed('externalBorders', () => {
|
|
135
|
+
// Takes all the borders and removes the internal one ...
|
|
136
|
+
const borders = this.borders;
|
|
137
|
+
const externalBorders = [];
|
|
138
|
+
const externalIDs = [];
|
|
139
|
+
const internals = this.internalIDs;
|
|
140
|
+
for (const border of borders) {
|
|
141
|
+
if (!internals.includes(border.connectedID)) {
|
|
142
|
+
const element = {
|
|
143
|
+
connectedID: border.connectedID,
|
|
144
|
+
length: border.length,
|
|
145
|
+
};
|
|
146
|
+
externalIDs.push(element.connectedID);
|
|
147
|
+
externalBorders.push(element);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return externalBorders;
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Calculates and caches the number of sides by which each pixel is touched externally.
|
|
155
|
+
* @returns An object which tells how many pixels are exposed externally to how many sides.
|
|
156
|
+
*/
|
|
157
|
+
get perimeterInfo() {
|
|
158
|
+
return this.#getComputed('perimeterInfo', () => {
|
|
159
|
+
const roiMap = this.map;
|
|
160
|
+
const data = roiMap.data;
|
|
161
|
+
let one = 0;
|
|
162
|
+
let two = 0;
|
|
163
|
+
let three = 0;
|
|
164
|
+
let four = 0;
|
|
165
|
+
const externalIDs = new Set(this.externalBorders.map((element) => element.connectedID));
|
|
166
|
+
for (let column = 0; column < this.width; column++) {
|
|
167
|
+
for (let row = 0; row < this.height; row++) {
|
|
168
|
+
const target = this.#computeIndex(row, column);
|
|
169
|
+
if (data[target] === this.id) {
|
|
170
|
+
let nbAround = 0;
|
|
171
|
+
if (column === 0) {
|
|
172
|
+
nbAround++;
|
|
173
|
+
}
|
|
174
|
+
else if (externalIDs.has(data[target - 1])) {
|
|
175
|
+
nbAround++;
|
|
176
|
+
}
|
|
177
|
+
if (column === roiMap.width - 1) {
|
|
178
|
+
nbAround++;
|
|
179
|
+
}
|
|
180
|
+
else if (externalIDs.has(data[target + 1])) {
|
|
181
|
+
nbAround++;
|
|
182
|
+
}
|
|
183
|
+
if (row === 0) {
|
|
184
|
+
nbAround++;
|
|
185
|
+
}
|
|
186
|
+
else if (externalIDs.has(data[target - roiMap.width])) {
|
|
187
|
+
nbAround++;
|
|
188
|
+
}
|
|
189
|
+
if (row === roiMap.height - 1) {
|
|
190
|
+
nbAround++;
|
|
191
|
+
}
|
|
192
|
+
else if (externalIDs.has(data[target + roiMap.width])) {
|
|
193
|
+
nbAround++;
|
|
194
|
+
}
|
|
195
|
+
switch (nbAround) {
|
|
196
|
+
case 1:
|
|
197
|
+
one++;
|
|
198
|
+
break;
|
|
199
|
+
case 2:
|
|
200
|
+
two++;
|
|
201
|
+
break;
|
|
202
|
+
case 3:
|
|
203
|
+
three++;
|
|
204
|
+
break;
|
|
205
|
+
case 4:
|
|
206
|
+
four++;
|
|
207
|
+
break;
|
|
208
|
+
default:
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
return { one, two, three, four };
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Perimeter of the ROI.
|
|
218
|
+
* The perimeter is calculated using the sum of all the external borders of the ROI to which we subtract:
|
|
219
|
+
* (2 - √2) * the number of pixels that have 2 external borders
|
|
220
|
+
* 2 * (2 - √2) * the number of pixels that have 3 external borders
|
|
221
|
+
* @returns Perimeter value in pixels.
|
|
222
|
+
*/
|
|
223
|
+
get perimeter() {
|
|
224
|
+
const info = this.perimeterInfo;
|
|
225
|
+
const delta = 2 - Math.sqrt(2);
|
|
226
|
+
return (info.one +
|
|
227
|
+
info.two * 2 +
|
|
228
|
+
info.three * 3 +
|
|
229
|
+
info.four * 4 -
|
|
230
|
+
delta * (info.two + info.three * 2 + info.four));
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Computes ROI points relative to ROIs point of `origin`.
|
|
234
|
+
* @returns Array of points with relative ROI coordinates.
|
|
235
|
+
*/
|
|
236
|
+
get relativePoints() {
|
|
237
|
+
return this.#getComputed(`relativePoints`, () => {
|
|
238
|
+
const points = Array.from(this.points(false));
|
|
239
|
+
return points;
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Computes ROI points relative to Image's/Mask's point of `origin`.
|
|
244
|
+
* @returns Array of points with absolute ROI coordinates.
|
|
245
|
+
*/
|
|
246
|
+
get absolutePoints() {
|
|
247
|
+
return this.#getComputed(`absolutePoints`, () => {
|
|
248
|
+
const points = Array.from(this.points(true));
|
|
249
|
+
return points;
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
get boxIDs() {
|
|
253
|
+
return this.#getComputed('boxIDs', () => {
|
|
254
|
+
const surroundingIDs = new Set(); // Allows to get a unique list without indexOf.
|
|
255
|
+
const roiMap = this.map;
|
|
256
|
+
const data = roiMap.data;
|
|
257
|
+
// We check the first line and the last line.
|
|
258
|
+
for (const row of [0, this.height - 1]) {
|
|
259
|
+
for (let column = 0; column < this.width; column++) {
|
|
260
|
+
const target = this.#computeIndex(row, column);
|
|
261
|
+
if (column - this.origin.column > 0 &&
|
|
262
|
+
data[target] === this.id &&
|
|
263
|
+
data[target - 1] !== this.id) {
|
|
264
|
+
const value = data[target - 1];
|
|
265
|
+
surroundingIDs.add(value);
|
|
266
|
+
}
|
|
267
|
+
if (roiMap.width - column - this.origin.column > 1 &&
|
|
268
|
+
data[target] === this.id &&
|
|
269
|
+
data[target + 1] !== this.id) {
|
|
270
|
+
const value = data[target + 1];
|
|
271
|
+
surroundingIDs.add(value);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
// We check the first column and the last column.
|
|
276
|
+
for (const column of [0, this.width - 1]) {
|
|
277
|
+
for (let row = 0; row < this.height; row++) {
|
|
278
|
+
const target = this.#computeIndex(row, column);
|
|
279
|
+
if (row - this.origin.row > 0 &&
|
|
280
|
+
data[target] === this.id &&
|
|
281
|
+
data[target - roiMap.width] !== this.id) {
|
|
282
|
+
const value = data[target - roiMap.width];
|
|
283
|
+
surroundingIDs.add(value);
|
|
284
|
+
}
|
|
285
|
+
if (roiMap.height - row - this.origin.row > 1 &&
|
|
286
|
+
data[target] === this.id &&
|
|
287
|
+
data[target + roiMap.width] !== this.id) {
|
|
288
|
+
const value = data[target + roiMap.width];
|
|
289
|
+
surroundingIDs.add(value);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
return Array.from(surroundingIDs); // The selection takes the whole rectangle.
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Computes the diameter of a circle of equal projection area (EQPC).
|
|
298
|
+
* It is a diameter of a circle that has the same surface as the ROI.
|
|
299
|
+
* @returns `eqpc` value in pixels.
|
|
300
|
+
*/
|
|
301
|
+
get eqpc() {
|
|
302
|
+
return 2 * Math.sqrt(this.surface / Math.PI);
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Computes ellipse of ROI. It is the smallest ellipse that fits the ROI.
|
|
306
|
+
* @returns Ellipse
|
|
307
|
+
*/
|
|
308
|
+
get ellipse() {
|
|
309
|
+
return this.#getComputed('ellipse', () => {
|
|
310
|
+
return getEllipse(this);
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Number of holes in the ROI and their total surface.
|
|
315
|
+
* Used to calculate fillRatio.
|
|
316
|
+
* @returns The surface of holes in ROI in pixels.
|
|
317
|
+
*/
|
|
318
|
+
get holesInfo() {
|
|
319
|
+
return this.#getComputed('holesInfo', () => {
|
|
320
|
+
let surface = 0;
|
|
321
|
+
const data = this.map.data;
|
|
322
|
+
for (let column = 1; column < this.width - 1; column++) {
|
|
323
|
+
for (let row = 1; row < this.height - 1; row++) {
|
|
324
|
+
const target = this.#computeIndex(row, column);
|
|
325
|
+
if (this.internalIDs.includes(data[target]) &&
|
|
326
|
+
data[target] !== this.id) {
|
|
327
|
+
surface++;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
return {
|
|
332
|
+
number: this.internalIDs.length - 1,
|
|
333
|
+
surface,
|
|
334
|
+
};
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Calculates and caches border's length and their IDs.
|
|
339
|
+
* @returns Borders' length and their IDs.
|
|
340
|
+
*/
|
|
341
|
+
get borders() {
|
|
342
|
+
return this.#getComputed('borders', () => {
|
|
343
|
+
const roiMap = this.map;
|
|
344
|
+
const data = roiMap.data;
|
|
345
|
+
const surroudingIDs = new Set();
|
|
346
|
+
const surroundingBorders = new Map();
|
|
347
|
+
const visitedData = new Set();
|
|
348
|
+
const dx = [1, 0, -1, 0];
|
|
349
|
+
const dy = [0, 1, 0, -1];
|
|
350
|
+
for (let column = this.origin.column; column <= this.origin.column + this.width; column++) {
|
|
351
|
+
for (let row = this.origin.row; row <= this.origin.row + this.height; row++) {
|
|
352
|
+
const target = column + row * roiMap.width;
|
|
353
|
+
if (data[target] === this.id) {
|
|
354
|
+
for (let dir = 0; dir < 4; dir++) {
|
|
355
|
+
const newX = column + dx[dir];
|
|
356
|
+
const newY = row + dy[dir];
|
|
357
|
+
if (newX >= 0 &&
|
|
358
|
+
newY >= 0 &&
|
|
359
|
+
newX < roiMap.width &&
|
|
360
|
+
newY < roiMap.height) {
|
|
361
|
+
const neighbour = newX + newY * roiMap.width;
|
|
362
|
+
if (data[neighbour] !== this.id &&
|
|
363
|
+
!visitedData.has(neighbour)) {
|
|
364
|
+
visitedData.add(neighbour);
|
|
365
|
+
surroudingIDs.add(data[neighbour]);
|
|
366
|
+
let surroundingBorder = surroundingBorders.get(data[neighbour]);
|
|
367
|
+
if (!surroundingBorder) {
|
|
368
|
+
surroundingBorders.set(data[neighbour], 1);
|
|
369
|
+
}
|
|
370
|
+
else {
|
|
371
|
+
surroundingBorders.set(data[neighbour], ++surroundingBorder);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
const id = Array.from(surroudingIDs);
|
|
380
|
+
return id.map((id) => {
|
|
381
|
+
return {
|
|
382
|
+
connectedID: id,
|
|
383
|
+
length: surroundingBorders.get(id),
|
|
384
|
+
};
|
|
385
|
+
});
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* Computes fill ratio of the ROI. It is calculated by dividing ROI's actual surface over the surface combined with holes, to see how holes affect its surface.
|
|
390
|
+
* @returns Fill ratio value.
|
|
391
|
+
*/
|
|
392
|
+
get fillRatio() {
|
|
393
|
+
return this.surface / (this.surface + this.holesInfo.surface);
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Computes sphericity of the ROI.
|
|
397
|
+
* Sphericity is a measure of the degree to which a particle approximates the shape of a sphere, and is independent of its size. The value is always between 0 and 1. The less spheric the ROI is the smaller is the number.
|
|
398
|
+
* @returns Sphericity value.
|
|
399
|
+
*/
|
|
400
|
+
get sphericity() {
|
|
401
|
+
return (2 * Math.sqrt(this.surface * Math.PI)) / this.perimeter;
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Computes the surface of the ROI, including the surface of the holes.
|
|
405
|
+
* @returns Surface including holes measured in pixels.
|
|
406
|
+
*/
|
|
407
|
+
get filledSurface() {
|
|
408
|
+
return this.surface + this.holesInfo.surface;
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* The solidity describes the extent to which a shape is convex or concave.
|
|
412
|
+
* The solidity of a completely convex shape is 1, the farther the it deviates from 1, the greater the extent of concavity in the shape of the ROI.
|
|
413
|
+
* @returns Solidity value.
|
|
414
|
+
*/
|
|
415
|
+
get solidity() {
|
|
416
|
+
return this.surface / this.convexHull.surface;
|
|
417
|
+
}
|
|
418
|
+
//TODO Should be refactored to not need creating a new Mask.
|
|
419
|
+
/**
|
|
420
|
+
*Computes convex hull. It is the smallest convex set that contains it.
|
|
421
|
+
* @see https://en.wikipedia.org/wiki/Convex_hull
|
|
422
|
+
* @returns Convex hull.
|
|
423
|
+
*/
|
|
424
|
+
get convexHull() {
|
|
425
|
+
return this.#getComputed('convexHull', () => {
|
|
426
|
+
return getConvexHull(this.getMask());
|
|
427
|
+
});
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* Computes the minimum bounding rectangle.
|
|
431
|
+
* In digital image processing, the bounding box is merely the coordinates of the rectangular border that fully encloses a digital image when it is placed over a page, a canvas, a screen or other similar bidimensional background.
|
|
432
|
+
* @returns The minimum bounding rectangle.
|
|
433
|
+
*/
|
|
434
|
+
get mbr() {
|
|
435
|
+
return this.#getComputed('mbr', () => {
|
|
436
|
+
return getMbr(this.getMask());
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
/*
|
|
440
|
+
* Computes roundness of ROI.
|
|
441
|
+
* Roundness is the measure of how closely the shape of an object approaches that of a mathematically perfect circle.
|
|
442
|
+
(See slide 24 https://static.horiba.com/fileadmin/Horiba/Products/Scientific/Particle_Characterization/Webinars/Slides/TE011.pdf) */
|
|
443
|
+
get roundness() {
|
|
444
|
+
return (4 * this.surface) / (Math.PI * this.feret.maxDiameter.length ** 2);
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* This is not a diameter in its actual sense but the common basis of a group of diameters derived from the distance of two tangents to the contour of the particle in a well-defined orientation.
|
|
448
|
+
* In simpler words, the method corresponds to the measurement by a slide gauge (slide gauge principle).
|
|
449
|
+
* In general it is defined as the distance between two parallel tangents of the particle at an arbitrary angle. The minimum Feret diameter is often used as the diameter equivalent to a sieve analysis.
|
|
450
|
+
* @returns The maximum and minimum Feret Diameters.
|
|
451
|
+
*/
|
|
452
|
+
get feret() {
|
|
453
|
+
return this.#getComputed('feret', () => {
|
|
454
|
+
return getFeret(this.getMask());
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* A JSON object with all the data about ROI.
|
|
459
|
+
* @returns All current ROI properties as one object.
|
|
460
|
+
*/
|
|
461
|
+
toJSON() {
|
|
462
|
+
return {
|
|
463
|
+
id: this.id,
|
|
464
|
+
origin: this.origin,
|
|
465
|
+
height: this.height,
|
|
466
|
+
width: this.width,
|
|
467
|
+
surface: this.surface,
|
|
468
|
+
eqpc: this.eqpc,
|
|
469
|
+
ped: this.ped,
|
|
470
|
+
feret: this.feret,
|
|
471
|
+
fillRatio: this.fillRatio,
|
|
472
|
+
sphericity: this.sphericity,
|
|
473
|
+
roundness: this.roundness,
|
|
474
|
+
solidity: this.solidity,
|
|
475
|
+
perimeter: this.perimeter,
|
|
476
|
+
convexHull: this.convexHull,
|
|
477
|
+
mbr: this.mbr,
|
|
478
|
+
filledSurface: this.filledSurface,
|
|
479
|
+
centroid: this.centroid,
|
|
480
|
+
};
|
|
481
|
+
}
|
|
482
|
+
/**
|
|
483
|
+
* Computes a center of mass of the current ROI.
|
|
484
|
+
* @returns point
|
|
485
|
+
*/
|
|
486
|
+
get centroid() {
|
|
487
|
+
return this.#getComputed('centroid', () => {
|
|
488
|
+
const roiMap = this.map;
|
|
489
|
+
const data = roiMap.data;
|
|
490
|
+
let sumColumn = 0;
|
|
491
|
+
let sumRow = 0;
|
|
492
|
+
for (let column = 0; column < this.width; column++) {
|
|
493
|
+
for (let row = 0; row < this.height; row++) {
|
|
494
|
+
const target = this.#computeIndex(row, column);
|
|
495
|
+
if (data[target] === this.id) {
|
|
496
|
+
sumColumn += column;
|
|
497
|
+
sumRow += row;
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
return {
|
|
502
|
+
column: sumColumn / this.surface + this.origin.column,
|
|
503
|
+
row: sumRow / this.surface + this.origin.row,
|
|
504
|
+
};
|
|
505
|
+
});
|
|
506
|
+
}
|
|
507
|
+
// A helper function to cache already calculated properties.
|
|
508
|
+
#getComputed(property, callback) {
|
|
509
|
+
if (this.#computed[property] === undefined) {
|
|
510
|
+
const result = callback();
|
|
511
|
+
this.#computed[property] = result;
|
|
512
|
+
return result;
|
|
513
|
+
}
|
|
514
|
+
return this.#computed[property];
|
|
515
|
+
}
|
|
516
|
+
//TODO Make this private.
|
|
517
|
+
/**
|
|
518
|
+
* Calculates the correct index on the map of ROI.
|
|
519
|
+
* @param y - Map row
|
|
520
|
+
* @param x - Map column
|
|
521
|
+
* @returns Index within the ROI map.
|
|
522
|
+
*/
|
|
523
|
+
#computeIndex(y, x) {
|
|
524
|
+
const roiMap = this.map;
|
|
525
|
+
return (y + this.origin.row) * roiMap.width + x + this.origin.column;
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* Generator function to calculate point's coordinates.
|
|
529
|
+
* @param absolute - controls whether coordinates should be relative to ROI's point of `origin` (relative), or relative to ROI's position on the Image/Mask (absolute).
|
|
530
|
+
* @yields Coordinates of each point of ROI.
|
|
531
|
+
*/
|
|
532
|
+
*points(absolute) {
|
|
533
|
+
for (let row = 0; row < this.height; row++) {
|
|
534
|
+
for (let column = 0; column < this.width; column++) {
|
|
535
|
+
const target = (row + this.origin.row) * this.map.width +
|
|
536
|
+
column +
|
|
537
|
+
this.origin.column;
|
|
538
|
+
if (this.map.data[target] === this.id) {
|
|
539
|
+
if (absolute) {
|
|
540
|
+
yield {
|
|
541
|
+
column: this.origin.column + column,
|
|
542
|
+
row: this.origin.row + row,
|
|
543
|
+
};
|
|
544
|
+
}
|
|
545
|
+
else {
|
|
546
|
+
yield { column, row };
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
//# sourceMappingURL=Roi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Roi.js","sourceRoot":"","sources":["../../src/roi/Roi.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AASnD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,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AI,QAAQ,EAAE,CAAC;wBACb,MAAM;4BACJ,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,MAAM;4BACnC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,GAAG;yBAC3B,CAAC;oBACJ,CAAC;yBAAM,CAAC;wBACN,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;oBACxB,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { Mask } from '../Mask.js';
|
|
2
|
+
import type { Roi } from './Roi.js';
|
|
3
|
+
import type { FromMaskOptions } from './fromMask.js';
|
|
4
|
+
import type { GetRoisOptions } from './getRois.js';
|
|
5
|
+
export interface RoiManager {
|
|
6
|
+
getRois(options: GetRoisOptions): Roi[];
|
|
7
|
+
}
|
|
8
|
+
export interface RoiMap {
|
|
9
|
+
/**
|
|
10
|
+
* Width of the map.
|
|
11
|
+
*/
|
|
12
|
+
width: number;
|
|
13
|
+
/**
|
|
14
|
+
* Height of the map.
|
|
15
|
+
*/
|
|
16
|
+
height: number;
|
|
17
|
+
/**
|
|
18
|
+
* Data of the ROIs. Each ROI is associated with a negative or a positive value,
|
|
19
|
+
* depending if it derives from a zone made of zeros or ones in the original mask.
|
|
20
|
+
*/
|
|
21
|
+
data: Int32Array;
|
|
22
|
+
/**
|
|
23
|
+
* Number of distinct positive values in the ROI map.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
nbPositive: number;
|
|
27
|
+
/**
|
|
28
|
+
* Number of distinct negative values in the ROI map.
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
nbNegative: number;
|
|
32
|
+
}
|
|
33
|
+
export declare class RoiMapManager implements RoiManager {
|
|
34
|
+
private map;
|
|
35
|
+
whiteRois: Roi[];
|
|
36
|
+
blackRois: Roi[];
|
|
37
|
+
constructor(map: RoiMap);
|
|
38
|
+
/**
|
|
39
|
+
* Return the ROI map of the RoiMapManager.
|
|
40
|
+
* @returns - The ROI map.
|
|
41
|
+
*/
|
|
42
|
+
getMap(): RoiMap;
|
|
43
|
+
/**
|
|
44
|
+
* Return the value at the given coordinates in an ROI map.
|
|
45
|
+
* @param column - Column of the value.
|
|
46
|
+
* @param row - Row of the value.
|
|
47
|
+
* @returns The value at the given coordinates.
|
|
48
|
+
*/
|
|
49
|
+
getMapValue(column: number, row: number): number;
|
|
50
|
+
/**
|
|
51
|
+
* Returns the ROI map as a correct width and height matrix.
|
|
52
|
+
* @returns The ROI map matrix.
|
|
53
|
+
*/
|
|
54
|
+
getMapMatrix(): number[][];
|
|
55
|
+
getRois(options?: GetRoisOptions): Roi[];
|
|
56
|
+
getRoiById(roiID: number): Roi;
|
|
57
|
+
static fromMask(mask: Mask, options?: FromMaskOptions): RoiMapManager;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=RoiMapManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RoiMapManager.d.ts","sourceRoot":"","sources":["../../src/roi/RoiMapManager.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAGnD,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,GAAG,EAAE,CAAC;CACzC;AAED,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,IAAI,EAAE,UAAU,CAAC;IACjB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AACD,qBAAa,aAAc,YAAW,UAAU;IAC9C,OAAO,CAAC,GAAG,CAAS;IACb,SAAS,EAAE,GAAG,EAAE,CAAC;IACjB,SAAS,EAAE,GAAG,EAAE,CAAC;gBAEL,GAAG,EAAE,MAAM;IAM9B;;;OAGG;IACI,MAAM,IAAI,MAAM;IAIvB;;;;;OAKG;IACI,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;IAI9C;;;OAGG;IACI,YAAY,IAAI,MAAM,EAAE,EAAE;IAQ1B,OAAO,CAAC,OAAO,GAAE,cAAmB,GAAG,GAAG,EAAE;IAI5C,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG;WASvB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,GAAE,eAAoB;CAGjE"}
|