Class TestUtilities


  • public class TestUtilities
    extends Object
    Author: Robert Haase (http://haesleinhuepf.net) at MPI CBG (http://mpi-cbg.de) February 2018
    • Constructor Detail

      • TestUtilities

        public TestUtilities()
    • Method Detail

      • compareImages

        public static boolean compareImages​(ImagePlus a,
                                            ImagePlus b,
                                            double tolerance)
      • compareArrays

        public static boolean compareArrays​(int[][][] a,
                                            int[][][] b)
      • getRandomImage

        public static ImagePlus getRandomImage​(int width,
                                               int height,
                                               int depth,
                                               int bitDepth,
                                               float minimum,
                                               float maximum)
      • clBuffersEqual

        public static boolean clBuffersEqual​(CLIJ clij,
                                             net.haesleinhuepf.clij.clearcl.ClearCLBuffer buffer1,
                                             net.haesleinhuepf.clij.clearcl.ClearCLBuffer buffer2,
                                             double tolerance)
      • clBuffersEqual

        @Deprecated
        public static boolean clBuffersEqual​(CLIJ clij,
                                             net.haesleinhuepf.clij.clearcl.ClearCLBuffer buffer1,
                                             net.haesleinhuepf.clij.clearcl.ClearCLBuffer buffer2,
                                             double tolerance,
                                             boolean ignoreSum)
        Deprecated.
        Deprecated: use clij2.op.matrixEqual instead
        Parameters:
        clij -
        buffer1 -
        buffer2 -
        tolerance -
        ignoreSum -
        Returns:
      • printBuffer

        public static void printBuffer​(CLIJ clij,
                                       net.haesleinhuepf.clij.clearcl.ClearCLBuffer buffer)
      • countPixelsWithDifferenceAboveTolerance

        public static long countPixelsWithDifferenceAboveTolerance​(CLIJ clij,
                                                                   net.haesleinhuepf.clij.clearcl.ClearCLImage image1,
                                                                   net.haesleinhuepf.clij.clearcl.ClearCLImage image2,
                                                                   Float tolerance)
      • countPixelsWithDifferenceAboveTolerance

        public static long countPixelsWithDifferenceAboveTolerance​(CLIJ clij,
                                                                   net.haesleinhuepf.clij.clearcl.ClearCLBuffer image1,
                                                                   net.haesleinhuepf.clij.clearcl.ClearCLBuffer image2,
                                                                   Float tolerance)