Package org.opensourcephysics.media.core
Class SumFilter
java.lang.Object
org.opensourcephysics.display.OSPRuntime.Supported
org.opensourcephysics.media.core.Filter
org.opensourcephysics.media.core.SumFilter
This is a Filter that sums pixel values from multiple images.
- Version:
- 1.0
- Author:
- Douglas Brown
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opensourcephysics.media.core.Filter
Filter.InspectorDlg
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int[]
protected int[]
protected int[]
Fields inherited from class org.opensourcephysics.media.core.Filter
ableButton, autoScale720x480, changed, clearButton, closeButton, copyItem, deleteItem, doCreateOutput, enabledAction, enabledItem, frame, h, hasInspector, haveGUI, heightFactor, input, inspectorDlg, inspectorVisible, inspectorX, inspectorY, nPixelsIn, output, pixelsIn, pixelsOut, previousState, propertiesItem, PROPERTY_FILTER_BRIGHTNESS, PROPERTY_FILTER_COLOR, PROPERTY_FILTER_ENABLED, PROPERTY_FILTER_FILTER, PROPERTY_FILTER_IMAGE, PROPERTY_FILTER_MEAN, PROPERTY_FILTER_RESET, PROPERTY_FILTER_TAB, PROPERTY_FILTER_VISIBLE, ROTATE_180, ROTATE_CCW_90, ROTATE_CW_90, ROTATE_NONE, rotationType, source, stack, vidPanel, w, widthFactor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Requests that this filter add the next image it receivesvoid
clear()
Clears this filterstatic XML.ObjectLoader
Returns an XML.ObjectLoader to save and load filter data.protected void
Creates and initializes the input and output images.protected Filter.InspectorDlg
protected Filter.InspectorDlg
void
refresh()
Refreshes this filter's GUIvoid
setBrightness
(double fraction) Sets the brightness fraction.void
setEnabled
(boolean enabled) Overrides Filter method.void
setMean
(boolean mean) Sets the mean flag.protected void
Sets the output image pixels to the reduced sum values.Methods inherited from class org.opensourcephysics.media.core.Filter
addLocation, copy, dispose, finalize, getFilteredImage, getFrame, getInspector, getMenu, getPixels, getPixelsIn, getPixelsOut, getRaster, initializeSource, isChanged, isEnabled, setVideoPanel
Methods inherited from class org.opensourcephysics.display.OSPRuntime.Supported
addListeners, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListenerSafely, dispose, firePropertyChange, firePropertyChange, removeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Field Details
-
rsums
protected int[] rsums -
gsums
protected int[] gsums -
bsums
protected int[] bsums
-
-
Constructor Details
-
SumFilter
public SumFilter()Constructs a SumFilter.
-
-
Method Details
-
setBrightness
public void setBrightness(double fraction) Sets the brightness fraction.- Parameters:
fraction
- the brightness as a fraction of full
-
setMean
public void setMean(boolean mean) Sets the mean flag.- Parameters:
mean
-true
to show the mean
-
setEnabled
public void setEnabled(boolean enabled) Overrides Filter method.- Overrides:
setEnabled
in classFilter
- Parameters:
enabled
-true
to enable this filter.
-
newInspector
- Specified by:
newInspector
in classFilter
-
initInspector
- Specified by:
initInspector
in classFilter
-
clear
public void clear()Clears this filter -
refresh
public void refresh()Refreshes this filter's GUI -
addNextImage
public void addNextImage()Requests that this filter add the next image it receives -
initializeSubclass
protected void initializeSubclass()Creates and initializes the input and output images.- Specified by:
initializeSubclass
in classFilter
- Parameters:
image
- a new source image
-
setOutputPixels
protected void setOutputPixels()Sets the output image pixels to the reduced sum values.- Specified by:
setOutputPixels
in classFilter
-
getLoader
Returns an XML.ObjectLoader to save and load filter data.- Returns:
- the object loader
-