// keeps a set of "masks" (remembered shapes) with labels // simple version without hashes or trees // A is the user object associated with each mask (aka a "label") sclass G22SimpleMasksHolder { record noeq Mask(Image2B image, A label) { Image2B image() { ret image; } } gettable new L masks; void addRegion(IImageRegion region, A label) { masks.add(new Mask(regionToMaskImage(region), label)); ghost_cache = null; certainty_cache = null; labels.add(label); } !include early #1035854 // Masks holder Include }