Package 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:
Serializable,Cloneable,Drawable,Interactive,Measurable,Trackable
This obtains line profile data from a video image.
- Version:
- 1.0
- Author:
- Douglas Brown
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.awt.geom.Point2D
Point2D.Double, Point2D.Float -
Field Summary
FieldsFields inherited from class org.opensourcephysics.media.core.TLine
end1, end1Rect, end2, end2Rect, lineFields inherited from class org.opensourcephysics.media.core.TShape
color, fillShape, hitRect, stroke, visibleFields inherited from class org.opensourcephysics.media.core.TPoint
attachedTo, coordsEditTrigger, coordsVisibleInMouseBox, enabled, isAdjusting, prevX, prevY, screenPt, stepEditTrigger, support, toScreen, trackEditTrigger, worldPt, xyStringBuilderFields inherited from class java.awt.geom.Point2D.Double
x, yFields inherited from interface org.opensourcephysics.media.core.Trackable
PROPERTY_ADJUSTING -
Constructor Summary
ConstructorsConstructorDescriptionTLineProfile(double x1, double y1, double x2, double y2) Constructs a TLineProfile with specified end points. -
Method Summary
Modifier and TypeMethodDescriptionvoiddraw(DrawingPanel panel, Graphics g) Override the draw method to get the profile data.int[]Gets the line profile.protected voidgetProfileData(VideoPanel vidPanel) Gets the line profile data.Methods inherited from class org.opensourcephysics.media.core.TLine
findInteractive, getEnd1, getEnd2, getShape, setStroke, setXYMethods inherited from class org.opensourcephysics.media.core.TShape
getBounds, getColor, getStroke, isVisible, setColor, setHitRectCenter, setVisible, toStringMethods inherited from class org.opensourcephysics.media.core.TPoint
addPropertyChangeListener, addPropertyChangeListener, angle, angle, attachTo, center, cos, cos, detach, equals, getFrameNumber, getScreenPosition, getWorldPosition, getXMax, getXMin, getYMax, getYMin, isAdjusting, isAttached, isCoordsEditTrigger, isEnabled, isMeasured, isStepEditTrigger, isTrackEditTrigger, removePropertyChangeListener, removePropertyChangeListener, setAdjusting, setCoordsEditTrigger, setEnabled, setLocation, setPositionOnLine, setScreenPosition, setScreenPosition, setStepEditTrigger, setTrackEditTrigger, setWorldPosition, setX, setY, showCoordinates, sin, sin, translateMethods inherited from class java.awt.geom.Point2D.Double
getX, getYMethods inherited from class java.awt.geom.Point2D
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, hashCode, setLocationMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opensourcephysics.display.Interactive
getX, getY, isInteractive
-
Field Details
-
pixels
protected int[] pixels -
values
protected int[] values
-
-
Constructor Details
-
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
-
-
Method Details
-
draw
Override the draw method to get the profile data. -
getProfile
public int[] getProfile()Gets the line profile.- Returns:
- the line profile
-
getProfileData
Gets the line profile data.- Parameters:
vidPanel- the video panel
-