Class CompositeXYRandomAccessibleProjector<A>

  • All Implemented Interfaces:
    Projector, EuclideanSpace, Localizable, Positionable, RealLocalizable

    public class CompositeXYRandomAccessibleProjector<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 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 CompositeXYProjector for the code upon which this class was based. See XYRandomAccessibleProjector for the code upon which this class was based.
    Author:
    Stephan Saalfeld, Curtis Rueden, Grant Harris, Tobias Pietzsch
    • 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 dimension dimIndex) to currentConverters and currentPositions. 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