Class ArrayImgXYByteProjector<A extends GenericByteType<A>>

Type Parameters:
A - source
All Implemented Interfaces:
Projector, EuclideanSpace, Localizable, Positionable, RealLocalizable

public class ArrayImgXYByteProjector<A extends GenericByteType<A>> extends AbstractProjector2D
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.
Author:
Michael Zinsmaier, Martin Horn, Christian Dietz
  • 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 with UnsignedByteAWTScreenImage for 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 data
      target - Unsigned output
      normalizationFactor -
      min -
  • Method Details

    • map

      public void map()