public abstract class Abstract3x3NeighbourhoodThinning extends Object implements ThinningStrategy
Modifier and Type | Field and Description |
---|---|
protected boolean |
m_background
Boolean value of the background.
|
protected boolean |
m_foreground
Boolean value of the foreground.
|
Modifier | Constructor and Description |
---|---|
protected |
Abstract3x3NeighbourhoodThinning() |
protected |
Abstract3x3NeighbourhoodThinning(boolean foreground)
Create a new abstract thinning strategy.
|
Modifier and Type | Method and Description |
---|---|
void |
afterCycle()
Called by the ThinningOp after each cycle, and thus exactly
getIterationsPerCycle()-times per iteration.
|
protected int |
findPatternSwitches(boolean[] vals)
Returns the amount of switches from foreground to background occurring in
the circle around vals[1]
|
int |
getIterationsPerCycle()
Returns the minimum number of iterations necessary for the algorithm to
run.
|
protected boolean[] |
getNeighbourhood(RandomAccess<BitType> access)
Returns all booleans in a 3x3 neighbourhood of the pixel the RandomAccess
points to.
|
protected <T> RandomAccess<T> |
randomAccess(RandomAccessible<T> ra) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
copy, removePixel
protected boolean m_foreground
protected boolean m_background
protected Abstract3x3NeighbourhoodThinning()
protected Abstract3x3NeighbourhoodThinning(boolean foreground)
foreground
- Value determining the boolean value of foreground pixels.protected boolean[] getNeighbourhood(RandomAccess<BitType> access)
access
- A RandomAccess pointing to a pixel of the imageprotected int findPatternSwitches(boolean[] vals)
vals
- Boolean Array holding the neighbourhood.public void afterCycle()
ThinningStrategy
afterCycle
in interface ThinningStrategy
public int getIterationsPerCycle()
ThinningStrategy
getIterationsPerCycle
in interface ThinningStrategy
protected <T> RandomAccess<T> randomAccess(RandomAccessible<T> ra)
Copyright © 2014–2022 ImageJ. All rights reserved.