Package net.imglib2

Class RealPointSampleList<T>

    • Field Detail

      • n

        protected final int n
      • coordinates

        protected final java.util.ArrayList<RealPoint> coordinates
      • samples

        protected final java.util.ArrayList<T> samples
      • lastIndex

        protected int lastIndex
      • min

        protected final double[] min
      • max

        protected final double[] max
    • Constructor Detail

      • RealPointSampleList

        public RealPointSampleList​(int n)
        Parameters:
        n - - number of dimensions
    • Method Detail

      • add

        public void add​(RealPoint position,
                        T sample)
      • cursor

        public RealCursor<T> cursor()
        Description copied from interface: IterableRealInterval

        Returns a RealCursor that iterates with optimal speed without calculating the location at each iteration step. Localization is performed on demand.

        Use this where localization is required rarely/ not for each iteration.

        Specified by:
        cursor in interface IterableRealInterval<T>
        Returns:
        fast iterating iterator
      • iterationOrder

        public java.lang.Object iterationOrder()
        Description copied from interface: IterableRealInterval
        Returns the iteration order of this IterableRealInterval. If the returned object equals (Object.equals(Object)) the iteration order of another IterableRealInterval f then they can be copied by synchronous iteration. That is, having an Iterator on this and another Iterator on f, moving both in synchrony will point both of them to corresponding locations in their source domain. In other words, this and f have the same iteration order and means and the same number of elements.
        Specified by:
        iterationOrder in interface IterableRealInterval<T>
        Returns:
        the iteration order of this IterableRealInterval.
        See Also:
        FlatIterationOrder
      • firstElement

        public T firstElement()
        Description copied from interface: IterableRealInterval
        Get the first element of this IterableRealInterval. This is a shortcut for cursor().next(). This can be used to create a new variable of type T using firstElement().createVariable(), which is useful in generic methods to store temporary results, e.g., a running sum over pixels in the IterableRealInterval.
        Specified by:
        firstElement in interface IterableRealInterval<T>
        Returns:
        the first element in iteration order.
      • realMax

        public double realMax​(int d)
        Description copied from interface: RealInterval
        Get the maximum in dimension d.
        Specified by:
        realMax in interface RealInterval
        Parameters:
        d - dimension
        Returns:
        maximum in dimension d.
      • realMax

        public void realMax​(double[] m)
        Description copied from interface: RealInterval
        Write the maximum of each dimension into double[].
        Specified by:
        realMax in interface RealInterval
      • realMin

        public double realMin​(int d)
        Description copied from interface: RealInterval
        Get the minimum in dimension d.
        Specified by:
        realMin in interface RealInterval
        Parameters:
        d - dimension
        Returns:
        minimum in dimension d.
      • realMin

        public void realMin​(double[] m)
        Description copied from interface: RealInterval
        Write the minimum of each dimension into double[].
        Specified by:
        realMin in interface RealInterval
      • iterator

        public java.util.Iterator<T> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<T>