UnsharpMaskKernel
public class ConvolutionKernelData extends Object
ConvolutionKernelFilter
.
Several kernel data objects are predefined in that class.ConvolutionKernelFilter
Modifier and Type | Field | Description |
---|---|---|
private int |
bias |
|
private int[] |
data |
|
private int |
div |
|
private int |
height |
|
private String |
name |
|
private int |
width |
Constructor | Description |
---|---|
ConvolutionKernelData(String name,
int[] data,
int width,
int height,
int div,
int bias) |
Creates a new kernel from the arguments.
|
Modifier and Type | Method | Description |
---|---|---|
void |
check() |
Checks if this kernel's data is valid and throws an IllegalArgumentException if anything
is wrong.
|
int |
getBias() |
Returns this kernel's bias value.
|
int[] |
getData() |
Returns the kernel data.
|
int |
getDiv() |
Returns this kernel's div value.
|
int |
getHeight() |
Returns this kernel's height, an odd positive number.
|
String |
getName() |
Returns this kernel's name.
|
int |
getWidth() |
Returns this kernel's width, an odd positive number.
|
void |
setBias(int newBias) |
Set new bias value.
|
void |
setData(int[] newData) |
Sets the data array to be used in this kernel.
|
void |
setDiv(int newDiv) |
|
void |
setHeight(int newHeight) |
|
void |
setName(String newName) |
|
void |
setWidth(int newWidth) |
private int[] data
private int width
private int height
private int div
private int bias
private String name
public ConvolutionKernelData(String name, int[] data, int width, int height, int div, int bias)
public void check()
public int getBias()
ConvolutionKernelFilter
for an explanation of this and other kernel properties.setBias(int)
public int getDiv()
0
.
See ConvolutionKernelFilter
for an explanation of this and other kernel properties.setDiv(int)
public int[] getData()
ConvolutionKernelFilter
for an explanation of this and other kernel properties.setData(int[])
public int getHeight()
ConvolutionKernelFilter
for an explanation of this and other kernel properties.public String getName()
public int getWidth()
ConvolutionKernelFilter
for an explanation of this and other kernel properties.public void setBias(int newBias)
ConvolutionKernelFilter
for an explanation of this and other kernel properties.public void setData(int[] newData)
check()
newData
- public void setDiv(int newDiv)
public void setHeight(int newHeight)
public void setName(String newName)
public void setWidth(int newWidth)