Skip to content

Commit 8c9fff5

Browse files
authored
Merge pull request #27 from scijava/scijava/scijava-ops/container-iotype
Introduce separate Container concept for computer outputs
2 parents 854288f + 5ec415e commit 8c9fff5

353 files changed

Lines changed: 608 additions & 598 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎imagej/imagej-ops2/src/main/java/net/imagej/ops2/coloc/icq/LiICQ.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
@Parameter(key = "image2")
5858
@Parameter(key = "mean1")
5959
@Parameter(key = "mean2")
60-
@Parameter(key = "output", itemIO = ItemIO.OUTPUT)
60+
@Parameter(key = "output")
6161
public class LiICQ<T extends RealType<T>, U extends RealType<U>, V extends RealType<V>>
6262
implements Functions.Arity4<Iterable<T>, Iterable<U>, DoubleType, DoubleType, Double> {
6363

@@ -122,7 +122,7 @@ private double computeMeanUOf(final Iterable<U> in) {
122122
@Plugin(type = Op.class, name = "coloc.icq")
123123
@Parameter(key = "image1")
124124
@Parameter(key = "image2")
125-
@Parameter(key = "output", itemIO = ItemIO.OUTPUT)
125+
@Parameter(key = "output")
126126
class LiICQSimple<T extends RealType<T>, U extends RealType<U>, V extends RealType<V>>
127127
implements BiFunction<Iterable<T>, Iterable<U>, Double> {
128128

‎imagej/imagej-ops2/src/main/java/net/imagej/ops2/coloc/kendallTau/KendallTauBRank.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
@Plugin(type = Op.class, name = "coloc.kendallTau")
7979
@Parameter(key = "image1")
8080
@Parameter(key = "image2")
81-
@Parameter(key = "output", itemIO = ItemIO.OUTPUT)
81+
@Parameter(key = "output")
8282
public class KendallTauBRank<T extends RealType<T>, U extends RealType<U>>
8383
/* extends Algorithm<T> */ implements BiFunction<Iterable<T>, Iterable<U>, Double> {
8484

‎imagej/imagej-ops2/src/main/java/net/imagej/ops2/coloc/maxTKendallTau/MTKT.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
@Parameter(key = "image1")
7272
@Parameter(key = "image2")
7373
@Parameter(key = "seed")
74-
@Parameter(key = "output", itemIO = ItemIO.OUTPUT)
74+
@Parameter(key = "output")
7575
public class MTKT<T extends RealType<T>, U extends RealType<U>>
7676
implements Functions.Arity3<RandomAccessibleInterval<T>, RandomAccessibleInterval<U>, Long, Double>
7777
{
@@ -250,7 +250,7 @@ static double calculateKendallTau(final double[][] rank,
250250
@Plugin(type = Op.class, name = "coloc.maxTKendallTau")
251251
@Parameter(key = "image1")
252252
@Parameter(key = "image2")
253-
@Parameter(key = "output", itemIO = ItemIO.OUTPUT)
253+
@Parameter(key = "output")
254254
class MTKTSimple<T extends RealType<T>, U extends RealType<U>>
255255
implements BiFunction<RandomAccessibleInterval<T>, RandomAccessibleInterval<U>, Double>
256256
{

‎imagej/imagej-ops2/src/main/java/net/imagej/ops2/coloc/pValue/DefaultPValue.java‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
import org.scijava.ops.OpDependency;
5151
import org.scijava.ops.core.Op;
5252
import org.scijava.ops.function.Computers;
53-
import org.scijava.param.Mutable;
5453
import org.scijava.param.Parameter;
5554
import org.scijava.plugin.Plugin;
5655
import org.scijava.struct.ItemIO;
@@ -70,7 +69,7 @@
7069
@Parameter(key = "psfSize")
7170
@Parameter(key = "seed")
7271
@Parameter(key = "executorService")
73-
@Parameter(key = "output", itemIO = ItemIO.BOTH)
72+
@Parameter(key = "output")
7473
public class DefaultPValue<T extends RealType<T>, U extends RealType<U>> implements
7574
Computers.Arity7<RandomAccessibleInterval<T>, RandomAccessibleInterval<U>, BiFunction<RandomAccessibleInterval<T>, RandomAccessibleInterval<U>, Double>, Integer, Dimensions, Long, ExecutorService, PValueResult> {
7675

@@ -197,7 +196,7 @@ private static <V> RandomAccessibleInterval<V> trim(final RandomAccessibleInterv
197196
@Parameter(key = "op")
198197
@Parameter(key = "nrRandomizations")
199198
@Parameter(key = "executorService")
200-
@Parameter(key = "output", itemIO = ItemIO.BOTH)
199+
@Parameter(key = "output")
201200
class PValueSimpleWithRandomizations<T extends RealType<T>, U extends RealType<U>> implements
202201
Computers.Arity5<RandomAccessibleInterval<T>, RandomAccessibleInterval<U>, BiFunction<RandomAccessibleInterval<T>, RandomAccessibleInterval<U>, Double>, Integer, ExecutorService, PValueResult> {
203202

@@ -207,7 +206,7 @@ class PValueSimpleWithRandomizations<T extends RealType<T>, U extends RealType<U
207206
@Override
208207
public void compute(RandomAccessibleInterval<T> in1, RandomAccessibleInterval<U> in2,
209208
BiFunction<RandomAccessibleInterval<T>, RandomAccessibleInterval<U>, Double> in3, Integer in4,
210-
ExecutorService in5, @Mutable PValueResult out) {
209+
ExecutorService in5, PValueResult out) {
211210
Long defaultSeed = 0x27372034l;
212211
pValueOp.compute(in1, in2, in3, in4, null, defaultSeed, in5, out);
213212
}
@@ -219,7 +218,7 @@ public void compute(RandomAccessibleInterval<T> in1, RandomAccessibleInterval<U>
219218
@Parameter(key = "image2")
220219
@Parameter(key = "op")
221220
@Parameter(key = "executorService")
222-
@Parameter(key = "output", itemIO = ItemIO.BOTH)
221+
@Parameter(key = "output")
223222
class PValueSimple<T extends RealType<T>, U extends RealType<U>> implements
224223
Computers.Arity4<RandomAccessibleInterval<T>, RandomAccessibleInterval<U>, BiFunction<RandomAccessibleInterval<T>, RandomAccessibleInterval<U>, Double>, ExecutorService, PValueResult> {
225224

@@ -229,7 +228,7 @@ class PValueSimple<T extends RealType<T>, U extends RealType<U>> implements
229228
@Override
230229
public void compute(RandomAccessibleInterval<T> in1, RandomAccessibleInterval<U> in2,
231230
BiFunction<RandomAccessibleInterval<T>, RandomAccessibleInterval<U>, Double> in3, ExecutorService in4,
232-
@Mutable PValueResult out) {
231+
PValueResult out) {
233232
Integer defaultNumberRandomizations = 100;
234233
pValueOp.compute(in1, in2, in3, defaultNumberRandomizations, in4, out);
235234
}

‎imagej/imagej-ops2/src/main/java/net/imagej/ops2/coloc/pearsons/DefaultPearsons.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
@Plugin(type = Op.class, name = "coloc.pearsons")
5050
@Parameter(key = "image1")
5151
@Parameter(key = "image2")
52-
@Parameter(key = "output", itemIO = ItemIO.OUTPUT)
52+
@Parameter(key = "output")
5353
public class DefaultPearsons<T extends RealType<T>, U extends RealType<U>> implements
5454
BiFunction<Iterable<T>, Iterable<U>, Double>
5555
{

‎imagej/imagej-ops2/src/main/java/net/imagej/ops2/convert/clip/ClipRealTypes.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
*/
4646
@Plugin(type = Op.class, name = "convert.clip")
4747
@Parameter(key = "input")
48-
@Parameter(key = "output", itemIO = ItemIO.BOTH)
48+
@Parameter(key = "output")
4949
public class ClipRealTypes<I extends RealType<I>, O extends RealType<O>>
5050
implements Computers.Arity1<I, O>
5151
{

‎imagej/imagej-ops2/src/main/java/net/imagej/ops2/convert/copy/CopyRealTypes.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
*/
4646
@Plugin(type = Op.class, name = "convert.copy")
4747
@Parameter(key = "input")
48-
@Parameter(key = "output", itemIO = ItemIO.BOTH)
48+
@Parameter(key = "output")
4949
public class CopyRealTypes<I extends RealType<I>, O extends RealType<O>>
5050
implements Computers.Arity1<I, O>
5151
{

‎imagej/imagej-ops2/src/main/java/net/imagej/ops2/copy/CopyArrayImg.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
*/
5454
@Plugin(type = Op.class, name = "copy, copy.img", priority = Priority.VERY_HIGH)
5555
@Parameter(key = "input")
56-
@Parameter(key = "copy", itemIO = ItemIO.BOTH)
56+
@Parameter(key = "copy")
5757
public class CopyArrayImg<T extends NativeType<T>, A extends ArrayDataAccess<A>>
5858
implements Computers.Arity1<ArrayImg<T, A>, ArrayImg<T, A>> {
5959
@Override
@@ -70,7 +70,7 @@ public void compute(final ArrayImg<T, A> input, final ArrayImg<T, A> output) {
7070

7171
@Plugin(type = Op.class, name = "copy, copy.img", priority = Priority.VERY_HIGH)
7272
@Parameter(key = "input")
73-
@Parameter(key = "copy", itemIO = ItemIO.OUTPUT)
73+
@Parameter(key = "copy")
7474
class CopyArrayImgFunction<T extends NativeType<T>, A extends ArrayDataAccess<A>>
7575
implements Function<ArrayImg<T, A>, ArrayImg<T, A>> {
7676

‎imagej/imagej-ops2/src/main/java/net/imagej/ops2/copy/CopyII.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
*/
5252
@Plugin(type = Op.class, name = "copy, copy.iterableInterval", priority = 1.0)
5353
@Parameter(key = "input")
54-
@Parameter(key = "output", itemIO = ItemIO.BOTH)
54+
@Parameter(key = "output")
5555
public class CopyII<T> implements Computers.Arity1<IterableInterval<T>, IterableInterval<T>> {
5656

5757
// used internally
@@ -70,7 +70,7 @@ public void compute(final IterableInterval<T> input, final IterableInterval<T> o
7070

7171
@Plugin(type = Op.class, name = "copy, copy.iterableInterval", priority = 1.0)
7272
@Parameter(key = "input")
73-
@Parameter(key = "output", itemIO = ItemIO.OUTPUT)
73+
@Parameter(key = "output")
7474
class CopyIIFunction<T> implements Function<IterableInterval<T>, IterableInterval<T>> {
7575

7676
@OpDependency(name = "create.img")

‎imagej/imagej-ops2/src/main/java/net/imagej/ops2/copy/CopyImg.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
*/
5151
@Plugin(type = Op.class, name = "copy, copy.img")
5252
@Parameter(key = "input")
53-
@Parameter(key = "output", itemIO = ItemIO.BOTH)
53+
@Parameter(key = "output")
5454
public class CopyImg<T extends NativeType<T>> implements Computers.Arity1<Img<T>, Img<T>> {
5555

5656
@OpDependency(name = "copy.iterableInterval")
@@ -66,7 +66,7 @@ public void compute(final Img<T> input, final Img<T> output) {
6666

6767
@Plugin(type = Op.class, name = "copy, copy.img")
6868
@Parameter(key = "input")
69-
@Parameter(key = "output", itemIO = ItemIO.OUTPUT)
69+
@Parameter(key = "output")
7070
class CopyImgFunction<T extends NativeType<T>> implements Function<Img<T>, Img<T>> {
7171

7272
@OpDependency(name = "copy.img")

0 commit comments

Comments
 (0)