Package org.opensourcephysics.media.core
Class BrightnessFilter
java.lang.Object
org.opensourcephysics.display.OSPRuntime.Supported
org.opensourcephysics.media.core.Filter
org.opensourcephysics.media.core.BrightnessFilter
This is a Filter that changes the brightness and contrast of a source image.
- Version:
- 1.0
- Author:
- Douglas Brown
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opensourcephysics.media.core.Filter
Filter.InspectorDlg
-
Field Summary
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
clear()
Clears this filtervoid
dispose()
Disposes of this filter.int
Gets the brightness.double
Gets the contrast.static XML.ObjectLoader
Returns an XML.ObjectLoader to save and load filter data.protected void
protected Filter.InspectorDlg
boolean
Determines if the filter settings have changed.protected Filter.InspectorDlg
void
refresh()
Refreshes this filter's GUIvoid
setBrightness
(int brightness) Sets the brightness.void
setContrast
(double contrast) Sets the contrast.protected void
Sets the output image pixels to a bright version of the input pixels.Methods inherited from class org.opensourcephysics.media.core.Filter
addLocation, copy, finalize, getFilteredImage, getFrame, getInspector, getMenu, getPixels, getPixelsIn, getPixelsOut, getRaster, initializeSource, isEnabled, setEnabled, setVideoPanel
Methods inherited from class org.opensourcephysics.display.OSPRuntime.Supported
addListeners, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListenerSafely, dispose, firePropertyChange, firePropertyChange, removeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Constructor Details
-
BrightnessFilter
public BrightnessFilter()Constructs a default BrightnessFilter object.
-
-
Method Details
-
setContrast
public void setContrast(double contrast) Sets the contrast.- Parameters:
contrast
- the contrast.
-
getContrast
public double getContrast()Gets the contrast.- Returns:
- the contrast.
-
setBrightness
public void setBrightness(int brightness) Sets the brightness.- Parameters:
brightness
- the brightness.
-
getBrightness
public int getBrightness()Gets the brightness.- Returns:
- the brightness.
-
isChanged
public boolean isChanged()Determines if the filter settings have changed. -
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 -
dispose
public void dispose()Description copied from class:Filter
Disposes of this filter. -
initializeSubclass
protected void initializeSubclass()- Specified by:
initializeSubclass
in classFilter
-
setOutputPixels
protected void setOutputPixels()Sets the output image pixels to a bright version of the input pixels.- Specified by:
setOutputPixels
in classFilter
-
getLoader
Returns an XML.ObjectLoader to save and load filter data.- Returns:
- the object loader
-