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, insteadProjectedSampler
can 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...- Author:
- Michael Zinsmaier, Martin Horn, Christian Dietz
-
-
Field Summary
Fields Modifier and Type Field Description protected Converter<ProjectedSampler<A>,B>
converter
protected int
dimX
protected int
dimY
protected RandomAccessible<A>
source
protected IterableInterval<B>
target
-
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 void
map()
-
Methods inherited from class net.imglib2.Point
bck, equals, fwd, 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, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.imglib2.EuclideanSpace
numDimensions
-
-
-
-
Field Detail
-
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
-
-
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 usesProjectedSampler
to 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)
-
-