|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectno.hiof.imagepr.filters.ImageScaler
This class takes data-matrices and can perform scale operations on them. One can choose either to use "Nearest neighbour"-interpolation for to get a jaggy look or "Bi-linear interpolation" for smoother scaling.
The class is adjusted to version 2 of the API by Per-Olav Rus�s.
Field Summary | |
static int |
BILINEAR
|
static int |
NEAREST
|
Constructor Summary | |
ImageScaler(double scaleVertical,
double scaleHorizontal,
int interpolType)
Constructor for an ImageScaler. |
|
ImageScaler(double scale,
int interpolType)
Constructor for an ImageScaler. |
Method Summary | |
Image |
filter(Image image)
Perform the scaling on a an image, which may be a RGBImage, IntensityImage or HSIImage. |
short[][] |
filter(short[][] matrix)
Perform the scaling on a matrix of pixel values. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int NEAREST
public static final int BILINEAR
Constructor Detail |
public ImageScaler(double scaleVertical, double scaleHorizontal, int interpolType)
scaleVertical
- Vertical scale.scaleHorizontal
- Horizontal scale.interpolType
- Type of interpolation.public ImageScaler(double scale, int interpolType)
scale
- The scale in both vertical and horizontal directions.interpolType
- Type of interpolation.Method Detail |
public short[][] filter(short[][] matrix)
filter
in interface ImageFilter
matrix
- The original matrix.
public Image filter(Image image)
filter
in interface ImageFilter
image
- The original image.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |