Class CompositeXYProjector<A>
java.lang.Object
net.imglib2.AbstractEuclideanSpace
net.imglib2.AbstractLocalizable
net.imglib2.Point
net.imglib2.display.projector.AbstractProjector2D
net.imglib2.display.projector.composite.CompositeXYProjector<A>
- All Implemented Interfaces:
Projector, EuclideanSpace, Localizable, Positionable, RealLocalizable
Creates a composite image from across multiple dimensional positions along an
axis (typically, but not necessarily, channels). Each dimensional position
has its own
Converter. The results of the conversions are summed into
the final value. Positions along the axis can be individually toggled for
inclusion in the computed composite value using the setComposite(int, boolean)
methods.
See XYProjector for the code upon which this class was based.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final boolean[]protected final long[]private final intprivate final longprivate final longprivate final RandomAccessibleInterval<A> private final IterableInterval<ARGBType> Fields inherited from class AbstractProjector2D
max, minFields inherited from class AbstractLocalizable
positionFields inherited from class AbstractEuclideanSpace
n -
Constructor Summary
ConstructorsConstructorDescriptionCompositeXYProjector(RandomAccessibleInterval<A> source, IterableInterval<ARGBType> target, ArrayList<Converter<A, ARGBType>> converters, int dimIndex) -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets whether composite mode is enabled for all positions.booleanisComposite(int index) Gets whether the given position index is included in composite values.voidmap()protected voidvoidsetComposite(boolean on) Toggles composite mode globally.voidsetComposite(int index, boolean on) Toggles the given position index's inclusion in composite values.protected intWalk through composite[] and store the currently active converters and positions (in dimensiondimIndex) tocurrentConvertersandcurrentPositions.Methods inherited from class Point
bck, equals, fwd, hashCode, move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPosition, toString, wrapMethods inherited from class AbstractLocalizable
getDoublePosition, getFloatPosition, getIntPosition, getLongPosition, localize, localize, localize, localizeMethods inherited from class AbstractEuclideanSpace
numDimensionsMethods inherited from interface EuclideanSpace
numDimensionsMethods inherited from interface Localizable
localize, localize, positionAsLongArray, positionAsPointMethods inherited from interface RealLocalizable
positionAsDoubleArray, positionAsRealPoint
-
Field Details
-
converters
-
dimIndex
private final int dimIndex -
positionCount
private final long positionCount -
positionMin
private final long positionMin -
composite
private final boolean[] composite -
currentPositions
protected final long[] currentPositions -
currentConverters
-
target
-
source
-
-
Constructor Details
-
CompositeXYProjector
public CompositeXYProjector(RandomAccessibleInterval<A> source, IterableInterval<ARGBType> target, ArrayList<Converter<A, ARGBType>> converters, int dimIndex)
-
-
Method Details
-
setComposite
public void setComposite(int index, boolean on) Toggles the given position index's inclusion in composite values. -
isComposite
public boolean isComposite(int index) Gets whether the given position index is included in composite values. -
setComposite
public void setComposite(boolean on) Toggles composite mode globally. If true, all positions along the dimensional axis are included in the composite; if false, the value will consist of only the projector's current position (i.e., non-composite mode). -
isComposite
public boolean isComposite()Gets whether composite mode is enabled for all positions. -
map
public void map() -
updateCurrentArrays
protected int updateCurrentArrays()Walk through composite[] and store the currently active converters and positions (in dimensiondimIndex) tocurrentConvertersandcurrentPositions. A special cases is single-position mode. The projector is in single-position mode iff all dimensional positions along the composited axis are excluded. In this case, the current position along that axis is used instead. The converter corresponding to the current position is used.- Returns:
- number of positions to convert
-
mapSingle
-