Package net.imglib2.view
Class SubsampleIntervalView<T>
java.lang.Object
net.imglib2.view.SubsampleView<T>
net.imglib2.view.SubsampleIntervalView<T>
- All Implemented Interfaces:
Dimensions
,EuclideanSpace
,Interval
,RandomAccessible<T>
,RandomAccessibleInterval<T>
,RealInterval
,View
public class SubsampleIntervalView<T>
extends SubsampleView<T>
implements RandomAccessibleInterval<T>
SubsampleIntervalView
is a view that provides access to only every
sdth value of a source
RandomAccessibleInterval
. Its transformed origin is at the min
coordinate of the source Interval
. This is effectively an integer
scaling and optional offset transformation. Localization calls to the
RandomAccess
and Interval
dimension calls to the
SubsampleIntervalView
return scaled and translated coordinates that
are generated on-the-fly. Localization is thus moderately inefficient to the
benefit of faster positioning. Don't ask for what you already know ;).- Author:
- Stephan Saalfeld
-
Nested Class Summary
Nested classes/interfaces inherited from class net.imglib2.view.SubsampleView
SubsampleView.SubsampleRandomAccess
-
Field Summary
FieldsFields inherited from class net.imglib2.view.SubsampleView
source, steps
-
Constructor Summary
ConstructorsConstructorDescriptionSubsampleIntervalView
(RandomAccessibleInterval<T> source, long step) SubsampleIntervalView
(RandomAccessibleInterval<T> source, long... steps) -
Method Summary
Modifier and TypeMethodDescriptionlong
dimension
(int d) Get the number of pixels in a given dimension d.void
dimensions
(long[] dim) Write the number of pixels in each dimension into long[].long
max
(int d) Get the maximum in dimension d.void
max
(long[] m) Write the maximum of each dimension into long[].void
max
(Positionable m) Sets aPositionable
to the maximum of thisInterval
long
min
(int d) Get the minimum in dimension d.void
min
(long[] min) Write the minimum of each dimension into long[].void
min
(Positionable min) Sets aPositionable
to the minimum of thisInterval
void
realMax
(double[] m) Write the maximum of each dimension into double[].double
realMax
(int d) Get the maximum in dimension d.void
Sets aRealPositionable
to the maximum of thisInterval
void
realMin
(double[] min) Write the minimum of each dimension into double[].double
realMin
(int d) Get the minimum in dimension d.void
realMin
(RealPositionable min) Sets aRealPositionable
to the minimum of thisInterval
Methods inherited from class net.imglib2.view.SubsampleView
getSource, getSteps, numDimensions, randomAccess, randomAccess
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.imglib2.EuclideanSpace
numDimensions
Methods inherited from interface net.imglib2.RandomAccessible
randomAccess, randomAccess
-
Field Details
-
dimensions
protected final long[] dimensions -
max
protected final long[] max
-
-
Constructor Details
-
SubsampleIntervalView
-
SubsampleIntervalView
-
-
Method Details
-
min
public long min(int d) Description copied from interface:Interval
Get the minimum in dimension d. -
min
public void min(long[] min) Description copied from interface:Interval
Write the minimum of each dimension into long[]. -
min
Description copied from interface:Interval
Sets aPositionable
to the minimum of thisInterval
-
max
public long max(int d) Description copied from interface:Interval
Get the maximum in dimension d. -
max
public void max(long[] m) Description copied from interface:Interval
Write the maximum of each dimension into long[]. -
max
Description copied from interface:Interval
Sets aPositionable
to the maximum of thisInterval
-
realMin
public double realMin(int d) Description copied from interface:RealInterval
Get the minimum in dimension d.- Specified by:
realMin
in interfaceRealInterval
- Parameters:
d
- dimension- Returns:
- minimum in dimension d.
-
realMin
public void realMin(double[] min) Description copied from interface:RealInterval
Write the minimum of each dimension into double[].- Specified by:
realMin
in interfaceRealInterval
- Parameters:
min
-
-
realMin
Description copied from interface:RealInterval
Sets aRealPositionable
to the minimum of thisInterval
- Specified by:
realMin
in interfaceRealInterval
- Parameters:
min
-
-
realMax
public double realMax(int d) Description copied from interface:RealInterval
Get the maximum in dimension d.- Specified by:
realMax
in interfaceRealInterval
- 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 interfaceRealInterval
- Parameters:
m
-
-
realMax
Description copied from interface:RealInterval
Sets aRealPositionable
to the maximum of thisInterval
- Specified by:
realMax
in interfaceRealInterval
- Parameters:
m
-
-
dimensions
public void dimensions(long[] dim) Description copied from interface:Dimensions
Write the number of pixels in each dimension into long[].- Specified by:
dimensions
in interfaceDimensions
- Parameters:
dim
-
-
dimension
public long dimension(int d) Description copied from interface:Dimensions
Get the number of pixels in a given dimension d.- Specified by:
dimension
in interfaceDimensions
- Parameters:
d
-
-