org.opensourcephysics.media.core
Class TLineProfile

java.lang.Object
  extended by java.awt.geom.Point2D
      extended by java.awt.geom.Point2D.Double
          extended by org.opensourcephysics.media.core.TPoint
              extended by org.opensourcephysics.media.core.TShape
                  extended by org.opensourcephysics.media.core.TLine
                      extended by 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 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 org.opensourcephysics.media.core.TLine
end1, end1Rect, end2, end2Rect, line
 
Fields inherited from class org.opensourcephysics.media.core.TShape
color, fillShape, hitRect, stroke, visible
 
Fields inherited from class org.opensourcephysics.media.core.TPoint
coordinateStrBuilder, coordsEditTrigger, coordsVisibleInMouseBox, enabled, 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 org.opensourcephysics.media.core.TLine
findInteractive, getEnd1, getEnd2, getShape, setStroke, setXY
 
Methods inherited from class org.opensourcephysics.media.core.TShape
getBounds, getColor, getStroke, isVisible, setColor, setHitRectCenter, setVisible, toString
 
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
 
Methods inherited from interface org.opensourcephysics.display.Interactive
getX, getY
 

Field Detail

pixels

protected int[] pixels

values

protected int[] values
Constructor Detail

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 1
y1 - y-component of line end 1
x2 - x-component of line end 2
y2 - y-component of line end 2
Method Detail

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 drawing
g - 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