public class Kernel2D_I32 extends Kernel2D
Modifier and Type | Field and Description |
---|---|
int[] |
data |
width
Modifier | Constructor and Description |
---|---|
protected |
Kernel2D_I32() |
|
Kernel2D_I32(int width)
Create a kernel whose elements are all equal to zero.
|
|
Kernel2D_I32(int width,
int[] data)
Creates a new kernel whose initial values are specified by data and width.
|
Modifier and Type | Method and Description |
---|---|
int |
computeSum() |
int |
get(int x,
int y) |
int[] |
getData() |
boolean |
isInteger() |
void |
print() |
void |
set(int x,
int y,
int value) |
static Kernel2D_I32 |
wrap(int[] data,
int width)
Creates a kernel whose elements are the specified data array and has
the specified width.
|
getDimension
getRadius, getWidth
public Kernel2D_I32(int width, int[] data)
width
- The kernels width. Must be odd.data
- The value of the kernel. Not modified. Reference is not saved.public Kernel2D_I32(int width)
width
- How wide the kernel is. Must be odd.protected Kernel2D_I32()
public static Kernel2D_I32 wrap(int[] data, int width)
data
- The array who will be the kernel's data. Reference is saved.width
- The kernel's width.public int[] getData()
public void print()
public boolean isInteger()
isInteger
in class KernelBase
public int get(int x, int y)
public int computeSum()
public void set(int x, int y, int value)
Copyright © 2011-2012 Peter Abeles