public class Life extends Abstract3x3TableOperation
More specifically:
1. If a pixel has less than 2 neighbors are true, set to false. 2. If a pixel has 2 or 3 neighbors are true, do not change. 3. If a pixel has more than 3 neighbors are true, set to false.
Constructor and Description |
---|
Life() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
getExtendedValue()
Gets default value for neighborhood pixels outside of the image.
|
protected boolean[] |
getTable()
The index to the table that's returned is built by examining each pixel
and accumulating 2^pixel number.
|
static <T extends BooleanType<T>> |
life(Img<T> source) |
static <T extends BooleanType<T>> |
life(RandomAccessible<T> source,
IterableInterval<T> target) |
calculate, calculate
protected boolean[] getTable()
Abstract3x3TableOperation
0 1 2 3 4 5 6 7 8
getTable
in class Abstract3x3TableOperation
protected boolean getExtendedValue()
Abstract3x3TableOperation
getExtendedValue
in class Abstract3x3TableOperation
public static <T extends BooleanType<T>> Img<T> life(Img<T> source)
public static <T extends BooleanType<T>> void life(RandomAccessible<T> source, IterableInterval<T> target)
Copyright © 2015–2022 ImgLib2. All rights reserved.