Class RandomImgs

java.lang.Object
net.imglib2.test.RandomImgs

public class RandomImgs extends Object
  • Field Details

    • random

      private final Random random
  • Constructor Details

    • RandomImgs

      private RandomImgs(int seed)
  • Method Details

    • seed

      public static RandomImgs seed(int seed)
    • nextImage

      public <T extends NativeType<T>> RandomAccessibleInterval<T> nextImage(T type, Interval interval)
      Creates an image with randomized content.
      Parameters:
      type - Pixel type
      interval - Interval
    • nextImage

      public <T extends NativeType<T>> Img<T> nextImage(T type, long... dims)
      Creates an image with randomized content
      Parameters:
      type - Pixel type
      dims - Dimensions
    • randomize

      public <I extends RandomAccessibleInterval<T>, T> I randomize(I image)
      Randomizes the content of the given image.
      Returns:
      Reference to the given image
    • randomSetter

      private <T> Consumer<T> randomSetter(T type)