Package net.imglib2.test
Class RandomImgs
- java.lang.Object
-
- net.imglib2.test.RandomImgs
-
public class RandomImgs extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Randomrandom
-
Constructor Summary
Constructors Modifier Constructor Description privateRandomImgs(int seed)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends NativeType<T>>
Img<T>nextImage(T type, long... dims)Creates an image with randomized content<T extends NativeType<T>>
RandomAccessibleInterval<T>nextImage(T type, Interval interval)Creates an image with randomized content.<I extends RandomAccessibleInterval<T>,T>
Irandomize(I image)Randomizes the content of the given image.private <T> java.util.function.Consumer<T>randomSetter(T type)static RandomImgsseed(int seed)
-
-
-
Method Detail
-
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 typeinterval- Interval
-
nextImage
public <T extends NativeType<T>> Img<T> nextImage(T type, long... dims)
Creates an image with randomized content- Parameters:
type- Pixel typedims- 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> java.util.function.Consumer<T> randomSetter(T type)
-
-