From 066c64f1ea6a9f91ae93a365584bf673aca415a3 Mon Sep 17 00:00:00 2001 From: tpietzsch Date: Fri, 5 Apr 2024 20:28:00 +0200 Subject: [PATCH 1/3] POM: Bump parent to pom-scijava-38.0.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 616d4af..7bde29a 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.scijava pom-scijava - 34.0.0 + 38.0.1 From 8addb6efd7d800860d938a8a4d2c2564ea0920e6 Mon Sep 17 00:00:00 2001 From: tpietzsch Date: Wed, 28 Aug 2024 14:00:02 +0200 Subject: [PATCH 2/3] POM: Bump dependency versions imglib2 -> 7.1.0 imglib2-realtransform -> 4.0.3 imglib2-roi -> 0.15.0 imglib2-cache -> 1.0.0-beta-18 imglib2-algorithm -> 0.15.3 imglib2-ij -> 2.0.2 --- pom.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pom.xml b/pom.xml index 7bde29a..0a1a7f0 100644 --- a/pom.xml +++ b/pom.xml @@ -85,6 +85,13 @@ gpl_v3 TrackMate developers. + 7.1.0 + 4.0.3 + 0.15.0 + 1.0.0-beta-18 + 0.15.3 + 2.0.2 + sign,deploy-to-scijava From 0477fcd18ae034265a9ab018e9a7115796887e88 Mon Sep 17 00:00:00 2001 From: tpietzsch Date: Fri, 5 Apr 2024 20:29:15 +0200 Subject: [PATCH 3/3] Adapt API changes introduced by https://github.com/imglib/imglib2-roi/pull/71 --- src/main/java/skeleton/Algorithms.java | 6 +++--- src/main/java/skeleton/Regions.java | 16 ++++++++-------- src/main/java/skeleton/Utils.java | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/java/skeleton/Algorithms.java b/src/main/java/skeleton/Algorithms.java index 233be0a..fe32042 100644 --- a/src/main/java/skeleton/Algorithms.java +++ b/src/main/java/skeleton/Algorithms.java @@ -202,7 +202,7 @@ public static Img createUnsignedByteTypeMaskFromLabelRegion( LabelRegion centralObjectRegion, long[] dimensions) { final Img centralObjectImg = ArrayImgs.unsignedBytes(dimensions); - final Cursor regionCursor = centralObjectRegion.cursor(); + final Cursor regionCursor = centralObjectRegion.inside().cursor(); final RandomAccess access = centralObjectImg.randomAccess(); while (regionCursor.hasNext()) { regionCursor.fwd(); @@ -215,7 +215,7 @@ public static Img createUnsignedByteTypeMaskFromLabelRegion( public static Img createMaskFromLabelRegion(LabelRegion region, long[] dimensions) { final Img centralObjectImg = ArrayImgs.bits(dimensions); - final Cursor regionCursor = region.cursor(); + final Cursor regionCursor = region.inside().cursor(); final RandomAccess access = centralObjectImg.randomAccess(); while (regionCursor.hasNext()) { regionCursor.fwd(); @@ -838,7 +838,7 @@ public static void drawWatershedIntoMask(RandomAccessibleInterval mask, int label, LabelRegions splitObjects) { final long[] regionOffset = Intervals.minAsLongArray(labelRegions.getLabelRegion(label)); LabelRegion watershed = splitObjects.getLabelRegion(-1); - final LabelRegionCursor cursor = watershed.cursor(); + final Cursor< Void > cursor = watershed.inside().cursor(); final RandomAccess maskRandomAccess = mask.randomAccess(); long[] position = new long[watershed.numDimensions()]; while (cursor.hasNext()) { diff --git a/src/main/java/skeleton/Regions.java b/src/main/java/skeleton/Regions.java index 25b2cbb..26d4d90 100644 --- a/src/main/java/skeleton/Regions.java +++ b/src/main/java/skeleton/Regions.java @@ -86,7 +86,7 @@ public static RandomAccessibleInterval asMask(LabelRegion labelRegion) rai = Transforms.getWithAdjustedOrigin(labelRegion, rai); final RandomAccess randomAccess = rai.randomAccess(); - final LabelRegionCursor cursor = labelRegion.cursor(); + final Cursor< Void > cursor = labelRegion.inside().cursor(); while (cursor.hasNext()) { cursor.fwd(); @@ -100,7 +100,7 @@ public static RandomAccessibleInterval asMask(LabelRegion labelRegion) public static void drawRegionInMask(LabelRegion labelRegion, RandomAccessibleInterval mask) { final RandomAccess maskAccess = mask.randomAccess(); - final LabelRegionCursor cursor = labelRegion.cursor(); + final Cursor< Void > cursor = labelRegion.inside().cursor(); while (cursor.hasNext()) { cursor.fwd(); @@ -111,7 +111,7 @@ public static void drawRegionInMask(LabelRegion labelRegion, RandomAccessibleInt public static long size(LabelRegion labelRegion) { - final LabelRegionCursor cursor = labelRegion.cursor(); + final Cursor< Void > cursor = labelRegion.inside().cursor(); long size = 0; while (cursor.hasNext()) { @@ -130,7 +130,7 @@ public static & NativeType> RandomAccessibleInterval imageRandomAccess = image.randomAccess(); final RandomAccess outputRandomAccess = output.randomAccess(); - final LabelRegionCursor cursor = labelRegion.cursor(); + final Cursor< Void > cursor = labelRegion.inside().cursor(); while (cursor.hasNext()) { cursor.fwd(); @@ -196,7 +196,7 @@ public static & NativeType> void onlyKeepLargestRegion private static & NativeType> void drawRegion(RandomAccessibleInterval img, LabelRegion labelRegion, double value) { - final Cursor regionCursor = labelRegion.cursor(); + final Cursor regionCursor = labelRegion.inside().cursor(); final RandomAccess access = img.randomAccess(); while (regionCursor.hasNext()) { regionCursor.fwd(); @@ -207,7 +207,7 @@ private static & NativeType> void drawRegion(RandomAcc private static & NativeType> void removeRegion(RandomAccessibleInterval img, LabelRegion labelRegion) { - final Cursor regionCursor = labelRegion.cursor(); + final Cursor regionCursor = labelRegion.inside().cursor(); final RandomAccess access = img.randomAccess(); while (regionCursor.hasNext()) { regionCursor.fwd(); @@ -272,7 +272,7 @@ public static RandomAccessibleInterval asMask(Set> final RandomAccess maskAccess = regionsMask.randomAccess(); for (LabelRegion region : regions) { - final Cursor regionCursor = region.cursor(); + final Cursor regionCursor = region.inside().cursor(); while (regionCursor.hasNext()) { regionCursor.fwd(); maskAccess.setPosition(regionCursor); @@ -291,7 +291,7 @@ public static RandomAccessibleInterval asMask(Set> final RandomAccess maskAccess = regionsMask.randomAccess(); for (LabelRegion region : regions) { - final Cursor regionCursor = region.cursor(); + final Cursor regionCursor = region.inside().cursor(); while (regionCursor.hasNext()) { regionCursor.fwd(); maskAccess.setPosition(regionCursor); diff --git a/src/main/java/skeleton/Utils.java b/src/main/java/skeleton/Utils.java index cf01add..d570763 100644 --- a/src/main/java/skeleton/Utils.java +++ b/src/main/java/skeleton/Utils.java @@ -789,7 +789,7 @@ private static Set getLabelSet(RandomAccessibleInterval img, LabelRegion labelRegion, int value) { - final Cursor regionCursor = labelRegion.cursor(); + final Cursor regionCursor = labelRegion.inside().cursor(); final RandomAccess access = img.randomAccess(); BitType bitTypeTrue = new BitType(true); while (regionCursor.hasNext()) {