Class PlanarImgXYByteProjector<A extends GenericByteType<A>>
- java.lang.Object
-
- net.imglib2.AbstractEuclideanSpace
-
- net.imglib2.AbstractLocalizable
-
- net.imglib2.Point
-
- net.imglib2.display.projector.AbstractProjector2D
-
- net.imglib2.display.projector.specialized.PlanarImgXYByteProjector<A>
-
- Type Parameters:
A-
- All Implemented Interfaces:
Projector,EuclideanSpace,Localizable,Positionable,RealLocalizable
public class PlanarImgXYByteProjector<A extends GenericByteType<A>> extends AbstractProjector2D
Fast implementation of aAbstractProjector2Dthat selects a 2D data plain from a ByteType PlanarImg. The map method implements a normalization function. The resulting image is a ByteType ArrayImg. *
-
-
Field Summary
Fields Modifier and Type Field Description private long[]dimsprivate booleanisSignedprivate doubleminprivate doublenormalizationFactorprivate PlanarImg<A,ByteArray>sourceprivate byte[]targetArray-
Fields inherited from class net.imglib2.display.projector.AbstractProjector2D
max
-
Fields inherited from class net.imglib2.AbstractLocalizable
position
-
Fields inherited from class net.imglib2.AbstractEuclideanSpace
n
-
-
Constructor Summary
Constructors Constructor Description PlanarImgXYByteProjector(PlanarImg<A,ByteArray> source, ArrayImg<UnsignedByteType,ByteArray> target, double normalizationFactor, double min)Normalizes a PlanarImg and writes the result into target.
-
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
-
source
private final PlanarImg<A extends GenericByteType<A>,ByteArray> source
-
targetArray
private final byte[] targetArray
-
min
private final double min
-
normalizationFactor
private final double normalizationFactor
-
isSigned
private final boolean isSigned
-
dims
private final long[] dims
-
-
Constructor Detail
-
PlanarImgXYByteProjector
public PlanarImgXYByteProjector(PlanarImg<A,ByteArray> source, ArrayImg<UnsignedByteType,ByteArray> target, double normalizationFactor, double min)
Normalizes a PlanarImg and writes the result into target. This can be used in conjunction withUnsignedByteAWTScreenImagefor direct displaying. The normalization is based on a normalization factor and a minimum value with the following dependency:
normalizationFactor = (typeMax - typeMin) / (newMax - newMin)
min = newMin
A value is normalized by: normalizedValue = (value - min) * normalizationFactor.
Additionally the result gets clamped to the type range of target (that allows playing with saturation...).- Parameters:
source- Signed/Unsigned input datatarget- Unsigned outputnormalizationFactor-min-
-
-