Skip to content

Commit 49f7ec1

Browse files
committed
WIP: Opify imglib2-algorithm
This is a little tough because imglib2-algorithm currently requires imglib2 v7, which we haven't yet jumped to.
1 parent a991acf commit 49f7ec1

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

scijava-ops-image/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,8 @@
264264

265265
<!-- TEMP: Until pom-scijava 38.0.0 is released. -->
266266
<scijava-maven-plugin.version>3.0.0</scijava-maven-plugin.version>
267-
<imglib2-mesh.version>1.0.0</imglib2-mesh.version>
268-
<net.imglib2.imglib2-mesh.version>${imglib2-mesh.version}</net.imglib2.imglib2-mesh.version>
267+
<net.imglib2.imglib2-algorithm.version>0.15.4-SNAPSHOT</net.imglib2.imglib2-algorithm.version>
268+
<net.imglib2.imglib2-mesh.version>1.0.0</net.imglib2.imglib2-mesh.version>
269269
</properties>
270270

271271
<dependencies>

scijava-ops-image/src/test/java/org/scijava/ops/image/stats/StatisticsTest.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,16 +163,20 @@ public void testMin() {
163163

164164
@Test
165165
public void testMinAdapted() {
166-
final UnsignedByteType min = (UnsignedByteType) ops.op("stats.min").input(
167-
randomlyFilledImg).apply();
166+
final UnsignedByteType min = ops.op("stats.min") //
167+
.input(randomlyFilledImg) //
168+
.outType(UnsignedByteType.class) //
169+
.apply();
168170
Assertions.assertEquals(0, min.getRealDouble(), 0.00001d, "Min");
169171
}
170172

171173
@Test
172174
public void testMaxAdapted() {
173-
final UnsignedByteType min = (UnsignedByteType) ops.op("stats.max").input(
174-
randomlyFilledImg).apply();
175-
Assertions.assertEquals(254d, min.getRealDouble(), 0.00001d, "Max");
175+
final UnsignedByteType max = ops.op("stats.max") //
176+
.input(randomlyFilledImg) //
177+
.outType(UnsignedByteType.class) //
178+
.apply();
179+
Assertions.assertEquals(254d, max.getRealDouble(), 0.00001d, "Max");
176180
}
177181

178182
@Test

0 commit comments

Comments
 (0)