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 sourceRandomAccessibleInterval
. Its transformed origin is at the min coordinate of the sourceInterval
. This is effectively an integer scaling and optional offset transformation. Localization calls to theRandomAccess
andInterval
dimension calls to theSubsampleIntervalView
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
Fields Modifier and Type Field Description protected long[]
dimensions
protected long[]
max
-
Fields inherited from class net.imglib2.view.SubsampleView
source, steps
-
-
Constructor Summary
Constructors Constructor Description SubsampleIntervalView(RandomAccessibleInterval<T> source, long step)
SubsampleIntervalView(RandomAccessibleInterval<T> source, long... steps)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
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
realMax(RealPositionable m)
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
-
-
-
-
Constructor Detail
-
SubsampleIntervalView
public SubsampleIntervalView(RandomAccessibleInterval<T> source, long step)
-
SubsampleIntervalView
public SubsampleIntervalView(RandomAccessibleInterval<T> source, long... steps)
-
-
Method Detail
-
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
public void min(Positionable 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
public void max(Positionable m)
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
-
realMin
public void realMin(RealPositionable min)
Description copied from interface:RealInterval
Sets aRealPositionable
to the minimum of thisInterval
- Specified by:
realMin
in interfaceRealInterval
-
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
-
realMax
public void realMax(RealPositionable m)
Description copied from interface:RealInterval
Sets aRealPositionable
to the maximum of thisInterval
- Specified by:
realMax
in interfaceRealInterval
-
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
-
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
-
-