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, minFields inherited from class net.imglib2.AbstractLocalizable
positionFields 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 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 net.imglib2.Point
bck, equals, fwd, move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPosition, toString, wrapMethods inherited from class net.imglib2.AbstractLocalizable
getDoublePosition, getFloatPosition, getIntPosition, getLongPosition, localize, localize, localize, localizeMethods inherited from class net.imglib2.AbstractEuclideanSpace
numDimensionsMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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) 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
-