videoRangePanel
Class VRControl
java.lang.Object
PamController.PamControlledUnit
videoRangePanel.VRControl
- All Implemented Interfaces:
- PamSettings
public class VRControl
- extends PamControlledUnit
- implements PamSettings
|
Constructor Summary |
VRControl(java.lang.String unitName)
|
| Methods inherited from class PamController.PamControlledUnit |
addOtherRelatedMenuItems, addPamProcess, addRelatedMenuItems, canClose, createDetectionMenu, createDisplayMenu, createFileMenu, createHelpMenu, fillXMLElement, fillXMLParameters, getFrameNumber, getNumPamProcesses, getPamController, getPamModuleInfo, getPamProcess, getPamView, getSidePanel, getTabClipCopier, getTabPanel, getTabSpecificMenuBar, getUnitName, getUnitType, gotoTab, notifyArrayChanged, pamHasStopped, pamToStart, removePamProcess, removeUnit, rename, saveViewerData, setFrameNumber, setPamController, setPamModuleInfo, setPamView, setSidePanel, setTabPanel, setupControlledUnit, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
vrTabPanelControl
protected VRTabPanelControl vrTabPanelControl
vrParameters
protected VRParameters vrParameters
vrSidePanel
protected VRSidePanel vrSidePanel
rangeMethods
protected VRRangeMethods rangeMethods
vrProcess
protected VRProcess vrProcess
angleListener
protected VRControl.AngleListener angleListener
angleDataBlock
protected AngleDataBlock angleDataBlock
mapFileManager
protected MapFileManager mapFileManager
shoreManager
protected ShoreManager shoreManager
shoreRanges
private double[] shoreRanges
imageAngle
private java.lang.Double imageAngle
NOIMAGE
protected static final int NOIMAGE
- See Also:
- Constant Field Values
MEASURE_FROM_HORIZON
protected static final int MEASURE_FROM_HORIZON
- See Also:
- Constant Field Values
MEASURE_FROM_SHORE
protected static final int MEASURE_FROM_SHORE
- See Also:
- Constant Field Values
CALIBRATE
protected static final int CALIBRATE
- See Also:
- Constant Field Values
MEASURE_NONE
protected static final int MEASURE_NONE
- See Also:
- Constant Field Values
MEASURE_HORIZON_1
protected static final int MEASURE_HORIZON_1
- See Also:
- Constant Field Values
MEASURE_HORIZON_2
protected static final int MEASURE_HORIZON_2
- See Also:
- Constant Field Values
MEASURE_ANIMAL
protected static final int MEASURE_ANIMAL
- See Also:
- Constant Field Values
MEASURE_DONE
protected static final int MEASURE_DONE
- See Also:
- Constant Field Values
MEASURE_SHORE
protected static final int MEASURE_SHORE
- See Also:
- Constant Field Values
CALIBRATE_1
protected static final int CALIBRATE_1
- See Also:
- Constant Field Values
CALIBRATE_2
protected static final int CALIBRATE_2
- See Also:
- Constant Field Values
CALIBRATE_DONE
protected static final int CALIBRATE_DONE
- See Also:
- Constant Field Values
DBCOMMENTLENGTH
protected static final int DBCOMMENTLENGTH
- See Also:
- Constant Field Values
vrStatus
private int vrStatus
vrSubStatus
private int vrSubStatus
imageName
private java.lang.String imageName
horizonPoint1
private java.awt.Point horizonPoint1
horizonPoint2
private java.awt.Point horizonPoint2
calibratePoint1
private java.awt.Point calibratePoint1
calibratePoint2
private java.awt.Point calibratePoint2
shorePoint
private java.awt.Point shorePoint
horizonTilt
private double horizonTilt
measuredAnimals
private java.util.ArrayList<VRMeasurement> measuredAnimals
candidateMeasurement
private VRMeasurement candidateMeasurement
VRControl
public VRControl(java.lang.String unitName)
settingsButton
protected void settingsButton(javax.swing.JFrame frame)
pasteButton
protected void pasteButton()
fileButton
protected void fileButton()
showVRTab
void showVRTab()
- Force the video range tab to be selected.
setMeasurementType
protected void setMeasurementType(int measuremntType)
clearHorizon
protected void clearHorizon()
clearShorePoint
protected void clearShorePoint()
selectCalibration
protected void selectCalibration(VRCalibrationData vrCalibrationData)
selectHeight
protected void selectHeight(int heightIndex)
setImageBrightness
protected void setImageBrightness(float brightness,
float contrast)
loadFile
private void loadFile(java.io.File file)
newImage
private void newImage()
getSettingsReference
public java.io.Serializable getSettingsReference()
- Specified by:
getSettingsReference in interface PamSettings
- Returns:
- The serialisable object that will be stored
getSettingsVersion
public long getSettingsVersion()
- Specified by:
getSettingsVersion in interface PamSettings
- Returns:
- An integer version number for the settings
restoreSettings
public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
- Specified by:
restoreSettings in interface PamSettings
- Returns:
- true if successful The object performs final checks (if needed)
and then casts the settings data
pamcontrolledunitSettings.settings into the correct type and uses
as required
newSettings
void newSettings()
notifyModelChanged
public void notifyModelChanged(int changeType)
- Description copied from class:
PamControlledUnit
- General notification when the PAMGAURD model changes.
- Overrides:
notifyModelChanged in class PamControlledUnit
- Parameters:
changeType - type of change
autoSetVrStatus
public void autoSetVrStatus()
getVrStatus
public int getVrStatus()
setVrStatus
public void setVrStatus(int vrStatus)
getVrSubStatus
public int getVrSubStatus()
setVrSubStatus
public void setVrSubStatus(int vrSubStatus)
getInstruction
java.lang.String getInstruction()
newMousePoint
void newMousePoint(java.awt.Point mousePoint)
mouseClick
void mouseClick(java.awt.Point mouseClick)
horizonPointsFromShore
private void horizonPointsFromShore(double tilt)
newAnimalMeasurement
private boolean newAnimalMeasurement(java.awt.Point animalPoint)
newAnimalMeasurement_Shore
private boolean newAnimalMeasurement_Shore(java.awt.Point animalPoint)
- Can use horizon calculation since the shore data will have generated an
artificial horizon.
- Parameters:
animalPoint - Clicked point on image
- Returns:
- true if calculation completed and range accepted bu uper.
newAnimalMeasurement_Horizon
private boolean newAnimalMeasurement_Horizon(java.awt.Point animalPoint)
- Parameters:
animalPoint - Clicked point on image
- Returns:
- true if calculation completed and range accepted bu uper.
newCalibration
private void newCalibration()
getImageName
public java.lang.String getImageName()
setImageName
public void setImageName(java.lang.String imageName)
getCalibratePoint1
public java.awt.Point getCalibratePoint1()
setCalibratePoint1
public void setCalibratePoint1(java.awt.Point calibratePoint1)
getCalibratePoint2
public java.awt.Point getCalibratePoint2()
setCalibratePoint2
public void setCalibratePoint2(java.awt.Point calibratePoint2)
getHorizonPoint1
public java.awt.Point getHorizonPoint1()
setHorizonPoint1
public void setHorizonPoint1(java.awt.Point horizonPoint1)
getHorizonPoint2
public java.awt.Point getHorizonPoint2()
setHorizonPoint2
public void setHorizonPoint2(java.awt.Point horizonPoint2)
getShorePoint
public java.awt.Point getShorePoint()
setShorePoint
public void setShorePoint(java.awt.Point shorePoint)
getMeasuredAnimals
public java.util.ArrayList<VRMeasurement> getMeasuredAnimals()
clearPoints
private void clearPoints()
getCandidateMeasurement
public VRMeasurement getCandidateMeasurement()
getImageAngle
public java.lang.Double getImageAngle()
setImageAngle
public void setImageAngle(java.lang.Double shoreAngle)
stepImageAngle
protected void stepImageAngle(double step)
getShoreRanges
public double[] getShoreRanges()
getShoreRange
public java.lang.Double getShoreRange()
- Get the shore range we want to use - not necessarily the closest.
- Returns:
- shore range to use in VR calculations.
getshoreRange
java.lang.Double getshoreRange(double[] ranges)
calculateHorizonTilt
private void calculateHorizonTilt()
- Gets called when a second horizon point is added and then
calculates the horizon tilt, based on the two points.
getHorizonTilt
public double getHorizonTilt()
setHorizonTilt
public void setHorizonTilt(double horizonTilt)