org.opensourcephysics.media.core
Class BaselineFilter

java.lang.Object
  extended by org.opensourcephysics.media.core.Filter
      extended by org.opensourcephysics.media.core.BaselineFilter

public class BaselineFilter
extends Filter

This is a Filter that subtracts a baseline image from the source image.

Version:
1.0
Author:
Douglas Brown

Field Summary
 
Fields inherited from class org.opensourcephysics.media.core.Filter
ableButton, clearButton, closeButton, deleteItem, enabledAction, enabledItem, frame, hasInspector, inspectorVisible, inspectorX, inspectorY, propertiesItem, stack, support, vidPanel
 
Constructor Summary
BaselineFilter()
          Constructs a default BaselineFilter.
 
Method Summary
 void capture()
          Captures the current video frame to use as baseline image.
 void clear()
          Clears this filter
 java.awt.image.BufferedImage getBaselineImage()
          Gets the baseline image being subtracted.
 java.awt.image.BufferedImage getFilteredImage(java.awt.image.BufferedImage sourceImage)
          Applies the filter to a source image and returns the result.
 javax.swing.JDialog getInspector()
          Implements abstract Filter method.
static XML.ObjectLoader getLoader()
          Returns an XML.ObjectLoader to save and load filter data.
 void load()
          Loads an image with a file chooser.
 void load(java.lang.String path)
          Loads a baseline image from the specified path.
 void refresh()
          Refreshes this filter's GUI
 void setBaselineImage(java.awt.image.BufferedImage image)
          Sets the baseline image.
 
Methods inherited from class org.opensourcephysics.media.core.Filter
addPropertyChangeListener, addPropertyChangeListener, getMenu, isEnabled, removePropertyChangeListener, removePropertyChangeListener, setEnabled, setVideoPanel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaselineFilter

public BaselineFilter()
Constructs a default BaselineFilter.

Method Detail

capture

public void capture()
Captures the current video frame to use as baseline image.


load

public void load(java.lang.String path)
Loads a baseline image from the specified path.

Parameters:
path - the image path

load

public void load()
Loads an image with a file chooser.


setBaselineImage

public void setBaselineImage(java.awt.image.BufferedImage image)
Sets the baseline image.

Parameters:
image - the image

getBaselineImage

public java.awt.image.BufferedImage getBaselineImage()
Gets the baseline image being subtracted.

Returns:
the image

getFilteredImage

public java.awt.image.BufferedImage getFilteredImage(java.awt.image.BufferedImage sourceImage)
Applies the filter to a source image and returns the result.

Specified by:
getFilteredImage in class Filter
Parameters:
sourceImage - the source image
Returns:
the filtered image

getInspector

public javax.swing.JDialog getInspector()
Implements abstract Filter method.

Specified by:
getInspector in class Filter
Returns:
the inspector

clear

public void clear()
Clears this filter

Overrides:
clear in class Filter

refresh

public void refresh()
Refreshes this filter's GUI

Overrides:
refresh in class Filter

getLoader

public static XML.ObjectLoader getLoader()
Returns an XML.ObjectLoader to save and load filter data.

Returns:
the object loader