picture.filter
Class MatrixFilter

java.lang.Object
  |
  +--picture.DefaultTransformation
        |
        +--picture.filter.MatrixFilter
All Implemented Interfaces:
ProgressViewableTransformation, java.io.Serializable, Transformation

public class MatrixFilter
extends DefaultTransformation

Diese Klasse implementiert Matrixfilter. Das sind Filter, bei denen der neue Wert eines Pixels durch die umgebenden bestimmt wird, gewichtet durch die Matrix. Randpixel werden dabei nicht bearbeitet.

See Also:
Serialized Form

Field Summary
protected  double[][] matrix
           
 
Constructor Summary
MatrixFilter()
           
 
Method Summary
 DialogPane filterOptionPane(javax.swing.JFrame owner, Picture pic)
          Liefert einen Optionendialog zurück.
 int getNumberOfProgressSteps(Picture p)
          Bestimmt die Anzahl der Schritte, die bei den aktuellen Einstellungen auf den ProgressHandler von p ausgeführt werden, wenn diese Transformation auf p ausgeführt wird.
 int getSize()
          Liefert die aktuelle Größe der Filtermatrix.
 double getValue(int x, int y)
           
 Layer of(ProgressHandler ph, Layer p)
          Fuehrt die Transformation auf einer Bildebene aus.
 void setMatrix(double[][] matrix)
           
 void setValue(double c, int x, int y)
           
 
Methods inherited from class picture.DefaultTransformation
createNewInstance, getDistance, getPreferredFileName, isPowerOfTwo, loadFrom, of, saveTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

matrix

protected double[][] matrix
Constructor Detail

MatrixFilter

public MatrixFilter()
Method Detail

setMatrix

public void setMatrix(double[][] matrix)
               throws PictureException

getSize

public int getSize()
Liefert die aktuelle Größe der Filtermatrix.

getValue

public double getValue(int x,
                       int y)

setValue

public void setValue(double c,
                     int x,
                     int y)

getNumberOfProgressSteps

public int getNumberOfProgressSteps(Picture p)
Description copied from interface: ProgressViewableTransformation
Bestimmt die Anzahl der Schritte, die bei den aktuellen Einstellungen auf den ProgressHandler von p ausgeführt werden, wenn diese Transformation auf p ausgeführt wird.
Following copied from interface: picture.ProgressViewableTransformation
Returns:
Anzahl der Schritte

of

public Layer of(ProgressHandler ph,
                Layer p)
         throws PictureException
Description copied from class: DefaultTransformation
Fuehrt die Transformation auf einer Bildebene aus.
Overrides:
of in class DefaultTransformation

filterOptionPane

public DialogPane filterOptionPane(javax.swing.JFrame owner,
                                   Picture pic)
                            throws PictureException
Liefert einen Optionendialog zurück.
Overrides:
filterOptionPane in class DefaultTransformation
Parameters:
owner - Parentframe
pic - zu berbeitendes Bild
Returns:
OptionenDialog