Package org.opensourcephysics.media.core
Class BarrelPincushionFilter
java.lang.Object
org.opensourcephysics.display.OSPRuntime.Supported
org.opensourcephysics.media.core.Filter
org.opensourcephysics.media.core.BarrelPincushionFilter
This is a Filter that applies radial transformations to an 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
FieldsModifier and TypeFieldDescriptionprotected static double
protected static double
protected static double
protected static double
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 TypeMethodDescriptionstatic XML.ObjectLoader
Returns an XML.ObjectLoader to save and load filter data.protected void
initializeSource
(BufferedImage image) protected void
Creates the input and output images.protected Filter.InspectorDlg
protected Filter.InspectorDlg
void
refresh()
Refreshes this filter's GUIvoid
setAlpha
(double a) protected void
Sets the output image pixels to a transformed version of the input pixels.void
setScale
(double scale) boolean
for inner anonymous class; could use qualified superMethods inherited from class org.opensourcephysics.media.core.Filter
addLocation, clear, copy, dispose, finalize, getFilteredImage, getFrame, getInspector, getMenu, getPixels, getPixelsIn, getPixelsOut, getRaster, isChanged, isEnabled, setEnabled, setVideoPanel
Methods inherited from class org.opensourcephysics.display.OSPRuntime.Supported
addListeners, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListenerSafely, dispose, firePropertyChange, firePropertyChange, removeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Field Details
-
minAlpha
protected static double minAlpha -
maxAlpha
protected static double maxAlpha -
minScale
protected static double minScale -
maxScale
protected static double maxScale
-
-
Constructor Details
-
BarrelPincushionFilter
public BarrelPincushionFilter()Constructor.
-
-
Method Details
-
newInspector
- Specified by:
newInspector
in classFilter
-
initInspector
- Specified by:
initInspector
in classFilter
-
refresh
public void refresh()Refreshes this filter's GUI -
setAlpha
public void setAlpha(double a) -
setScale
public void setScale(double scale) -
initializeSubclass
protected void initializeSubclass()Creates the input and output images.- Specified by:
initializeSubclass
in classFilter
- Parameters:
image
- a new input image
-
initializeSource
- Overrides:
initializeSource
in classFilter
-
setOutputPixels
protected void setOutputPixels()Sets the output image pixels to a transformed version of the input pixels.- Specified by:
setOutputPixels
in classFilter
- Parameters:
input
- the input image
-
superIsEnabled
public boolean superIsEnabled()for inner anonymous class; could use qualified super- Returns:
-
getLoader
Returns an XML.ObjectLoader to save and load filter data.- Returns:
- the object loader
-