Skip to content

Commit 8ca05b7

Browse files
committed
Remove bogus createOutput() calls
We cannot call createOutput from conforms, because the ops in question have not yet been initialized, so the imgCreator helper is still null.
1 parent 8c32693 commit 8ca05b7

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/main/java/net/imagej/ops/morphology/dilate/DefaultDilate.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ public class DefaultDilate<T extends RealType<T>> extends
8585
@Override
8686
public boolean conforms() {
8787
if (in1() == null || in2() == null || out() == null) return true;
88-
if (isFull) return createOutput(in()).iterationOrder().equals(out());
89-
return Maps.compatible(in(), out());
88+
return isFull || Maps.compatible(in(), out());
9089
}
9190

9291
@SuppressWarnings({ "rawtypes", "unchecked" })

src/main/java/net/imagej/ops/morphology/dilate/ListDilate.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333

3434
import net.imagej.ops.Contingent;
3535
import net.imagej.ops.Ops;
36+
import net.imagej.ops.map.Maps;
3637
import net.imagej.ops.morphology.Morphologies;
3738
import net.imagej.ops.special.computer.BinaryComputerOp;
3839
import net.imagej.ops.special.computer.Computers;
@@ -80,7 +81,7 @@ public class ListDilate<T extends RealType<T>> extends
8081
@Override
8182
public boolean conforms() {
8283
return in1() == null || in2() == null || out() == null || //
83-
createOutput().iterationOrder().equals(out().iterationOrder());
84+
Maps.compatible(in1(), out());
8485
}
8586

8687
@SuppressWarnings({ "rawtypes", "unchecked" })

src/main/java/net/imagej/ops/morphology/erode/DefaultErode.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ public class DefaultErode<T extends RealType<T>> extends
8585
@Override
8686
public boolean conforms() {
8787
if (in1() == null || in2() == null || out() == null) return true;
88-
if (isFull) return createOutput(in()).iterationOrder().equals(out());
89-
return Maps.compatible(in(), out());
88+
return isFull || Maps.compatible(in(), out());
9089
}
9190

9291
@SuppressWarnings({ "rawtypes", "unchecked" })

src/main/java/net/imagej/ops/morphology/erode/ListErode.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333

3434
import net.imagej.ops.Contingent;
3535
import net.imagej.ops.Ops;
36+
import net.imagej.ops.map.Maps;
3637
import net.imagej.ops.morphology.Morphologies;
3738
import net.imagej.ops.special.computer.BinaryComputerOp;
3839
import net.imagej.ops.special.computer.Computers;
@@ -80,7 +81,7 @@ public class ListErode<T extends RealType<T>> extends
8081
@Override
8182
public boolean conforms() {
8283
return in1() == null || in2() == null || out() == null || //
83-
createOutput().iterationOrder().equals(out().iterationOrder());
84+
Maps.compatible(in1(), out());
8485
}
8586

8687
@SuppressWarnings({ "rawtypes", "unchecked" })

0 commit comments

Comments
 (0)