picturedream.implementation.processor
Class Filter

java.lang.Object
  |
  +--picturedream.implementation.processor.Filter
All Implemented Interfaces:
IPictureProcessor

public class Filter
extends java.lang.Object
implements IPictureProcessor

Title: PictureDream

Description:

Copyright: Copyright (c) 2003 MRoc

Organisation: MRoc Audiosolutions

Version:
1.0
Author:
MRoc mail@mroc.de

Field Summary
protected  FilterData[] ivFilters
           
protected  FilterData ivSelectedFilter
           
 
Constructor Summary
Filter()
           
 
Method Summary
protected  char[][] filter(char[][] channels, int width, int height, double[][] coeffs, double weight)
          this method does a discrete convolution. it convolutes the channel data with the given coeff matrix and the given weight. for that it uses the so called 'output side' algo which allways calculates one whole output pixel. the algo is implemented in two loops using a index array.
 javax.swing.JComponent getEditor(IPicture preview)
           
 FilterData getFilter(int index)
          returns the indexed filter
 int getFilterCount()
          returns the number of stored filter coeffs
 java.lang.String getName()
          returns the processors name
 FilterData getSelectedFilter()
          returns the selected filter
 char[][] process(char[][] channels, int width, int height)
          processes the given channels and returns the modified version. can also directly work with the given data and can return this.
 void setSelectedFilter(FilterData d)
          sets the selected filter
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

ivFilters

protected FilterData[] ivFilters

ivSelectedFilter

protected FilterData ivSelectedFilter
Constructor Detail

Filter

public Filter()
Method Detail

process

public char[][] process(char[][] channels,
                        int width,
                        int height)
processes the given channels and returns the modified version. can also directly work with the given data and can return this.
Specified by:
process in interface IPictureProcessor
Parameters:
channels - - the channels to be processed
Returns:
the processed channels

getEditor

public javax.swing.JComponent getEditor(IPicture preview)
Specified by:
getEditor in interface IPictureProcessor

getName

public java.lang.String getName()
returns the processors name
Specified by:
getName in interface IPictureProcessor

getFilterCount

public int getFilterCount()
returns the number of stored filter coeffs

getFilter

public FilterData getFilter(int index)
returns the indexed filter

getSelectedFilter

public FilterData getSelectedFilter()
returns the selected filter

setSelectedFilter

public void setSelectedFilter(FilterData d)
sets the selected filter

filter

protected char[][] filter(char[][] channels,
                          int width,
                          int height,
                          double[][] coeffs,
                          double weight)
this method does a discrete convolution. it convolutes the channel data with the given coeff matrix and the given weight. for that it uses the so called 'output side' algo which allways calculates one whole output pixel. the algo is implemented in two loops using a index array.
Parameters:
channels -  
width -  
height -  
coeffs -  
weight -  
Returns: