public class CombinedSpace<A extends TypedAxis,S extends TypedSpace<A>> extends ArrayList<S> implements TypedSpace<A>
CombinedSpace
is a EuclideanSpace
(specifically a
TypedSpace
) which is a union of other TypedSpace
s. Common
axes are merged as appropriate by matching the AxisType
s of each
TypedAxis
.
For example, combining three spaces with dimensions (X, Y, Z, CHANNEL), (X, Y, CHANNEL, TIME) and (X, Z, LIFETIME, TIME) will result in a coordinate space with dimensions (X, Y, Z, CHANNEL, TIME, LIFETIME).
modCount
Constructor and Description |
---|
CombinedSpace() |
Modifier and Type | Method and Description |
---|---|
void |
axes(A[] axes)
Copies the space's axes into the given array.
|
A |
axis(int d)
Gets the axis associated with the given dimension of the space.
|
int |
dimensionIndex(AxisType axis)
Gets the dimensional index of the axis with the given type.
|
int |
numDimensions() |
void |
setAxis(A axis,
int d)
Sets the dimensional axis associated with the given dimension.
|
void |
update()
Recomputes the combined space based on its current constituents.
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
containsAll, equals, hashCode
parallelStream, stream
public void update()
public int dimensionIndex(AxisType axis)
TypedSpace
Note that by convention, each AxisType
may only be used in a single
dimension of the space.
dimensionIndex
in interface TypedSpace<A extends TypedAxis>
-1
if the specified axis type is not found.public A axis(int d)
AnnotatedSpace
axis
in interface AnnotatedSpace<A extends TypedAxis>
public void axes(A[] axes)
AnnotatedSpace
axes
in interface AnnotatedSpace<A extends TypedAxis>
public void setAxis(A axis, int d)
AnnotatedSpace
setAxis
in interface AnnotatedSpace<A extends TypedAxis>
public int numDimensions()
numDimensions
in interface EuclideanSpace
Copyright © 2014–2022 ImageJ. All rights reserved.