public class SimpleImageScaler extends Object implements IImageScaler
IImageScaler.
A n-by-n source region is transformed to 1 output pixel by
picking the upper-left-most of the n-by-n pixels.| Constructor and Description |
|---|
SimpleImageScaler() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
downsample(byte[] srcImage,
int width,
int height,
double scaleFactor,
int bytesPerPixel,
boolean littleEndian,
boolean floatingPoint,
int channels,
boolean interleaved)
Downsamples the given image.
|
public byte[] downsample(byte[] srcImage,
int width,
int height,
double scaleFactor,
int bytesPerPixel,
boolean littleEndian,
boolean floatingPoint,
int channels,
boolean interleaved)
IImageScalerdownsample in interface IImageScalersrcImage - a byte array representing the image to be downsampledwidth - the width in pixels of the source imageheight - the height in pixels of the source imagescaleFactor - the value used to calculate the downsampled width and height; expected to be greater than 1bytesPerPixel - the number of bytes in one pixel (usually 1, 2, 4, or 8)littleEndian - true if bytes in a pixel are stored in little endian orderfloatingPoint - true if the pixels should be interpreted as float or double instead of uint32/uint64channels - the number of RGB channels included in srcImageinterleaved - true if the RGB channels are stored in interleaved order (RGBRGBRGB... and not RRR...GGG...BBB)IImageScaler.downsample(byte[], int, int, double,
int, boolean, boolean, int, boolean)Copyright © 2005–2024 Open Microscopy Environment. All rights reserved.