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:
Spliterator<P>
- Enclosing class:
ContourPlot.Iterators
public static final class ContourPlot.Iterators.ImgAreaSpliterator<P extends ContourPlot.PixelBase>
extends Object
implements 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
Spliterator.OfDouble, Spliterator.OfInt, Spliterator.OfLong, Spliterator.OfPrimitive<T,T_CONS, T_SPLITR extends Spliterator.OfPrimitive<T, T_CONS, T_SPLITR>> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate intprivate intprivate final intprivate final Pprivate final intprivate intprivate intFields inherited from interface java.util.Spliterator
CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateImgAreaSpliterator(int xStart, int endXexcl, int x, int y, int finalXexcl, int finalYincl, int minSplitSize, Supplier<P> pixelSupplier) ImgAreaSpliterator(int xStart, int yStart, int width, int height, int minSplitSize, Supplier<P> pixelSupplier) Constructs a new ImgAreaSpliterator for the specified area -
Method Summary
Modifier and TypeMethodDescriptionintlongvoidforEachRemaining(Consumer<? super P> action) booleantryAdvance(Consumer<? super P> action) trySplit()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Spliterator
getComparator, getExactSizeIfKnown, hasCharacteristics
-
Field Details
-
pixelSupplier
-
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 Details
-
ImgAreaSpliterator
public ImgAreaSpliterator(int xStart, int yStart, int width, int height, int minSplitSize, 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
-
-
Method Details
-
tryAdvance
- Specified by:
tryAdvancein interfaceSpliterator<P extends ContourPlot.PixelBase>
-
forEachRemaining
- Specified by:
forEachRemainingin interfaceSpliterator<P extends ContourPlot.PixelBase>
-
trySplit
- Specified by:
trySplitin interfaceSpliterator<P extends ContourPlot.PixelBase>
-
estimateSize
public long estimateSize()- Specified by:
estimateSizein interfaceSpliterator<P extends ContourPlot.PixelBase>
-
characteristics
public int characteristics()- Specified by:
characteristicsin interfaceSpliterator<P extends ContourPlot.PixelBase>
-