Class SamplingProjector2D<A,B>
- java.lang.Object
-
- net.imglib2.AbstractEuclideanSpace
-
- net.imglib2.AbstractLocalizable
-
- net.imglib2.Point
-
- net.imglib2.display.projector.AbstractProjector2D
-
- net.imglib2.display.projector.sampler.SamplingProjector2D<A,B>
-
- Type Parameters:
A- source typeB- target type
- All Implemented Interfaces:
Projector,EuclideanSpace,Localizable,Positionable,RealLocalizable
public class SamplingProjector2D<A,B> extends AbstractProjector2D
A general 2D Projector that uses three dimensions as input to create the 2D result. Starting from the reference point (seeAbstractProjector2D) two dimensions are sampled such that a plain gets cut out of a higher dimensional data volume. The third dimension is projected (in a mathematical sense) onto this plain.
The mapping function is specified by aConverter. It is not necessary to process the complete interval of the third dimension, insteadProjectedSamplercan be used to control the sampling.
A basic example is cutting out the x,y plain and projecting the color dimension onto the plain. Alternatively mapping up to three measures (from a measurement dimension) to the three color channels would also be possible...
-
-
Field Summary
Fields Modifier and Type Field Description protected Converter<ProjectedSampler<A>,B>converterprotected intdimXprotected intdimYprivate intprojectedDimensionprivate longprojectedDimMaxPosprivate longprojectedDimMinPosprivate ProjectedSampler<A>projectionSamplerprotected RandomAccessible<A>sourceprotected IterableInterval<B>targetprivate static intXprivate static 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 SamplingProjector2D(int dimX, int dimY, RandomAccessible<A> source, IterableInterval<B> target, Converter<ProjectedSampler<A>,B> converter, int projectedDimension, long[] projectedPositions)SamplingProjector2D(int dimX, int dimY, RandomAccessibleInterval<A> source, IterableInterval<B> target, Converter<ProjectedSampler<A>,B> converter, int projectedDimension)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidmap()-
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
-
X
private static final int X
- See Also:
- Constant Field Values
-
Y
private static final int Y
- See Also:
- Constant Field Values
-
converter
protected final Converter<ProjectedSampler<A>,B> converter
-
target
protected final IterableInterval<B> target
-
source
protected final RandomAccessible<A> source
-
dimX
protected final int dimX
-
dimY
protected final int dimY
-
projectedDimension
private final int projectedDimension
-
projectionSampler
private final ProjectedSampler<A> projectionSampler
-
projectedDimMinPos
private long projectedDimMinPos
-
projectedDimMaxPos
private long projectedDimMaxPos
-
-
Constructor Detail
-
SamplingProjector2D
public SamplingProjector2D(int dimX, int dimY, RandomAccessible<A> source, IterableInterval<B> target, Converter<ProjectedSampler<A>,B> converter, int projectedDimension, long[] projectedPositions)- Parameters:
dimX- the x dimension of the created plaindimY- the y dimension of the created plainsource-target-converter- a special converter that usesProjectedSamplerto process values from the third dimension (multiple values selected by the ProjectedDimSampler get converted to a new value in the resulting 2D dataset e.g. color channel to int color)projectedDimension- selection of the third dimensionprojectedPositions-
-
SamplingProjector2D
public SamplingProjector2D(int dimX, int dimY, RandomAccessibleInterval<A> source, IterableInterval<B> target, Converter<ProjectedSampler<A>,B> converter, int projectedDimension)
-
-