From 90bb852b1a19e7a003e66f2f46443480ed75c558 Mon Sep 17 00:00:00 2001 From: Robert Haase Date: Sat, 23 Apr 2022 08:17:36 +0200 Subject: [PATCH] update to recent API --- .../net/haesleinhuepf/clij2/plugins/MeanOfMaskedPixels.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/net/haesleinhuepf/clij2/plugins/MeanOfMaskedPixels.java b/src/main/java/net/haesleinhuepf/clij2/plugins/MeanOfMaskedPixels.java index 146b5867..9daeea01 100644 --- a/src/main/java/net/haesleinhuepf/clij2/plugins/MeanOfMaskedPixels.java +++ b/src/main/java/net/haesleinhuepf/clij2/plugins/MeanOfMaskedPixels.java @@ -35,9 +35,8 @@ public boolean executeCL() { public static double meanOfMaskedPixels(CLIJ2 clij2, ClearCLBuffer clImage, ClearCLBuffer mask) { ClearCLBuffer tempBinary = clij2.create(clImage); - // todo: if we can be sure that the mask has really only 0 and 1 pixel values, we can skip this first step: ClearCLBuffer tempMultiplied = clij2.create(clImage); - NotEqualConstant.notEqualConstant(clij2, mask, tempBinary, 0f); + clij2.notEqualConstant(mask, tempBinary, 0f); clij2.mask(clImage, tempBinary, tempMultiplied); double sum = clij2.sumPixels(tempMultiplied); double count = clij2.sumPixels(tempBinary);