settable WidthAndHeight maskSize; //new MultiSet labels; // default mask size { maskSize(g22defaultMaskSideLength()); } selfType maskSize(int size) { ret maskSize(widthAndHeight(size)); } Image2B regionToMaskImage(IImageRegion region) { ret g22standardRegionToMaskImage(region, maskSize()); } public L maskImages() { ret map(masks(), mask -> mask.image()); } BufferedImage masksSquare() { ret mergeBufferedImagesAsSquare(allToBufferedImage(maskImages())); } PatchworkImage masksPatchworkSquare() { ret patchworkImagesAsSquare(map(masks(), mask -> pair(toBufferedImage(mask.image()), mask))); } toString { ret renderVars(shortClassName(this), +maskSize, masks := n2(masks())); } simplyCached public G22GhostImage ghost() { ret new G22GhostImage(maskImages()); } simplyCached public double certainty() { ret ghost().certainty(); }