Class TLineProfile

  extended by java.awt.geom.Point2D
      extended by java.awt.geom.Point2D.Double
          extended by
              extended by
                  extended by
                      extended by
All Implemented Interfaces:, java.lang.Cloneable, Drawable, Interactive, Measurable, Trackable

public class TLineProfile
extends TLine

This obtains line profile data from a video image.

Douglas Brown
See Also:
Serialized Form

Nested Class Summary
Nested classes/interfaces inherited from class java.awt.geom.Point2D
java.awt.geom.Point2D.Double, java.awt.geom.Point2D.Float
Field Summary
protected  int[] pixels
protected  int[] values
Fields inherited from class
end1, end1Rect, end2, end2Rect, line
Fields inherited from class
color, fillShape, hitRect, stroke, visible
Fields inherited from class
attachedTo, coordinateStrBuilder, coordsEditTrigger, coordsVisibleInMouseBox, enabled, isAdjusting, screenPt, stepEditTrigger, support, trackEditTrigger, worldPt
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.
Method Summary
 void draw(DrawingPanel panel, java.awt.Graphics g)
          Override the draw method to get the profile data.
 int[] getProfile()
          Gets the line profile.
protected  void getProfileData(VideoPanel vidPanel)
          Gets the line profile data.
Methods inherited from class
findInteractive, getEnd1, getEnd2, getShape, setStroke, setXY
Methods inherited from class
getBounds, getColor, getStroke, isVisible, setColor, setHitRectCenter, setVisible, toString
Methods inherited from class
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, 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
Methods inherited from interface org.opensourcephysics.display.Interactive
getX, getY

Field Detail


protected int[] pixels


protected int[] values
Constructor Detail


public TLineProfile(double x1,
                    double y1,
                    double x2,
                    double y2)
Constructs a TLineProfile with specified end points.

x1 - x-component of line end 1
y1 - y-component of line end 1
x2 - x-component of line end 2
y2 - y-component of line end 2
Method Detail


public void draw(DrawingPanel panel,
                 java.awt.Graphics g)
Override the draw method to get the profile data.

Specified by:
draw in interface Drawable
draw in class TShape
panel - the drawing panel requesting the drawing
g - the graphics context on which to draw


public int[] getProfile()
Gets the line profile.

the line profile


protected void getProfileData(VideoPanel vidPanel)
Gets the line profile data.

vidPanel - the video panel