Skip to content

Commit 2980909

Browse files
ctruedengselzer
authored andcommitted
WIP: Reconcile with underlying framework changes
The ItemIO attribute changed from type to itemIO. The new framework exposes some errors in ItemIO typing. There are still some remaining issues, but it is close. This will probably need to be squashed, along with all commits of this branch starting at the TEMP imagej-ops dependency commit, into one single monster patch. We will then apply this patch to the imagej-ops codebase itself, adding scijava-ops 0.1.0 as a dependency there.
1 parent 4c8db14 commit 2980909

329 files changed

Lines changed: 727 additions & 727 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.

src/main/java/net/imagej/ops/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", type = ItemIO.OUTPUT)
60+
@Parameter(key = "output", itemIO = ItemIO.OUTPUT)
6161
public class LiICQ<T extends RealType<T>, U extends RealType<U>, V extends RealType<V>>
6262
implements Function4<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", type = ItemIO.OUTPUT)
125+
@Parameter(key = "output", itemIO = ItemIO.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

src/main/java/net/imagej/ops/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", type = ItemIO.OUTPUT)
81+
@Parameter(key = "output", itemIO = ItemIO.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

src/main/java/net/imagej/ops/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", type = ItemIO.OUTPUT)
74+
@Parameter(key = "output", itemIO = ItemIO.OUTPUT)
7575
public class MTKT<T extends RealType<T>, U extends RealType<U>>
7676
implements Function3<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", type = ItemIO.OUTPUT)
253+
@Parameter(key = "output", itemIO = ItemIO.OUTPUT)
254254
class MTKTSimple<T extends RealType<T>, U extends RealType<U>>
255255
implements BiFunction<RandomAccessibleInterval<T>, RandomAccessibleInterval<U>, Double>
256256
{

src/main/java/net/imagej/ops/coloc/pValue/DefaultPValue.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
@Parameter(key = "psfSize")
7474
@Parameter(key = "seed")
7575
@Parameter(key = "executorService")
76-
@Parameter(key = "output", type = ItemIO.BOTH)
76+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
7777
public class DefaultPValue<T extends RealType<T>, U extends RealType<U>> implements
7878
Computer7<RandomAccessibleInterval<T>, RandomAccessibleInterval<U>, BiFunction<Iterable<T>, Iterable<U>, Double>, Integer, Dimensions, Long, ExecutorService, PValueResult> {
7979

@@ -201,7 +201,7 @@ private static <V> RandomAccessibleInterval<V> trim(final RandomAccessibleInterv
201201
@Parameter(key = "op")
202202
@Parameter(key = "nrRandomizations")
203203
@Parameter(key = "executorService")
204-
@Parameter(key = "output", type = ItemIO.BOTH)
204+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
205205
class PValueSimpleWithRandomizations<T extends RealType<T>, U extends RealType<U>> implements
206206
Computer5<RandomAccessibleInterval<T>, RandomAccessibleInterval<U>, BiFunction<Iterable<T>, Iterable<U>, Double>, Integer, ExecutorService, PValueResult> {
207207

@@ -223,7 +223,7 @@ public void compute(RandomAccessibleInterval<T> in1, RandomAccessibleInterval<U>
223223
@Parameter(key = "image2")
224224
@Parameter(key = "op")
225225
@Parameter(key = "executorService")
226-
@Parameter(key = "output", type = ItemIO.BOTH)
226+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
227227
class PValueSimple<T extends RealType<T>, U extends RealType<U>> implements
228228
Computer4<RandomAccessibleInterval<T>, RandomAccessibleInterval<U>, BiFunction<Iterable<T>, Iterable<U>, Double>, ExecutorService, PValueResult> {
229229

src/main/java/net/imagej/ops/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", type = ItemIO.OUTPUT)
52+
@Parameter(key = "output", itemIO = ItemIO.OUTPUT)
5353
public class DefaultPearsons<T extends RealType<T>, U extends RealType<U>> implements
5454
BiFunction<Iterable<T>, Iterable<U>, Double>
5555
{

src/main/java/net/imagej/ops/convert/ConvertTypes.java

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -68,117 +68,117 @@ public final class ConvertTypes<C extends ComplexType<C>, T extends IntegerType<
6868

6969
@OpField(names = "convert.bit")
7070
@Parameter(key = "input")
71-
@Parameter(key = "output", type = ItemIO.BOTH)
71+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
7272
public final Computer<C, BitType> complexToBit = (input, output) -> output.set(input.getRealDouble() != 0);
7373

7474
@OpField(names = "convert.bit")
7575
@Parameter(key = "input")
76-
@Parameter(key = "output", type = ItemIO.BOTH)
76+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
7777
public final Computer<T, BitType> integerToBit = (input, output) -> output.set(input.getIntegerLong() != 0);
7878

7979
@OpField(names = "convert.uint2")
8080
@Parameter(key = "input")
81-
@Parameter(key = "output", type = ItemIO.BOTH)
81+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
8282
public final Computer<C, Unsigned2BitType> complexToUint2 = (input, output) -> output.set((long) input.getRealDouble());
8383

8484
@OpField(names = "convert.uint2")
8585
@Parameter(key = "input")
86-
@Parameter(key = "output", type = ItemIO.BOTH)
86+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
8787
public final Computer<T, Unsigned2BitType> integerToUint2 = (input, output) -> output.set(input.getIntegerLong());
8888

8989
@OpField(names = "convert.uint4")
9090
@Parameter(key = "input")
91-
@Parameter(key = "output", type = ItemIO.BOTH)
91+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
9292
public final Computer<C, Unsigned4BitType> complexToUint4 = (input, output) -> output.set((long) input.getRealDouble());
9393

9494
@OpField(names = "convert.uint4")
9595
@Parameter(key = "input")
96-
@Parameter(key = "output", type = ItemIO.BOTH)
96+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
9797
public final Computer<T, Unsigned4BitType> integerToUint4 = (input, output) -> output.set(input.getIntegerLong());
9898

9999
@OpField(names = "convert.byte")
100100
@Parameter(key = "input")
101-
@Parameter(key = "output", type = ItemIO.BOTH)
101+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
102102
public final Computer<C, ByteType> complexToInt8 = (input, output) -> output.set((byte) input.getRealDouble());
103103

104104
@OpField(names = "convert.byte")
105105
@Parameter(key = "input")
106-
@Parameter(key = "output", type = ItemIO.BOTH)
106+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
107107
public final Computer<T, ByteType> integerToInt8 = (input, output) -> output.set((byte) input.getIntegerLong());
108108

109109
@OpField(names = "convert.uint8")
110110
@Parameter(key = "input")
111-
@Parameter(key = "output", type = ItemIO.BOTH)
111+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
112112
public final Computer<C, UnsignedByteType> complexToUint8 = (input, output) -> output.set((int) input.getRealDouble());
113113

114114
@OpField(names = "convert.uint8")
115115
@Parameter(key = "input")
116-
@Parameter(key = "output", type = ItemIO.BOTH)
116+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
117117
public final Computer<T, UnsignedByteType> integerToUint8 = (input, output) -> output.set(input.getInteger());
118118

119119
@OpField(names = "convert.uint12")
120120
@Parameter(key = "input")
121-
@Parameter(key = "output", type = ItemIO.BOTH)
121+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
122122
public final Computer<C, Unsigned12BitType> complexToUint12 = (input, output) -> output.set((long) input.getRealDouble());
123123

124124
@OpField(names = "convert.uint12")
125125
@Parameter(key = "input")
126-
@Parameter(key = "output", type = ItemIO.BOTH)
126+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
127127
public final Computer<T, Unsigned12BitType> integerToUint12 = (input, output) -> output.set(input.getIntegerLong());
128128

129129
@OpField(names = "convert.int16")
130130
@Parameter(key = "input")
131-
@Parameter(key = "output", type = ItemIO.BOTH)
131+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
132132
public final Computer<C, ShortType> complexToInt16 = (input, output) -> output.set((short) input.getRealDouble());
133133

134134
@OpField(names = "convert.int16")
135135
@Parameter(key = "input")
136-
@Parameter(key = "output", type = ItemIO.BOTH)
136+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
137137
public final Computer<T, ShortType> integerToInt16 = (input, output) -> output.set((short) input.getIntegerLong());
138138

139139
@OpField(names = "convert.uint16")
140140
@Parameter(key = "input")
141-
@Parameter(key = "output", type = ItemIO.BOTH)
141+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
142142
public final Computer<C, UnsignedShortType> complexToUint16 = (input, output) -> output.set((int) input.getRealDouble());
143143

144144
@OpField(names = "convert.uint16")
145145
@Parameter(key = "input")
146-
@Parameter(key = "output", type = ItemIO.BOTH)
146+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
147147
public final Computer<T, UnsignedShortType> integerToUint16 = (input, output) -> output.set(input.getInteger());
148148

149149
@OpField(names = "convert.int32")
150150
@Parameter(key = "input")
151-
@Parameter(key = "output", type = ItemIO.BOTH)
151+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
152152
public final Computer<C, IntType> complexToInt32 = (input, output) -> output.set((int) input.getRealDouble());
153153

154154
@OpField(names = "convert.int32")
155155
@Parameter(key = "input")
156-
@Parameter(key = "output", type = ItemIO.BOTH)
156+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
157157
public final Computer<T, IntType> integerToInt32 = (input, output) -> output.set(input.getInteger());
158158

159159
@OpField(names = "convert.uint32")
160160
@Parameter(key = "input")
161-
@Parameter(key = "output", type = ItemIO.BOTH)
161+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
162162
public final Computer<C, UnsignedIntType> complexToUint32 = (input, output) -> output.set((long) input.getRealDouble());
163163

164164
@OpField(names = "convert.uint32")
165165
@Parameter(key = "input")
166-
@Parameter(key = "output", type = ItemIO.BOTH)
166+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
167167
public final Computer<T, UnsignedIntType> integerToUint32 = (input, output) -> output.set(input.getIntegerLong());
168168

169169
@OpField(names = "convert.int64")
170170
@Parameter(key = "input")
171-
@Parameter(key = "output", type = ItemIO.BOTH)
171+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
172172
public final Computer<C, LongType> complexToInt64 = (input, output) -> output.set((long) input.getRealDouble());
173173

174174
@OpField(names = "convert.int64")
175175
@Parameter(key = "input")
176-
@Parameter(key = "output", type = ItemIO.BOTH)
176+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
177177
public final Computer<T, LongType> integerToInt64 = (input, output) -> output.set(input.getIntegerLong());
178178

179179
@OpField(names = "convert.uint64")
180180
@Parameter(key = "input")
181-
@Parameter(key = "output", type = ItemIO.BOTH)
181+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
182182
public final Computer<C, UnsignedLongType> complexToUint64 = (input, output) -> {
183183
final BigDecimal bd = BigDecimal.valueOf(input.getRealDouble());
184184
final BigDecimal r = bd.remainder(BigDecimal.ONE);
@@ -191,7 +191,7 @@ public final class ConvertTypes<C extends ComplexType<C>, T extends IntegerType<
191191

192192
@OpField(names = "convert.uint128")
193193
@Parameter(key = "input")
194-
@Parameter(key = "output", type = ItemIO.BOTH)
194+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
195195
public final Computer<C, Unsigned128BitType> complexToUint128 = (input, output) -> {
196196
final BigDecimal bd = BigDecimal.valueOf(input.getRealDouble());
197197
final BigDecimal r = bd.remainder(BigDecimal.ONE);
@@ -204,28 +204,28 @@ public final class ConvertTypes<C extends ComplexType<C>, T extends IntegerType<
204204

205205
@OpField(names = "convert.uint128")
206206
@Parameter(key = "input")
207-
@Parameter(key = "output", type = ItemIO.BOTH)
207+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
208208
public final Computer<T, Unsigned128BitType> integerToUint128 = (input, output) -> output.set(input.getBigInteger());
209209

210210
@OpField(names = "convert.float32")
211211
@Parameter(key = "input")
212-
@Parameter(key = "output", type = ItemIO.BOTH)
212+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
213213
public final Computer<C, FloatType> complexToFloat32 = (input, output) -> output.set(input.getRealFloat());
214214

215215
@OpField(names = "convert.cfloat32")
216216
@Parameter(key = "input")
217-
@Parameter(key = "output", type = ItemIO.BOTH)
217+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
218218
public final Computer<C, ComplexFloatType> complexToCfloat32 = (input, output) -> output.set(input.getRealFloat(),
219219
input.getImaginaryFloat());
220220

221221
@OpField(names = "convert.float64")
222222
@Parameter(key = "input")
223-
@Parameter(key = "output", type = ItemIO.BOTH)
223+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
224224
public final Computer<C, DoubleType> complexToFloat64 = (input, output) -> output.set(input.getRealDouble());
225225

226226
@OpField(names = "convert.cfloat64")
227227
@Parameter(key = "input")
228-
@Parameter(key = "output", type = ItemIO.BOTH)
228+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
229229
public final Computer<C, ComplexDoubleType> complexToCfloat64 = (input, output) -> output.set(input.getRealDouble(),
230230
input.getImaginaryDouble());
231231
}

src/main/java/net/imagej/ops/convert/Converters.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ public class Converters<I, O extends Type<O>> {
1919
@Parameter(key = "inputII")
2020
@Parameter(key = "converter")
2121
@Parameter(key = "outputType")
22-
@Parameter(key = "outputII", type = ItemIO.OUTPUT)
22+
@Parameter(key = "outputII", itemIO = ItemIO.OUTPUT)
2323
public final Function3<RandomAccessible<I>, Converter<? super I, ? super O>, O, RandomAccessible<O>> generalConverterRA = (
2424
inputRA, converter, type) -> net.imglib2.converter.Converters.convert(inputRA, converter, type);
2525

2626
@OpField(names = "convert")
2727
@Parameter(key = "inputII")
2828
@Parameter(key = "converter")
2929
@Parameter(key = "outputType")
30-
@Parameter(key = "outputII", type = ItemIO.OUTPUT)
30+
@Parameter(key = "outputII", itemIO = ItemIO.OUTPUT)
3131
public final Function3<IterableInterval<I>, Converter<? super I, ? super O>, O, IterableInterval<O>> generalConverterII = (
3232
inputII, converter, type) -> net.imglib2.converter.Converters.convert(inputII, converter, type);
3333

src/main/java/net/imagej/ops/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", type = ItemIO.BOTH)
48+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
4949
public class ClipRealTypes<I extends RealType<I>, O extends RealType<O>>
5050
implements Computer<I, O>
5151
{

src/main/java/net/imagej/ops/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", type = ItemIO.BOTH)
48+
@Parameter(key = "output", itemIO = ItemIO.BOTH)
4949
public class CopyRealTypes<I extends RealType<I>, O extends RealType<O>>
5050
implements Computer<I, O>
5151
{

src/main/java/net/imagej/ops/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", type = ItemIO.BOTH)
56+
@Parameter(key = "copy", itemIO = ItemIO.BOTH)
5757
public class CopyArrayImg<T extends NativeType<T>, A extends ArrayDataAccess<A>>
5858
implements Computer<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", type = ItemIO.OUTPUT)
73+
@Parameter(key = "copy", itemIO = ItemIO.OUTPUT)
7474
class CopyArrayImgFunction<T extends NativeType<T>, A extends ArrayDataAccess<A>>
7575
implements Function<ArrayImg<T, A>, ArrayImg<T, A>> {
7676

0 commit comments

Comments
 (0)