public class PlanarContainer<T extends Type<T>,A extends ArrayDataAccess<A>> extends DirectAccessContainerImpl<T,A> implements PlanarAccess<A>
Container
that stores data in an array of 2d-slices each as a
linear array of basic types. For types that are supported by ImageJ (byte,
short, int, float), an actual Planar is created or used to store the
data. Alternatively, an PlanarContainer
can be created using
an already existing Planar
instance.
PlanarContainers
provides a legacy layer to
apply imglib-based algorithm implementations directly on the data stored in
an ImageJ Planar
. For all types that are supported by ImageJ, the
PlanarContainer
provides access to the pixels of an
Planar
instance that can be accessed (#getPlanar()
.Modifier and Type | Field and Description |
---|---|
protected PlanarContainerFactory |
factory |
protected ArrayList<A> |
mirror |
protected int |
slices |
linkedType
entitiesPerPixel, numEntities
dim, id, numDimensions, numPixels
Modifier | Constructor and Description |
---|---|
|
PlanarContainer(int[] dim,
int entitiesPerPixel) |
protected |
PlanarContainer(PlanarContainerFactory factory,
int[] dim,
int entitiesPerPixel) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
compareStorageContainerCompatibility(Container<?> container) |
PlanarCursor<T> |
createCursor(Image<T> image) |
PlanarLocalizableByDimCursor<T> |
createLocalizableByDimCursor(Image<T> image) |
PlanarLocalizableByDimOutOfBoundsCursor<T> |
createLocalizableByDimCursor(Image<T> image,
OutOfBoundsStrategyFactory<T> outOfBoundsFactory) |
PlanarLocalizableCursor<T> |
createLocalizableCursor(Image<T> image) |
PlanarLocalizablePlaneCursor<T> |
createLocalizablePlaneCursor(Image<T> image) |
PlanarContainerFactory |
getFactory() |
int |
getIndex(int[] l)
For a given >=2d location, estimate the pixel index in the stack slice.
|
A |
getPlane(int no) |
int |
getSlices() |
void |
setPlane(int no,
A plane) |
A |
update(Cursor<?> c) |
setLinkedType
getNumEntities, getNumEntities, getNumEntitiesPerPixel
compareStorageContainerDimensions, getDimension, getDimensions, getDimensions, getId, getNumDimensions, getNumPixels, getNumPixels, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getNumEntities, getNumEntitiesPerPixel
compareStorageContainerDimensions, getDimension, getDimensions, getDimensions, getId, getNumDimensions, getNumPixels
protected final PlanarContainerFactory factory
protected final int slices
protected final ArrayList<A extends ArrayDataAccess<A>> mirror
public PlanarContainer(int[] dim, int entitiesPerPixel)
protected PlanarContainer(PlanarContainerFactory factory, int[] dim, int entitiesPerPixel)
public A update(Cursor<?> c)
update
in interface DirectAccessContainer<T extends Type<T>,A extends ArrayDataAccess<A>>
public int getSlices()
public final int getIndex(int[] l)
l
- public PlanarCursor<T> createCursor(Image<T> image)
createCursor
in interface Container<T extends Type<T>>
public PlanarLocalizableCursor<T> createLocalizableCursor(Image<T> image)
createLocalizableCursor
in interface Container<T extends Type<T>>
public PlanarLocalizablePlaneCursor<T> createLocalizablePlaneCursor(Image<T> image)
createLocalizablePlaneCursor
in interface Container<T extends Type<T>>
public PlanarLocalizableByDimCursor<T> createLocalizableByDimCursor(Image<T> image)
createLocalizableByDimCursor
in interface Container<T extends Type<T>>
public PlanarLocalizableByDimOutOfBoundsCursor<T> createLocalizableByDimCursor(Image<T> image, OutOfBoundsStrategyFactory<T> outOfBoundsFactory)
createLocalizableByDimCursor
in interface Container<T extends Type<T>>
public PlanarContainerFactory getFactory()
getFactory
in interface Container<T extends Type<T>>
getFactory
in class ContainerImpl<T extends Type<T>>
public boolean compareStorageContainerCompatibility(Container<?> container)
compareStorageContainerCompatibility
in interface Container<T extends Type<T>>
public A getPlane(int no)
getPlane
in interface PlanarAccess<A extends ArrayDataAccess<A>>
public void setPlane(int no, A plane)
setPlane
in interface PlanarAccess<A extends ArrayDataAccess<A>>
Copyright © 2015–2021 Fiji. All rights reserved.