org.opensourcephysics.media.core
Class TLineProfile
java.lang.Object
java.awt.geom.Point2D
java.awt.geom.Point2D.Double
org.opensourcephysics.media.core.TPoint
org.opensourcephysics.media.core.TShape
org.opensourcephysics.media.core.TLine
org.opensourcephysics.media.core.TLineProfile
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Drawable, Interactive, Measurable, Trackable
public class TLineProfile
- extends TLine
This obtains line profile data from a video image.
- Version:
- 1.0
- Author:
- Douglas Brown
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class java.awt.geom.Point2D |
java.awt.geom.Point2D.Double, java.awt.geom.Point2D.Float |
Fields inherited from class java.awt.geom.Point2D.Double |
x, y |
Constructor Summary |
TLineProfile(double x1,
double y1,
double x2,
double y2)
Constructs a TLineProfile with specified end points. |
Methods inherited from class org.opensourcephysics.media.core.TPoint |
addPropertyChangeListener, addPropertyChangeListener, angle, angle, center, cos, cos, equals, getFrameNumber, getScreenPosition, getWorldPosition, getXMax, getXMin, getYMax, getYMin, isCoordsEditTrigger, isEnabled, isMeasured, isStepEditTrigger, isTrackEditTrigger, removePropertyChangeListener, removePropertyChangeListener, setCoordsEditTrigger, setEnabled, setLocation, setPositionOnLine, setScreenPosition, setScreenPosition, setStepEditTrigger, setTrackEditTrigger, setX, setY, showCoordinates, sin, sin, translate |
Methods inherited from class java.awt.geom.Point2D.Double |
getX, getY |
Methods inherited from class java.awt.geom.Point2D |
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, hashCode, setLocation |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
pixels
protected int[] pixels
values
protected int[] values
TLineProfile
public TLineProfile(double x1,
double y1,
double x2,
double y2)
- Constructs a TLineProfile with specified end points.
- Parameters:
x1
- x-component of line end 1y1
- y-component of line end 1x2
- x-component of line end 2y2
- y-component of line end 2
draw
public void draw(DrawingPanel panel,
java.awt.Graphics g)
- Override the draw method to get the profile data.
- Specified by:
draw
in interface Drawable
- Overrides:
draw
in class TShape
- Parameters:
panel
- the drawing panel requesting the drawingg
- the graphics context on which to draw
getProfile
public int[] getProfile()
- Gets the line profile.
- Returns:
- the line profile
getProfileData
protected void getProfileData(VideoPanel vidPanel)
- Gets the line profile data.
- Parameters:
vidPanel
- the video panel