Class SliceBlockIterator

java.lang.Object
org.eclipse.dawnsci.analysis.dataset.slicer.SliceBlockIterator
All Implemented Interfaces:
Iterator<org.eclipse.january.dataset.ILazyDataset>, ISliceViewIterator

public class SliceBlockIterator extends Object implements ISliceViewIterator
  • Constructor Summary

    Constructors
    Constructor
    Description
    SliceBlockIterator(org.eclipse.january.dataset.ILazyDataset lazyDataset, org.eclipse.january.dataset.SliceND sampling, int... axes)
    Construct a Slice View Iterator
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Get the number of the current ILazyDataset
    int[]
    Get the shape of the subsampled view
    int
    Get the total number of views to be iterated over
    boolean
    Check to see if there is another view
    org.eclipse.january.dataset.ILazyDataset
    Get the current view on the ILazyDataset
    void
     
    void
    Resets the iterator

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.util.Iterator

    forEachRemaining
  • Constructor Details

    • SliceBlockIterator

      public SliceBlockIterator(org.eclipse.january.dataset.ILazyDataset lazyDataset, org.eclipse.january.dataset.SliceND sampling, int... axes)
      Construct a Slice View Iterator
      Parameters:
      lazyDataset - - the full dataset
      sampling - - the specific part to iterate over
      axes - - the dimensions the correspond to data axes (i.e. length 1 for XY and 2 for an image)
  • Method Details

    • hasNext

      public boolean hasNext()
      Check to see if there is another view
      Specified by:
      hasNext in interface Iterator<org.eclipse.january.dataset.ILazyDataset>
      Returns:
      if there is another view
    • reset

      public void reset()
      Resets the iterator
      Specified by:
      reset in interface ISliceViewIterator
    • next

      public org.eclipse.january.dataset.ILazyDataset next()
      Get the current view on the ILazyDataset
      Specified by:
      next in interface Iterator<org.eclipse.january.dataset.ILazyDataset>
      Returns:
      lazyDataset
    • getTotal

      public int getTotal()
      Get the total number of views to be iterated over
      Returns:
      total;
    • getCurrent

      public int getCurrent()
      Get the number of the current ILazyDataset
      Returns:
      current
    • getShape

      public int[] getShape()
      Get the shape of the subsampled view
      Specified by:
      getShape in interface ISliceViewIterator
      Returns:
      shape
    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<org.eclipse.january.dataset.ILazyDataset>