public class KernelFactory extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
KernelFactory.ValueType
Meaning of the kernel values
|
| Constructor and Description |
|---|
KernelFactory() |
| Modifier and Type | Method and Description |
|---|---|
static javax.media.jai.KernelJAI |
createAnnulus(int outerRadius,
int innerRadius,
KernelFactory.ValueType type,
float centreValue)
Creates a new KernelJAI object with an annular configuration
(like a doughnut).
|
static javax.media.jai.KernelJAI |
createCircle(int radius)
Create a new KernelJAI object with a circular configuration.
|
static javax.media.jai.KernelJAI |
createCircle(int radius,
KernelFactory.ValueType type,
float centreValue)
Creates a new KernelJAI object with a circular configuration.
|
static javax.media.jai.KernelJAI |
createRectangle(int width,
int height)
Creates a new KernelJAI object with a rectangular configuraton.
|
static javax.media.jai.KernelJAI |
createRectangle(int width,
int height,
KernelFactory.ValueType type,
int keyX,
int keyY,
float keyValue)
Creates a new KernelJAI object with a rectangular configuration.
|
public static javax.media.jai.KernelJAI createCircle(int radius)
This is equivalent to, but faster than, calling...
createCircle(radius, Kernel.ValueType.BINARY, 1.0f)
radius - radius of the circlepublic static javax.media.jai.KernelJAI createCircle(int radius,
KernelFactory.ValueType type,
float centreValue)
radius - the radius of the circle expressed in pixelstype - one of
KernelFactory.ValueType.BINARY,
KernelFactory.ValueType.DISTANCE or
KernelFactory.ValueType.INVERSE_DISTANCEcentreValue - the value to assign to the kernel centre (key element)public static javax.media.jai.KernelJAI createAnnulus(int outerRadius,
int innerRadius,
KernelFactory.ValueType type,
float centreValue)
An IllegalArgumentException will be thrown if:
outerRadius - the radius of the circle expressed in pixelsinnerRadius - the radius of the 'hole' of the annulustype - one of
KernelFactory.ValueType.BINARY,
KernelFactory.ValueType.DISTANCE or
KernelFactory.ValueType.INVERSE_DISTANCEcentreValue - the value to assign to the kernel centre (key element)public static javax.media.jai.KernelJAI createRectangle(int width,
int height)
This is equivalent to calling...
createRectangle(imgWidth, imgHeight, Kernel.ValueType.BINARY, imgWidth/2, imgHeight/2, 1.0f)
width - rectangle imgWidthheight - rectangle imgHeightpublic static javax.media.jai.KernelJAI createRectangle(int width,
int height,
KernelFactory.ValueType type,
int keyX,
int keyY,
float keyValue)
An IllegalArgumentException will be thrown if:
width - rectangle imgWidthheight - rectangle imgHeighttype - one of
KernelFactory.ValueType.BINARY,
KernelFactory.ValueType.DISTANCE or
KernelFactory.ValueType.INVERSE_DISTANCEkeyX - x position of the key elementkeyY - y position of the key element (y coords increase downwards)keyValue - value of the key elementCopyright © 2009–2017 Helmut Ahammer, Philipp Kainz. All rights reserved.