|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensourcephysics.cabrillo.tracker.TTrack
org.opensourcephysics.cabrillo.tracker.Calibration
public class Calibration
A Calibration controls the ImageCoordSystem of a TrackerPanel.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.opensourcephysics.cabrillo.tracker.TTrack |
|---|
TTrack.StepArray |
| Field Summary | |
|---|---|
protected int |
axes
|
protected javax.swing.JLabel |
axisLabel
|
protected java.util.ArrayList<java.lang.String> |
axisList
|
protected javax.swing.event.ChangeListener |
axisListener
|
protected javax.swing.JSpinner |
axisSpinner
|
protected boolean |
fixedCoordinates
|
protected javax.swing.JCheckBoxMenuItem |
fixedCoordinatesItem
|
protected boolean[] |
isWorldDataValid
|
protected javax.swing.JLabel |
point1Label
|
protected javax.swing.JLabel |
point2Label
|
protected int |
spinnerTextWidth
|
protected static int |
X_AXIS
|
protected NumberField |
x1Field
|
protected javax.swing.JLabel |
x1Label
|
protected static int |
XY_AXES
|
protected static int |
Y_AXIS
|
protected NumberField |
y1Field
|
protected javax.swing.JLabel |
y1Label
|
| Constructor Summary | |
|---|---|
Calibration()
Constructs a Calibration. |
|
| Method Summary | |
|---|---|
TPoint |
autoMarkAt(int n,
double x,
double y)
Used by autoTracker to mark a step at a match target position. |
Step |
createStep(int n,
double x,
double y)
Creates, adds a point to, or repositions a calibration step. |
Step |
createStep(int n,
double x1,
double y1,
double x2,
double y2)
Creates a new calibration step with two calibration points. |
protected void |
displayWorldCoordinates()
Displays the world coordinates of the currently selected step. |
Interactive |
findInteractive(DrawingPanel panel,
int xpix,
int ypix)
Implements findInteractive method. |
int |
getFootprintLength()
Gets the length of the footprints required by this track. |
static XML.ObjectLoader |
getLoader()
Returns an ObjectLoader to save and load data for this class. |
javax.swing.JMenu |
getMenu(TrackerPanel trackerPanel)
Overrides TTrack getMenu method. |
Step |
getStep(int n)
Overrides TTrack getStep method. |
int |
getStepLength()
Gets the length of the steps created by this track. |
protected java.lang.String |
getTargetDescription(int pointIndex)
Returns a description of the point at a given index. |
protected int |
getTargetIndex()
Overrides TTrack method |
java.util.ArrayList<java.awt.Component> |
getToolbarTrackComponents(TrackerPanel trackerPanel)
Overrides TTrack getToolbarTrackComponents method. |
protected boolean |
isAutoTrackable()
Determines if at least one point in this track is autotrackable. |
boolean |
isFixedCoordinates()
Determines if the world coordinates are fixed. |
boolean |
isLocked()
Overrides TTrack isLocked method. |
void |
propertyChange(java.beans.PropertyChangeEvent e)
Responds to property change events. |
protected void |
refreshStep(CalibrationStep step)
Refreshes a step by setting it equal to the previous keyframe step. |
void |
setAxisType(int axis)
Sets the axis type. |
void |
setFixedCoordinates(boolean fixed)
Sets the fixed coordinates property. |
void |
setFootprint(java.lang.String name)
Overrides TTrack setFootprint to handle PointAxesFootprints. |
void |
setLocked(boolean locked)
Overrides TTrack method. |
void |
setTrailVisible(boolean visible)
Overrides TTrack setTrailVisible method. |
java.lang.String |
toString()
Overrides Object toString method. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final int X_AXIS
protected static final int XY_AXES
protected static final int Y_AXIS
protected NumberField x1Field
protected NumberField y1Field
protected javax.swing.JLabel point1Label
protected javax.swing.JLabel point2Label
protected javax.swing.JLabel x1Label
protected javax.swing.JLabel y1Label
protected boolean[] isWorldDataValid
protected java.util.ArrayList<java.lang.String> axisList
protected javax.swing.JSpinner axisSpinner
protected javax.swing.event.ChangeListener axisListener
protected javax.swing.JLabel axisLabel
protected int axes
protected int spinnerTextWidth
protected boolean fixedCoordinates
protected javax.swing.JCheckBoxMenuItem fixedCoordinatesItem
| Constructor Detail |
|---|
public Calibration()
| Method Detail |
|---|
public void setAxisType(int axis)
axis - one of the type constants X_AXIS, Y_AXIS or XY_AXES
public Step createStep(int n,
double x,
double y)
createStep in class TTrackn - the frame numberx - the x coordinate in image spacey - the y coordinate in image space
public Step createStep(int n,
double x1,
double y1,
double x2,
double y2)
n - the frame numberx1 - the x coordinate of point 1 in image spacey1 - the y coordinate of point 1 in image spacex2 - the x coordinate of point 2 in image spacey2 - the y coordinate of point 2 in image space
public TPoint autoMarkAt(int n,
double x,
double y)
autoMarkAt in class TTrackn - the frame numberx - the x target coordinate in image spacey - the y target coordinate in image space
public Step getStep(int n)
getStep in class TTrackn - the frame number
public boolean isLocked()
isLocked in class TTracktrue if this is lockedpublic void setTrailVisible(boolean visible)
setTrailVisible in class TTrackvisible - ignoredprotected boolean isAutoTrackable()
isAutoTrackable in class TTrackpublic int getStepLength()
getStepLength in class TTrackpublic int getFootprintLength()
getFootprintLength in class TTrackpublic boolean isFixedCoordinates()
true if fixedpublic void setFixedCoordinates(boolean fixed)
fixed - true to fix the coordinatespublic void setFootprint(java.lang.String name)
setFootprint in class TTrackname - the name of the desired footprint
public Interactive findInteractive(DrawingPanel panel,
int xpix,
int ypix)
findInteractive in interface InteractivefindInteractive in class TTrackpanel - the drawing panelxpix - the x pixel position on the panelypix - the y pixel position on the panel
public void setLocked(boolean locked)
setLocked in class TTracklocked - true to lock thispublic javax.swing.JMenu getMenu(TrackerPanel trackerPanel)
getMenu in class TTracktrackerPanel - the tracker panel
public java.util.ArrayList<java.awt.Component> getToolbarTrackComponents(TrackerPanel trackerPanel)
getToolbarTrackComponents in class TTracktrackerPanel - the tracker panel
protected void refreshStep(CalibrationStep step)
step - the step to refreshpublic java.lang.String toString()
toString in class TTrackpublic void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange in interface java.beans.PropertyChangeListenerpropertyChange in class TTracke - the property change eventprotected int getTargetIndex()
getTargetIndex in class TTrackprotected java.lang.String getTargetDescription(int pointIndex)
getTargetDescription in class TTrackpointIndex - the points[] index
protected void displayWorldCoordinates()
public static XML.ObjectLoader getLoader()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||