1 | settable WidthAndHeight maskSize; |
2 | //new MultiSet<A> labels; |
3 | |
4 | // default mask size |
5 | { maskSize(g22defaultMaskSideLength()); } |
6 | |
7 | selfType maskSize(int size) { |
8 | ret maskSize(widthAndHeight(size)); |
9 | } |
10 | |
11 | Image2B regionToMaskImage(IImageRegion region) { |
12 | ret g22standardRegionToMaskImage(region, maskSize()); |
13 | } |
14 | |
15 | public L<Image2B> maskImages() { |
16 | ret map(masks(), mask -> mask.image()); |
17 | } |
18 | |
19 | BufferedImage masksSquare() { |
20 | ret mergeBufferedImagesAsSquare(allToBufferedImage(maskImages())); |
21 | } |
22 | |
23 | PatchworkImage<Mask> masksPatchworkSquare() { |
24 | ret patchworkImagesAsSquare(map(masks(), mask -> pair(toBufferedImage(mask.image()), mask))); |
25 | } |
26 | |
27 | toString { |
28 | ret renderVars(shortClassName(this), +maskSize, masks := n2(masks())); |
29 | } |
30 | |
31 | simplyCached public G22GhostImage ghost() { |
32 | ret new G22GhostImage(maskImages()); |
33 | } |
34 | |
35 | simplyCached public double certainty() { |
36 | ret ghost().certainty(); |
37 | } |
Began life as a copy of #1035850
download show line numbers debug dex old transpilations
Travelled to 2 computer(s): mqqgnosmbjvj, wnsclhtenguj
No comments. add comment
Snippet ID: | #1035854 |
Snippet name: | Masks holder Include |
Eternal ID of this version: | #1035854/17 |
Text MD5: | aa9e0bda2acca668d0756ef403158630 |
Author: | stefan |
Category: | javax |
Type: | JavaX (incomplete) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-09-05 01:04:02 |
Source code size: | 979 bytes / 37 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 158 / 276 |
Version history: | 16 change(s) |
Referenced in: | [show references] |