File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
src/main/java/ai/nets/samj/annotation Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 2222import java .awt .Polygon ;
2323import java .util .Arrays ;
2424import java .util .List ;
25+ import java .util .Objects ;
26+ import java .util .UUID ;
2527
2628import net .imglib2 .RandomAccessibleInterval ;
2729import net .imglib2 .img .array .ArrayImgs ;
@@ -37,6 +39,10 @@ public class Mask {
3739
3840 private final Polygon contour ;
3941
42+ private String name ;
43+
44+ private final String uuid = UUID .randomUUID ().toString ();
45+
4046 // TODO private final long[] rleEncoding;
4147 public long [] rleEncoding ;
4248
@@ -49,6 +55,19 @@ public static Mask build(Polygon contour, long[] rleEncoding) {
4955 return new Mask (contour , rleEncoding );
5056 }
5157
58+ public String getName () {
59+ return name ;
60+ }
61+
62+ public void setName (String name ) {
63+ Objects .requireNonNull (name , "argument 'name' cannot be null" );
64+ this .name = name ;
65+ }
66+
67+ public String getUUID () {
68+ return uuid ;
69+ }
70+
5271 public Polygon getContour () {
5372 return this .contour ;
5473 }
You can’t perform that action at this time.
0 commit comments