JSci.instruments
Class ImageFilterAdapter

java.lang.Object
  extended by JSci.instruments.ImageFilterAdapter
All Implemented Interfaces:
Control, Dimensions, ImageFilter, ImageSink, ImageSource
Direct Known Subclasses:
PTCroquette, PTTwoDBarycentre

public abstract class ImageFilterAdapter
extends java.lang.Object
implements ImageFilter

An object that filters frames. We only need to override the filter method


Constructor Summary
ImageFilterAdapter()
           
 
Method Summary
abstract  void filter(Image f)
          defines the operations acutally needed for filtering
 java.awt.Component getControlComponent()
           
 java.awt.Component getFilterControlComponent()
          defines the Component that controls this filter
 int getHeight()
           
 java.lang.String getName()
          defines the name of the filter
 java.awt.Dimension getSize()
           
 int getWidth()
           
 void receive(Image f)
          This method is called by the ImageSource to send a Image
 void setSink(ImageSink fs)
          set the object that must read the frames through receive() method.
 void setSource(ImageSource fs)
          set the object that sends the Images.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageFilterAdapter

public ImageFilterAdapter()
Method Detail

setSink

public void setSink(ImageSink fs)
Description copied from interface: ImageSource
set the object that must read the frames through receive() method.

Specified by:
setSink in interface ImageSource
Parameters:
fs - the object that reads the frames

setSource

public void setSource(ImageSource fs)
Description copied from interface: ImageSink
set the object that sends the Images.

Specified by:
setSource in interface ImageSink
Parameters:
fs - the object that sends the frames

receive

public void receive(Image f)
Description copied from interface: ImageSink
This method is called by the ImageSource to send a Image

Specified by:
receive in interface ImageSink
Parameters:
f - the new frame that must be displayed

getControlComponent

public java.awt.Component getControlComponent()
Specified by:
getControlComponent in interface Control
Returns:
the component that controls the object that implements this interface

getWidth

public int getWidth()
Specified by:
getWidth in interface Dimensions
Returns:
the width of the image

getHeight

public int getHeight()
Specified by:
getHeight in interface Dimensions
Returns:
the height of the image

getSize

public java.awt.Dimension getSize()
Specified by:
getSize in interface Dimensions
Returns:
the dimension of the image

getFilterControlComponent

public java.awt.Component getFilterControlComponent()
defines the Component that controls this filter


filter

public abstract void filter(Image f)
defines the operations acutally needed for filtering


getName

public java.lang.String getName()
defines the name of the filter