|
|||||||||
| 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.RGBRegion
public class RGBRegion
A RGBRegion measures RGB properties in a circular region of a video image.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.opensourcephysics.cabrillo.tracker.TTrack |
|---|
TTrack.StepArray |
| Field Summary | |
|---|---|
protected boolean |
dataHidden
|
protected static int |
defaultRadius
|
protected boolean |
firstTimeRadiusUnfixed
|
protected boolean |
fixedPosition
|
protected javax.swing.JCheckBoxMenuItem |
fixedPositionItem
|
protected boolean |
fixedRadius
|
protected javax.swing.JCheckBoxMenuItem |
fixedRadiusItem
|
protected boolean |
loading
|
protected static int |
MAX_RADIUS
|
protected IntegerField |
radiusField
|
protected java.util.TreeSet<java.lang.Integer> |
radiusKeyFrames
|
protected javax.swing.JLabel |
radiusLabel
|
protected java.util.ArrayList<RGBStep> |
validSteps
|
| Constructor Summary | |
|---|---|
RGBRegion()
Constructs a RGBRegion. |
|
| Method Summary | |
|---|---|
TPoint |
autoMarkAt(int n,
double x,
double y)
Used by autoTracker to mark a step at a match target position. |
protected void |
clearData()
Clears the data. |
Step |
createStep(int n,
double x,
double y)
Creates a new step. |
Step |
deleteStep(int n)
Overrides TTrack deleteStep method to prevent deletion. |
void |
draw(DrawingPanel panel,
java.awt.Graphics _g)
Overrides TTrack draw method. |
Interactive |
findInteractive(DrawingPanel panel,
int xpix,
int ypix)
Overrides TTrack 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. |
static double |
getLuma(double r,
double g,
double b)
Returns the luma (perceived brightness) of a video RGB color. |
javax.swing.JMenu |
getMenu(TrackerPanel trackerPanel)
Overrides TTrack getMenu method. |
int |
getRadius()
Gets the radius. |
Step |
getStep(int n)
Overrides TTrack getStep method to provide fixed behavior. |
int |
getStepLength()
Gets the length of the steps created by this track. |
java.util.ArrayList<java.awt.Component> |
getToolbarPointComponents(TrackerPanel trackerPanel,
TPoint point)
Overrides TTrack getToolbarPointComponents method. |
java.util.ArrayList<java.awt.Component> |
getToolbarTrackComponents(TrackerPanel trackerPanel)
Overrides TTrack getToolbarTrackComponents method. |
protected void |
hideData()
Hides the data. |
boolean |
isAutoAdvance()
Gets the autoAdvance property. |
protected boolean |
isAutoTrackable()
Determines if any point in this track is autotrackable. |
boolean |
isFixedPosition()
Gets the fixed position property. |
boolean |
isFixedRadius()
Gets the fixed radius property. |
void |
propertyChange(java.beans.PropertyChangeEvent e)
Responds to property change events. |
protected void |
refreshData(DatasetManager data,
TrackerPanel trackerPanel)
Refreshes the data. |
protected void |
refreshStep(RGBStep step)
Refreshes a step by setting it equal to a keyframe step. |
void |
setFixedPosition(boolean fixed)
Sets the fixed position property. |
void |
setFixedRadius(boolean fixed)
Sets the fixed radius property. |
protected void |
setRadius(int n,
int r)
Sets the radius of a step and posts an undoable edit |
void |
setTrailVisible(boolean visible)
Overrides TTrack setTrailVisible method to keep trails hidden. |
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 MAX_RADIUS
protected static int defaultRadius
protected boolean fixedPosition
protected boolean fixedRadius
protected javax.swing.JCheckBoxMenuItem fixedPositionItem
protected javax.swing.JCheckBoxMenuItem fixedRadiusItem
protected javax.swing.JLabel radiusLabel
protected IntegerField radiusField
protected boolean firstTimeRadiusUnfixed
protected java.util.ArrayList<RGBStep> validSteps
protected boolean dataHidden
protected boolean loading
protected java.util.TreeSet<java.lang.Integer> radiusKeyFrames
| Constructor Detail |
|---|
public RGBRegion()
| Method Detail |
|---|
public void setFixedPosition(boolean fixed)
fixed - true to fix the positionpublic boolean isFixedPosition()
true if image position is fixedpublic void setFixedRadius(boolean fixed)
fixed - true to fix the radiuspublic boolean isFixedRadius()
true if radius is fixed
protected void setRadius(int n,
int r)
n - the frame numberr - the desired radiuspublic int getRadius()
public void draw(DrawingPanel panel,
java.awt.Graphics _g)
draw in interface Drawabledraw in class TTrackpanel - the drawing panel requesting the drawing_g - the graphics context on which to draw
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 setTrailVisible(boolean visible)
setTrailVisible in class TTrackvisible - ignoredpublic boolean isAutoAdvance()
isAutoAdvance in class TTrackfalse
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 deleteStep(int n)
deleteStep in class TTrackn - the frame number
public Step getStep(int n)
getStep in class TTrackn - the frame number
public int getStepLength()
getStepLength in class TTrack
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
protected boolean isAutoTrackable()
isAutoTrackable in class TTrackpublic int getFootprintLength()
getFootprintLength in class TTrackprotected void clearData()
protected void hideData()
protected void refreshData(DatasetManager data,
TrackerPanel trackerPanel)
refreshData in class TTrackdata - the DatasetManagertrackerPanel - the tracker panelpublic 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
public java.util.ArrayList<java.awt.Component> getToolbarPointComponents(TrackerPanel trackerPanel,
TPoint point)
getToolbarPointComponents in class TTracktrackerPanel - the tracker panelpoint - the TPoint
public void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange in interface java.beans.PropertyChangeListenerpropertyChange in class TTracke - the property change eventpublic java.lang.String toString()
toString in class TTrackprotected void refreshStep(RGBStep step)
step - the step to refresh
public static double getLuma(double r,
double g,
double b)
r - red componentg - green componentb - blue component
public static XML.ObjectLoader getLoader()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||