Class SliceViewIterator
java.lang.Object
org.eclipse.dawnsci.analysis.dataset.slicer.SliceViewIterator
- All Implemented Interfaces:
Iterator<org.eclipse.january.dataset.ILazyDataset>,ISliceViewIterator
Iteration over views of a (subsampled) ILazyDataset
Used for iterating of images or XY data in a multidimensional dataset
Views will contain SliceFromSeriesMetadata describing there location in the original ILazyDataset,
as well as in the subsampled view.
If the input ILazyDataset contains SliceFromSeriesMetadata with a SourceInformation object,
the SourceInformation will be transfered to each view
Wrapper for a SliceNDIterator, but iterating ILazyDatasets rather than slices,
also adds extra metadata.
-
Constructor Summary
ConstructorsConstructorDescriptionSliceViewIterator(org.eclipse.january.dataset.ILazyDataset lazyDataset, org.eclipse.january.dataset.SliceND sampling, int... axes) Construct a Slice View Iterator -
Method Summary
Modifier and TypeMethodDescriptionintGet the number of the current ILazyDatasetint[]getShape()Get the shape of the subsampled viewintgetTotal()Get the total number of views to be iterated overbooleanhasNext()Check to see if there is another vieworg.eclipse.january.dataset.ILazyDatasetnext()Get the current view on the ILazyDatasetvoidremove()voidreset()Resets the iteratorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
SliceViewIterator
public SliceViewIterator(org.eclipse.january.dataset.ILazyDataset lazyDataset, org.eclipse.january.dataset.SliceND sampling, int... axes) Construct a Slice View Iterator- Parameters:
lazyDataset- - the full datasetsampling- - the specific part to iterate overaxes- - 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 -
reset
public void reset()Resets the iterator- Specified by:
resetin interfaceISliceViewIterator
-
next
public org.eclipse.january.dataset.ILazyDataset next()Get the current view on the ILazyDataset -
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:
getShapein interfaceISliceViewIterator- Returns:
- shape
-
remove
public void remove()
-