Package net.imglib2.display.projector
Class RandomAccessibleProjector2D<A,B>
- java.lang.Object
-
- net.imglib2.AbstractEuclideanSpace
-
- net.imglib2.AbstractLocalizable
-
- net.imglib2.Point
-
- net.imglib2.display.projector.AbstractProjector2D
-
- net.imglib2.display.projector.RandomAccessibleProjector2D<A,B>
-
- Type Parameters:
A-B-
- All Implemented Interfaces:
Projector,EuclideanSpace,Localizable,Positionable,RealLocalizable
public class RandomAccessibleProjector2D<A,B> extends AbstractProjector2D
A general 2D Projector that uses two dimensions as input to create the 2D result. The output of the projection is written into aRandomAccessibleInterval. Starting from the reference point two dimensions are sampled such that a plain gets cut out of a higher dimensional data volume.
The mapping function can be specified with aConverter.
A basic example is cutting out a time frame from a (greyscale) video Note: ThisProjectorshould only be used if one can be sure, that the targetRandomAccessibleIntervalis not anIterableIntervalofFlatIterationOrder. If, please useIterableIntervalProjector2Dfor performance reasons.
-
-
Field Summary
Fields Modifier and Type Field Description protected Converter<? super A,B>converterprivate intdimXprivate intdimY(package private) intnumDimensionsprotected RandomAccessible<A>sourceprotected RandomAccessibleInterval<B>targetprotected intXprotected intY-
Fields inherited from class net.imglib2.display.projector.AbstractProjector2D
max, min
-
Fields inherited from class net.imglib2.AbstractLocalizable
position
-
Fields inherited from class net.imglib2.AbstractEuclideanSpace
n
-
-
Constructor Summary
Constructors Constructor Description RandomAccessibleProjector2D(int dimX, int dimY, RandomAccessible<A> source, RandomAccessibleInterval<B> target, Converter<? super A,B> converter)creates a new 2D projector that samples a plain in the dimensions dimX, dimY.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidmap()projects data from the source to the target and applies the former specifiedConvertere.g.-
Methods inherited from class net.imglib2.Point
bck, equals, fwd, hashCode, move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPosition, toString, wrap
-
Methods inherited from class net.imglib2.AbstractLocalizable
getDoublePosition, getFloatPosition, getIntPosition, getLongPosition, localize, localize, localize, localize
-
Methods inherited from class net.imglib2.AbstractEuclideanSpace
numDimensions
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.imglib2.EuclideanSpace
numDimensions
-
Methods inherited from interface net.imglib2.Localizable
localize, localize, positionAsLongArray, positionAsPoint
-
Methods inherited from interface net.imglib2.RealLocalizable
positionAsDoubleArray, positionAsRealPoint
-
-
-
-
Field Detail
-
target
protected final RandomAccessibleInterval<B> target
-
source
protected final RandomAccessible<A> source
-
numDimensions
final int numDimensions
-
dimX
private final int dimX
-
dimY
private final int dimY
-
X
protected final int X
- See Also:
- Constant Field Values
-
Y
protected final int Y
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RandomAccessibleProjector2D
public RandomAccessibleProjector2D(int dimX, int dimY, RandomAccessible<A> source, RandomAccessibleInterval<B> target, Converter<? super A,B> converter)creates a new 2D projector that samples a plain in the dimensions dimX, dimY.- Parameters:
dimX-dimY-source-target-converter- a converter that is applied to each point in the plain. This can e.g. be used for normalization, conversions, ...
-
-
Method Detail
-
map
public void map()
projects data from the source to the target and applies the former specifiedConvertere.g. for normalization.
-
-