Package net.imglib2.converter.readwrite
Class TypeUtils.ConstantSampler<T>
- java.lang.Object
-
- net.imglib2.converter.readwrite.TypeUtils.ConstantSampler<T>
-
-
Constructor Summary
Constructors Constructor Description ConstantSampler(T t)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Sampler<T>copy()Tget()Access the actual T instance providing access to a pixel, sub-pixel or integral region value theSamplerpoints at.TgetType()Get an instance ofT.
-
-
-
Field Detail
-
t
private final T t
-
-
Constructor Detail
-
ConstantSampler
public ConstantSampler(T t)
-
-
Method Detail
-
get
public T get()
Description copied from interface:SamplerAccess the actual T instance providing access to a pixel, sub-pixel or integral region value theSamplerpoints at.
-
getType
public T getType()
Description copied from interface:TypedGet an instance ofT.It should not be assumed that the returned
Tinstance is an independent copy. In particular, repeated calls togetType()may return the same instance.
-
copy
public Sampler<T> copy()
- Specified by:
copyin interfaceSampler<T>- Returns:
- - A new
Samplerin the same state accessing the same values. It does NOT copy T, just the state of theSampler. 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 anArrayCursorfor example)
-
-