Class SubtractOffsetAndScaleNormalizer
java.lang.Object
qupath.lib.images.servers.transforms.SubtractOffsetAndScaleNormalizer
- All Implemented Interfaces:
- BufferedImageOp,- BufferedImageNormalizer
Normalizes the pixel values of a BufferedImage by subtracting and offset and multiplying by a scale factor.
 
An expected use is to subtract a constant background value in a fluorescence image, with optional channel rescaling.
Note that the result is necessarily clipped to the range of the output data type, and non-integer values are rounded if necessary.
- Since:
- v0.6.0
- 
Method SummaryModifier and TypeMethodDescriptioncreate(double[] offsets, double[] scales) Create a normalizer that subtracts a constant from each channel, then multiples the result by a scale factor.createScaled(double... scales) Create a normalizer that scales each channel by a constant.createSubtractOffset(double... offsets) Create a normalizer that subtracts a constant from each channel, without clipping.createSubtractOffsetAndClipZero(double... offsets) Create a normalizer that subtracts a constant from each channel, clipping the lower bound to 0.createWithClipRange(double[] offsets, double[] scales, double minClip, double maxClip) Create a normalizer that subtracts a constant from each channel, then multiples the result by a scale factor - clipping the result to a defined range.filter(BufferedImage img, BufferedImage output) Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface qupath.lib.images.servers.transforms.BufferedImageNormalizercreateCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints
- 
Method Details- 
createScaledCreate a normalizer that scales each channel by a constant.- Parameters:
- scales-
- Returns:
 
- 
createSubtractOffsetCreate a normalizer that subtracts a constant from each channel, without clipping.- Parameters:
- offsets-
- Returns:
 
- 
createSubtractOffsetAndClipZeroCreate a normalizer that subtracts a constant from each channel, clipping the lower bound to 0.- Parameters:
- offsets-
- Returns:
 
- 
createCreate a normalizer that subtracts a constant from each channel, then multiples the result by a scale factor. The result is not clipped.- Parameters:
- offsets-
- scales-
- Returns:
 
- 
createWithClipRangepublic static SubtractOffsetAndScaleNormalizer createWithClipRange(double[] offsets, double[] scales, double minClip, double maxClip) Create a normalizer that subtracts a constant from each channel, then multiples the result by a scale factor - clipping the result to a defined range.- Parameters:
- offsets-
- scales-
- minClip-
- maxClip-
- Returns:
 
- 
filter- Specified by:
- filterin interface- BufferedImageOp
 
 
-