JIU 0.14.3

net.sourceforge.jiu.filters
Class ConvolutionKernelData

java.lang.Object
  extended by net.sourceforge.jiu.filters.ConvolutionKernelData
Direct Known Subclasses:
UnsharpMaskKernel

public class ConvolutionKernelData
extends Object

This class encapsulates the information for a specific convolution kernel filter. An object of this class is used in combination with ConvolutionKernelFilter. Several kernel data objects are predefined in that class.

Author:
Marco Schmidt
See Also:
ConvolutionKernelFilter

Constructor Summary
ConvolutionKernelData(String name, int[] data, int width, int height, int div, int bias)
          Creates a new kernel from the arguments.
 
Method Summary
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConvolutionKernelData

public ConvolutionKernelData(String name,
                             int[] data,
                             int width,
                             int height,
                             int div,
                             int bias)
Creates a new kernel from the arguments. Calls the various set methods to actually store these arguments.

Method Detail

check

public void check()
Checks if this kernel's data is valid and throws an IllegalArgumentException if anything is wrong. Otherwise, does nothing.


getBias

public int getBias()
Returns this kernel's bias value. See ConvolutionKernelFilter for an explanation of this and other kernel properties.

See Also:
setBias(int)

getDiv

public int getDiv()
Returns this kernel's div value. Must not be 0. See ConvolutionKernelFilter for an explanation of this and other kernel properties.

See Also:
setDiv(int)

getData

public int[] getData()
Returns the kernel data. See ConvolutionKernelFilter for an explanation of this and other kernel properties.

See Also:
setData(int[])

getHeight

public int getHeight()
Returns this kernel's height, an odd positive number. See ConvolutionKernelFilter for an explanation of this and other kernel properties.


getName

public String getName()
Returns this kernel's name.


getWidth

public int getWidth()
Returns this kernel's width, an odd positive number. See ConvolutionKernelFilter for an explanation of this and other kernel properties.


setBias

public void setBias(int newBias)
Set new bias value. See ConvolutionKernelFilter for an explanation of this and other kernel properties.


setData

public void setData(int[] newData)
Sets the data array to be used in this kernel. Must have at least getWidth() times getHeight() elements - however, this constraint is not checked in this method (setting width and height may happen later). Call check()

Parameters:
newData -

setDiv

public void setDiv(int newDiv)

setHeight

public void setHeight(int newHeight)

setName

public void setName(String newName)

setWidth

public void setWidth(int newWidth)

JIU 0.14.3

Copyright © 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Marco Schmidt