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
public class CompositeXYProjector<A> extends AbstractProjector2D
Creates a composite image from across multiple dimensional positions along an axis (typically, but not necessarily, channels). Each dimensional position has its ownConverter. 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 thesetComposite(int, boolean)methods. See XYProjector for the code upon which this class was based.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean[]compositeprivate java.util.ArrayList<Converter<A,ARGBType>>convertersprotected Converter<A,ARGBType>[]currentConvertersprotected long[]currentPositionsprivate intdimIndexprivate longpositionCountprivate longpositionMinprivate RandomAccessibleInterval<A>sourceprivate IterableInterval<ARGBType>target-
Fields inherited from class net.imglib2.display.projector.AbstractProjector2D
max, min
-
Fields inherited from class net.imglib2.AbstractLocalizable
position
-
Fields inherited from class net.imglib2.AbstractEuclideanSpace
n
-
-
Constructor Summary
Constructors Constructor Description CompositeXYProjector(RandomAccessibleInterval<A> source, IterableInterval<ARGBType> target, java.util.ArrayList<Converter<A,ARGBType>> converters, int dimIndex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisComposite()Gets whether composite mode is enabled for all positions.booleanisComposite(int index)Gets whether the given position index is included in composite values.voidmap()protected voidmapSingle(RandomAccess<A> sourceRandomAccess, Converter<A,ARGBType> conv)voidsetComposite(boolean on)Toggles composite mode globally.voidsetComposite(int index, boolean on)Toggles the given position index's inclusion in composite values.protected intupdateCurrentArrays()Walk through composite[] and store the currently active converters and positions (in dimensiondimIndex) tocurrentConvertersandcurrentPositions.-
Methods inherited from class net.imglib2.Point
bck, equals, fwd, hashCode, move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPosition, toString, wrap
-
Methods inherited from class net.imglib2.AbstractLocalizable
getDoublePosition, getFloatPosition, getIntPosition, getLongPosition, localize, localize, localize, localize
-
Methods inherited from class net.imglib2.AbstractEuclideanSpace
numDimensions
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.imglib2.EuclideanSpace
numDimensions
-
Methods inherited from interface net.imglib2.Localizable
localize, localize, positionAsLongArray, positionAsPoint
-
Methods inherited from interface net.imglib2.RealLocalizable
positionAsDoubleArray, positionAsRealPoint
-
-
-
-
Field Detail
-
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
-
target
private final IterableInterval<ARGBType> target
-
source
private final RandomAccessibleInterval<A> source
-
-
Constructor Detail
-
CompositeXYProjector
public CompositeXYProjector(RandomAccessibleInterval<A> source, IterableInterval<ARGBType> target, java.util.ArrayList<Converter<A,ARGBType>> converters, int dimIndex)
-
-
Method Detail
-
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
protected void mapSingle(RandomAccess<A> sourceRandomAccess, Converter<A,ARGBType> conv)
-
-