Package org.opensourcephysics.media.core
Class ResizeFilter
java.lang.Object
org.opensourcephysics.display.OSPRuntime.Supported
org.opensourcephysics.media.core.Filter
org.opensourcephysics.media.core.ResizeFilter
This is a Filter that changes the pixel dimensions of 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
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 TypeMethodDescriptiondouble
Gets the height factor.static XML.ObjectLoader
Returns an XML.ObjectLoader to save and load filter data.double
Gets the width factor.protected void
Creates and initializes the input and output images.protected Filter.InspectorDlg
protected Filter.InspectorDlg
void
refresh()
Refreshes this filter's GUIvoid
setHeightFactor
(double factor) Sets the hieght factor.protected void
void
setWidthFactor
(double factor) Sets the width factor.Methods inherited from class org.opensourcephysics.media.core.Filter
addLocation, clear, copy, dispose, finalize, getFilteredImage, getFrame, getInspector, getMenu, getPixels, getPixelsIn, getPixelsOut, getRaster, initializeSource, isChanged, isEnabled, setEnabled, setVideoPanel
Methods inherited from class org.opensourcephysics.display.OSPRuntime.Supported
addListeners, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListenerSafely, dispose, firePropertyChange, firePropertyChange, removeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Constructor Details
-
ResizeFilter
public ResizeFilter()Constructs a ResizeFilter.
-
-
Method Details
-
setWidthFactor
public void setWidthFactor(double factor) Sets the width factor.- Parameters:
factor
- the factor by which the width is resized
-
setHeightFactor
public void setHeightFactor(double factor) Sets the hieght factor.- Parameters:
factor
- the factor by which the width is resized
-
getWidthFactor
public double getWidthFactor()Gets the width factor.- Returns:
- the factor.
-
getHeightFactor
public double getHeightFactor()Gets the height factor.- Returns:
- the factor.
-
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()- Specified by:
setOutputPixels
in classFilter
-
newInspector
- Specified by:
newInspector
in classFilter
-
initInspector
- Specified by:
initInspector
in classFilter
-
refresh
public void refresh()Refreshes this filter's GUI -
getLoader
Returns an XML.ObjectLoader to save and load filter data.- Returns:
- the object loader
-