public class ShapeList<T extends Type<T>> extends ContainerImpl<T>
Modifier and Type | Field and Description |
---|---|
protected T |
background |
ShapeListContainerFactory |
factory |
protected ArrayList<ArrayList<Shape>> |
shapeLists |
protected ArrayList<ArrayList<T>> |
typeLists |
dim, id, numDimensions, numPixels
Constructor and Description |
---|
ShapeList(int[] dim,
T background) |
ShapeList(ShapeListContainerFactory factory,
int[] dim,
T background) |
Modifier and Type | Method and Description |
---|---|
void |
addShape(Shape shape,
T type,
int[] position) |
void |
close() |
boolean |
compareStorageContainerCompatibility(Container<?> container) |
ShapeListLocalizableByDimCursor<T> |
createCursor(Image<T> image) |
ShapeListLocalizableByDimCursor<T> |
createLocalizableByDimCursor(Image<T> image) |
ShapeListLocalizableByDimOutOfBoundsCursor<T> |
createLocalizableByDimCursor(Image<T> image,
OutOfBoundsStrategyFactory<T> outOfBoundsFactory) |
ShapeListLocalizableByDimCursor<T> |
createLocalizableCursor(Image<T> image) |
ShapeListLocalizablePlaneCursor<T> |
createLocalizablePlaneCursor(Image<T> image) |
T |
getBackground() |
ShapeListContainerFactory |
getFactory() |
ArrayList<ArrayList<Shape>> |
getShapeLists() |
T |
getShapeType(int[] position)
Find the upper most Shape visible at the given position and return its
Type . |
protected T |
getShapeType(int x,
int y,
int p)
Find the upper most Shape visible at the given position and return its
Type . |
compareStorageContainerDimensions, getDimension, getDimensions, getDimensions, getId, getNumDimensions, getNumPixels, getNumPixels, toString
public final ShapeListContainerFactory factory
public ShapeList(ShapeListContainerFactory factory, int[] dim, T background)
public ShapeList(int[] dim, T background)
public T getBackground()
public ArrayList<ArrayList<Shape>> getShapeLists()
public ShapeListContainerFactory getFactory()
getFactory
in interface Container<T extends Type<T>>
getFactory
in class ContainerImpl<T extends Type<T>>
public ShapeListLocalizableByDimCursor<T> createCursor(Image<T> image)
public ShapeListLocalizableByDimCursor<T> createLocalizableCursor(Image<T> image)
public ShapeListLocalizablePlaneCursor<T> createLocalizablePlaneCursor(Image<T> image)
public ShapeListLocalizableByDimCursor<T> createLocalizableByDimCursor(Image<T> image)
public ShapeListLocalizableByDimOutOfBoundsCursor<T> createLocalizableByDimCursor(Image<T> image, OutOfBoundsStrategyFactory<T> outOfBoundsFactory)
public void close()
protected T getShapeType(int x, int y, int p)
Type
.
Does not perform bounds checking. For shape planes, this doesn't
matter, but for all other dimensions, the result is undefined or an
IndexOutOfBoundsException
.x
- y
- p
- pre-multiplied index of all dimensions >1public T getShapeType(int[] position)
Type
.
This random access and, therefore, not efficient. Use only if the
dimensions >1 cannot be pre-calculated.
Does not perform bounds checking. For shape planes, this doesn't
matter, but for all other dimensions, the result is undefined or an
IndexOutOfBoundsException
.position
- public boolean compareStorageContainerCompatibility(Container<?> container)
Copyright © 2015–2021 Fiji. All rights reserved.