From 2fc86c55c2f5c85c64be168e9f2029fa9e8b5914 Mon Sep 17 00:00:00 2001 From: tpietzsch Date: Fri, 5 Apr 2024 22:06:12 +0200 Subject: [PATCH] Add missing getType() implementations --- src/main/java/sc/fiji/labkit/ui/labeling/Labeling.java | 6 ++++++ .../labkit/ui/utils/sparse/SparseRandomAccessIntType.java | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/main/java/sc/fiji/labkit/ui/labeling/Labeling.java b/src/main/java/sc/fiji/labkit/ui/labeling/Labeling.java index 73b9b3e5..af97f957 100644 --- a/src/main/java/sc/fiji/labkit/ui/labeling/Labeling.java +++ b/src/main/java/sc/fiji/labkit/ui/labeling/Labeling.java @@ -303,6 +303,12 @@ public void setLabelOrder(Comparator comparator) { labels.sort(comparator); } + @Override + public LabelingType< Label > getType() + { + return randomAccess().getType(); + } + public static class SetEntryAsBitType extends BitType { private Set set = null; diff --git a/src/main/java/sc/fiji/labkit/ui/utils/sparse/SparseRandomAccessIntType.java b/src/main/java/sc/fiji/labkit/ui/utils/sparse/SparseRandomAccessIntType.java index 967103fd..087b86cf 100644 --- a/src/main/java/sc/fiji/labkit/ui/utils/sparse/SparseRandomAccessIntType.java +++ b/src/main/java/sc/fiji/labkit/ui/utils/sparse/SparseRandomAccessIntType.java @@ -124,6 +124,12 @@ private void set(MyRandomAccess position, int value) { } } + @Override + public IntType getType() + { + return new IntType(); + } + // -- Helper classes -- private class MyRandomAccess extends Point implements RandomAccess {