Class ArrayWrappers

java.lang.Object
qupath.lib.analysis.stats.ArrayWrappers

public class ArrayWrappers extends Object
Simple wrappers for primitive arrays that returns values as doubles.
Author:
Pete Bankhead
  • Constructor Details

    • ArrayWrappers

      public ArrayWrappers()
  • Method Details

    • makeDoubleArrayWrapper

      public static ArrayWrappers.ArrayWrapper makeDoubleArrayWrapper(double[] array)
      Create a wrapper for a double array, returning values (predictably) as doubles.
      Parameters:
      array -
      Returns:
    • makeFloatArrayWrapper

      public static ArrayWrappers.ArrayWrapper makeFloatArrayWrapper(float[] array)
      Create a wrapper for a float array, returning values as doubles.
      Parameters:
      array -
      Returns:
    • makeIntArrayWrapper

      public static ArrayWrappers.ArrayWrapper makeIntArrayWrapper(int[] array)
      Create a wrapper for an int array, returning values as doubles.
      Parameters:
      array -
      Returns:
    • makeUnsignedByteArrayWrapper

      public static ArrayWrappers.ArrayWrapper makeUnsignedByteArrayWrapper(byte[] array)
      Create a wrapper for a byte array, returning values as doubles.

      Bytes are treated as unsigned 8-bit values (0-255);

      Parameters:
      array -
      Returns:
    • makeUnsignedShortArrayWrapper

      public static ArrayWrappers.ArrayWrapper makeUnsignedShortArrayWrapper(short[] array)
      Create a wrapper for a short array, returning values as doubles.

      Shorts are treated as unsigned 16-bit values (0-65535);

      Parameters:
      array -
      Returns: