Package org.opensourcephysics.media.core
Class RadialDistortionFilter
java.lang.Object
org.opensourcephysics.display.OSPRuntime.Supported
org.opensourcephysics.media.core.Filter
org.opensourcephysics.media.core.RadialDistortionFilter
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 TypeFieldDescriptionstatic final String
static final String
protected static double
protected static double
protected static double
protected static double
static final String
static final String
static final String
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 fixed radius.static XML.ObjectLoader
Returns an XML.ObjectLoader to save and load filter data.Gets the output image projection type.double
Gets the source field of view.Gets the source image projection type.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
setFixedRadius
(double fraction) Sets the fixed radius fraction.protected void
Sets the output image pixels to a transformed version of the input pixels.void
Sets the output image projection type.void
setSourceFOV
(double fov) Sets the source field of view.void
Sets the source image projection type.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
-
RECTILINEAR
- See Also:
-
EQUIDISTANT
- See Also:
-
EQUISOLID
- See Also:
-
STEREOGRAPHIC
- See Also:
-
ORTHOGRAPHIC
- See Also:
-
PROJECTION_TYPES
-
minRadius
protected static double minRadius -
maxRadius
protected static double maxRadius -
minFOV
protected static double minFOV -
maxFOV
protected static double maxFOV
-
-
Constructor Details
-
RadialDistortionFilter
public RadialDistortionFilter()Constructor.
-
-
Method Details
-
newInspector
- Specified by:
newInspector
in classFilter
-
initInspector
- Specified by:
initInspector
in classFilter
-
refresh
public void refresh()Refreshes this filter's GUI -
setFixedRadius
public void setFixedRadius(double fraction) Sets the fixed radius fraction. Pixels at this distance from the image center remain fixed.- Parameters:
fraction
- the fixed radius as a fraction of the corner radius
-
getFixedRadius
public double getFixedRadius()Gets the fixed radius. Pixels at this relative distance from the image center remain fixed.- Returns:
- the fixed radius as a fraction of the center-to-corner distance
-
setSourceFOV
public void setSourceFOV(double fov) Sets the source field of view.- Parameters:
fov
- the diagonal field of view of the source image
-
getSourceFOV
public double getSourceFOV()Gets the source field of view.- Returns:
- the diagonal field of view of the source image
-
setSourceProjectionType
Sets the source image projection type.- Parameters:
type
- one of the predefined types in the PROJECTION_TYPES list
-
getSourceProjectionType
Gets the source image projection type.- Returns:
- the source projection types
-
setOutputProjectionType
Sets the output image projection type.- Parameters:
type
- one of the predefined types in the PROJECTION_TYPES list
-
getOutputProjectionType
Gets the output image projection type.- Returns:
- the output projection type
-
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
-