Interface Sampler<T>

All Superinterfaces:
Typed<T>
All Known Subinterfaces:
Cursor<T>, LocalizableSampler<T>, LocalizableSpliterator<T>, OutOfBounds<T>, ProjectedSampler<T>, RandomAccess<T>, RealCursor<T>, RealLocalizableSampler<T>, RealLocalizableSpliterator<T>, RealOutOfBounds<T>, RealRandomAccess<T>
All Known Implementing Classes:
AbstractArrayCursor, AbstractArrayLocalizingCursor, AbstractConvertedCursor, AbstractConvertedRandomAccess, AbstractConvertedRealCursor, AbstractConvertedRealRandomAccess, AbstractCursor, AbstractCursorInt, AbstractLocalizingCursor, AbstractLocalizingCursorInt, AbstractLongListImg.LongListCursor, AbstractLongListImg.LongListLocalizingCursor, AbstractLongListImg.LongListRandomAccess, AbstractOutOfBoundsMirror, AbstractOutOfBoundsValue, ArrayCursor, ArrayLocalizingCursor, ArrayLocalizingSpliterator, ArrayLocalizingSubIntervalCursor, ArrayRandomAccess, ArraySpliterator, ArraySubIntervalCursor, BiConvertedCursor, BiConvertedRandomAccess, BiConvertedRealCursor, BiConvertedRealRandomAccess, BundleView.BundleRandomAccess, CellCursor, CellGrid.CellIntervalsRA, CellLocalizingCursor, CellRandomAccess, CellSpliterator, ClampingNLinearInterpolatorRealType, ClampingNLinearInterpolatorVolatileARGB, ClampingNLinearInterpolatorVolatileRealType, CompositeView.CompositeRandomAccess, ConvertedCursor, ConvertedRandomAccess, ConvertedRealCursor, ConvertedRealRandomAccess, CursorSpliterator, FloorInterpolator, FullSourceMapMixedRandomAccess, FullSourceMapSlicingRandomAccess, FunctionRandomAccessible.FunctionRandomAccess, FunctionRealRandomAccessible.RealFunctionRealRandomAccess, FunctionView.FunctionRandomAccess, Grid.CellIntervalsRA, HyperSlice.HyperSliceRandomAccess, HyperSlicesView.HyperSlicesViewRandomAccess, InflateView.InflateRandomAccess, InterleaveView.InterleaveRandomAccess, IntervalSampler, InverseDistanceWeightingInterpolator, KDTree.KDTreeCursor, KDTreeNode, LanczosInterpolator, LinearRealRandomAccessibleStackInterpolator, ListCursor, ListLocalizingCursor, ListRandomAccess, Localizables.LocationRandomAccess, Localizables.RealLocationRealRandomAccess, LocalizableSamplerWrapper, MixedRandomAccess, NearestNeighborInterpolator, NearestNeighborRealRandomAccessibleStackInterpolator, NearestNeighborSearchInterpolator, NLinearInterpolator, NLinearInterpolator1D, NLinearInterpolator2D, NLinearInterpolator3D, NLinearInterpolatorARGB, NtreeCursor, NtreeRandomAccess, OutOfBoundsBorder, OutOfBoundsConstantValue, OutOfBoundsMirrorDoubleBoundary, OutOfBoundsMirrorExpWindowing, OutOfBoundsMirrorSingleBoundary, OutOfBoundsPeriodic, OutOfBoundsRandomValue, PlanarCursor, PlanarCursor1D, PlanarCursor2D, PlanarLocalizingCursor, PlanarLocalizingCursor1D, PlanarLocalizingCursor2D, PlanarPlaneSubsetCursor, PlanarPlaneSubsetLocalizingCursor, PlanarRandomAccess, PlanarRandomAccess1D, PlanarSpliterator, PointSample, PointSampleList.PointSampleListCursor, PositionRandomAccessible.PositionRandomAccess, RandomAccessibleIntervalCursor, RandomAccessibleOnRealRandomAccessible.RandomAccessOnRealRandomAccessible, RandomAccessiblePair.RandomAccess, RealCursorSpliterator, RealLocalizableSamplerWrapper, RealOutOfBoundsRealRandomAccess, RealPointSample, RealPointSampleList.RealPointSampleListCursor, RealPositionRealRandomAccessible.RealPositionRealRandomAccess, SelectiveSampler, SlicingCursor, SlicingRandomAccess, StackView.DefaultRA, StackView.MoveAllSlicesRA, SubsampleView.SubsampleRandomAccess, TransformRandomAccess, TranslationRandomAccess, TypeUtils.ConstantSampler, WriteConvertedCursor, WriteConvertedRandomAccess, WriteConvertedRealCursor

public interface Sampler<T> extends Typed<T>

The Sampler interface provides access to a value whose type is specified by the generic parameter T. This T may point to an actual Object as stored in a Collection, a proxy Object that allows reading and writing pixel data of an image (e.g. all NativeTypes), or a proxy Object whose content is generated otherwise and may only be readable (e.g. ShapeList2D).

  • Method Summary

    Modifier and Type
    Method
    Description
     
    get()
    Access the actual T instance providing access to a pixel, sub-pixel or integral region value the Sampler points at.
    default T
    Get an instance of T.
  • Method Details

    • get

      T get()
      Access the actual T instance providing access to a pixel, sub-pixel or integral region value the Sampler points at.
    • copy

      Sampler<T> copy()
      Returns:
      - A new Sampler in the same state accessing the same values. It does NOT copy T, just the state of the Sampler. Otherwise use T.copy() if available. Sampler.copy().get() == Sampler.get(), i.e. both hold the same value, not necessarily the same instance (this is the case for an ArrayCursor for example)
    • getType

      default T getType()
      Description copied from interface: Typed
      Get an instance of T.

      It should not be assumed that the returned T instance is an independent copy. In particular, repeated calls to getType() may return the same instance.

      Specified by:
      getType in interface Typed<T>
      Returns:
      an instance of T