Class ArrayImgXYByteProjector<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.ArrayImgXYByteProjector<A>
- Type Parameters:
A- source
- All Implemented Interfaces:
Projector, EuclideanSpace, Localizable, Positionable, RealLocalizable
Fast implementation of a
AbstractProjector2D that selects a 2D data
plain from an ByteType ArrayImg. The map method implements a normalization
function. The resulting image is a ByteType ArrayImg.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final long[]private final booleanprivate final doubleprivate final doubleprivate final byte[]private final byte[]Fields inherited from class AbstractProjector2D
maxFields inherited from class AbstractLocalizable
positionFields inherited from class AbstractEuclideanSpace
n -
Constructor Summary
ConstructorsConstructorDescriptionArrayImgXYByteProjector(ArrayImg<A, ByteArray> source, ArrayImg<UnsignedByteType, ByteArray> target, double normalizationFactor, double min) Normalizes an ArrayImg and writes the result into target. -
Method Summary
Methods inherited from class Point
bck, equals, fwd, hashCode, move, move, move, move, move, setPosition, setPosition, setPosition, setPosition, setPosition, toString, wrapMethods inherited from class AbstractLocalizable
getDoublePosition, getFloatPosition, getIntPosition, getLongPosition, localize, localize, localize, localizeMethods inherited from class AbstractEuclideanSpace
numDimensionsMethods inherited from interface EuclideanSpace
numDimensionsMethods inherited from interface Localizable
localize, localize, positionAsLongArray, positionAsPointMethods inherited from interface RealLocalizable
positionAsDoubleArray, positionAsRealPoint
-
Field Details
-
sourceArray
private final byte[] sourceArray -
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 Details
-
ArrayImgXYByteProjector
public ArrayImgXYByteProjector(ArrayImg<A, ByteArray> source, ArrayImg<UnsignedByteType, ByteArray> target, double normalizationFactor, double min) Normalizes an ArrayImg 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-
-
-
Method Details
-
map
public void map()
-