diff --git a/src/main/java/net/imagej/ops/labeling/MergeLabeling.java b/src/main/java/net/imagej/ops/labeling/MergeLabeling.java index a2d2b1499..27ddf7310 100644 --- a/src/main/java/net/imagej/ops/labeling/MergeLabeling.java +++ b/src/main/java/net/imagej/ops/labeling/MergeLabeling.java @@ -92,7 +92,7 @@ public void compute(final ImgLabeling input1, { if (mask != null) { final IterableRegion iterable = Regions.iterable(mask); - final IterableInterval> sample = Regions.sample(iterable, + final IterableInterval> sample = Regions.sample(iterable.inside(), output); final RandomAccess> randomAccess = input1.randomAccess(); final RandomAccess> randomAccess2 = input2.randomAccess();