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.- Author:
- Stephan Saalfeld, Curtis Rueden, Grant Harris, Tobias Pietzsch
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final long[]
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
ConstructorsConstructorDescriptionCompositeXYProjector
(RandomAccessibleInterval<A> source, IterableInterval<ARGBType> target, ArrayList<Converter<A, ARGBType>> converters, int dimIndex) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Gets whether composite mode is enabled for all positions.boolean
isComposite
(int index) Gets whether the given position index is included in composite values.void
map()
protected void
void
setComposite
(boolean on) Toggles composite mode globally.void
setComposite
(int index, boolean on) Toggles the given position index's inclusion in composite values.protected int
Walk through composite[] and store the currently active converters and positions (in dimensiondimIndex
) tocurrentConverters
andcurrentPositions
.Methods inherited from class net.imglib2.Point
bck, equals, fwd, 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, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.imglib2.EuclideanSpace
numDimensions
-
Field Details
-
currentPositions
protected final long[] currentPositions -
currentConverters
-
-
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
) tocurrentConverters
andcurrentPositions
. 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
-