-
Notifications
You must be signed in to change notification settings - Fork 278
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test (stackSegmantation): circular scissor, threshold and dynamic thr…
…eshold tools (#1401) * test (stackSegmantation): circular scissor, threshold and dynamic threshold tools * test (stackSegmantation): circular scissor, threshold and dynamic threshold tools (screenshots)
- Loading branch information
Showing
12 changed files
with
215 additions
and
53 deletions.
There are no files selected for viewing
Binary file added
BIN
+68.9 KB
...screenshots/chromium/stackSegmentation.spec.ts/circularScissorSegmentation1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+71.2 KB
...screenshots/chromium/stackSegmentation.spec.ts/circularScissorSegmentation2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+70.6 KB
...enshots/chromium/stackSegmentation.spec.ts/dynamicThresholdConfirmedContour.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+70.8 KB
...shots/chromium/stackSegmentation.spec.ts/dynamicThresholdHighlightedContour.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+70.4 KB
...chromium/stackSegmentation.spec.ts/dynamicThresholdInitialHighlightedPixels.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+69.9 KB
tests/screenshots/chromium/stackSegmentation.spec.ts/thresholdBrushSegment1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
export default async function locatorToPageCoord( | ||
page, | ||
locator, | ||
point: number[] | ||
) { | ||
const bbox = await locator.boundingBox(); | ||
import locatorToPageCoords from './locatorToPageCoords'; | ||
|
||
return [bbox.x + point[0], bbox.y + point[1]]; | ||
export default async function locatorToPageCoord(locator, point: number[]) { | ||
const pagePoints = await locatorToPageCoords(locator, [point]); | ||
|
||
return pagePoints[0]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* Convert a point from locator space (eg: canvas) to page space. | ||
* These points are used frequently by `page.mouse` methods. | ||
* | ||
* Do not call `locatorToPageCoord` that converts one point at a time when | ||
* converting multiple points because `locator.boundingBox()` add an extra ~10ms | ||
* to each call. | ||
* | ||
* @param locator - An element returned by `page.locator()` | ||
* @param points - Array of poins in locator space to be converted to page space | ||
* @returns Array of points in page space | ||
*/ | ||
export default async function locatorToPageCoords(locator, points: number[][]) { | ||
const bbox = await locator.boundingBox(); | ||
|
||
return points.map((point) => [bbox.x + point[0], bbox.y + point[1]]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.