Package gov.nih.mipav.model.algorithms
Class ContourPlot.Iterators.ImgAreaSpliterator<P extends ContourPlot.PixelBase>
- java.lang.Object
-
- gov.nih.mipav.model.algorithms.ContourPlot.Iterators.ImgAreaSpliterator<P>
-
- All Implemented Interfaces:
java.util.Spliterator<P>
- Enclosing class:
- ContourPlot.Iterators
public static final class ContourPlot.Iterators.ImgAreaSpliterator<P extends ContourPlot.PixelBase> extends java.lang.Object implements java.util.Spliterator<P>
Spliterator class for images bound to a specific area- Author:
- hageldave
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface java.util.Spliterator
java.util.Spliterator.OfDouble, java.util.Spliterator.OfInt, java.util.Spliterator.OfLong, java.util.Spliterator.OfPrimitive<T extends java.lang.Object,T_CONS extends java.lang.Object,T_SPLITR extends java.util.Spliterator.OfPrimitive<T,T_CONS,T_SPLITR>>
-
-
Field Summary
Fields Modifier and Type Field Description private int
endXexcl
private int
finalXexcl
private int
finalYincl
private int
minimumSplitSize
private java.util.function.Supplier<P>
pixelSupplier
private P
px
private int
startX
private int
x
private int
y
-
Constructor Summary
Constructors Modifier Constructor Description private
ImgAreaSpliterator(int xStart, int endXexcl, int x, int y, int finalXexcl, int finalYincl, int minSplitSize, java.util.function.Supplier<P> pixelSupplier)
ImgAreaSpliterator(int xStart, int yStart, int width, int height, int minSplitSize, java.util.function.Supplier<P> pixelSupplier)
Constructs a new ImgAreaSpliterator for the specified area
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
characteristics()
long
estimateSize()
void
forEachRemaining(java.util.function.Consumer<? super P> action)
boolean
tryAdvance(java.util.function.Consumer<? super P> action)
java.util.Spliterator<P>
trySplit()
-
-
-
Field Detail
-
pixelSupplier
private final java.util.function.Supplier<P extends ContourPlot.PixelBase> pixelSupplier
-
px
private final P extends ContourPlot.PixelBase px
-
startX
private final int startX
-
endXexcl
private final int endXexcl
-
x
private int x
-
y
private int y
-
finalXexcl
private int finalXexcl
-
finalYincl
private int finalYincl
-
minimumSplitSize
private final int minimumSplitSize
-
-
Constructor Detail
-
ImgAreaSpliterator
public ImgAreaSpliterator(int xStart, int yStart, int width, int height, int minSplitSize, java.util.function.Supplier<P> pixelSupplier)
Constructs a new ImgAreaSpliterator for the specified area- Parameters:
xStart
- left boundary of the area (inclusive)yStart
- upper boundary of the area (inclusive)width
- of the areaheight
- of the areaminSplitSize
- the minimum number of elements in a splitpixelSupplier
- a function that allocates a new pixel- Since:
- 1.1
-
ImgAreaSpliterator
private ImgAreaSpliterator(int xStart, int endXexcl, int x, int y, int finalXexcl, int finalYincl, int minSplitSize, java.util.function.Supplier<P> pixelSupplier)
-
-
Method Detail
-
tryAdvance
public boolean tryAdvance(java.util.function.Consumer<? super P> action)
- Specified by:
tryAdvance
in interfacejava.util.Spliterator<P extends ContourPlot.PixelBase>
-
forEachRemaining
public void forEachRemaining(java.util.function.Consumer<? super P> action)
- Specified by:
forEachRemaining
in interfacejava.util.Spliterator<P extends ContourPlot.PixelBase>
-
trySplit
public java.util.Spliterator<P> trySplit()
- Specified by:
trySplit
in interfacejava.util.Spliterator<P extends ContourPlot.PixelBase>
-
estimateSize
public long estimateSize()
- Specified by:
estimateSize
in interfacejava.util.Spliterator<P extends ContourPlot.PixelBase>
-
characteristics
public int characteristics()
- Specified by:
characteristics
in interfacejava.util.Spliterator<P extends ContourPlot.PixelBase>
-
-