Class VRControl
- All Implemented Interfaces:
 PamSettings,SettingsNameProvider
However, not all these parameters are necessarily needed to gain some sort of location information. For example, tilt and pitch, focal length and height can determine the distance to animal without the need for heading information or a GPS location.
There are various ways a user can determine required parameters, either directly from a photograph or external data. The simplest example is using the horizon to determine the pitch and tilt of the camera and manually inputting height data along with a calibration (pixels per degree/rad) value. Users may want to use external IMU data, either in real time or for post processing. Geo-tagged photos are another option.
This module is designed to provide a framework for photogrammetry. The core functionality allows users to open and view photographs/images along with any meta data. VRMethod classes are then used to provide the user interface for determining the l.ocation of an object
VRmethods use a JLayer over the photograph to allow users to select locations, draw lines etc. Each VRMethod has it's own side panel and ribbon panel to allow users to input information and select relevant. The VRMethod is responsible for calculating location information which is passed back to VRControl to be saved as a generic video range data unit.
Generic Information Handled outside VRMethods (these are used by one or more VRMethods but handled solely within a VRMethod class)
GPS location of camera
Calibration Values
Landmark Locations
Tide Information
Imported Maps
External Sensor data
Photo meta data
- Author:
 - Doug Gillespie and Jamie Macaulay
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AngleListenerPamProcess to listen for heading angle measurements (AngleMeasurment)static final intstatic final intThe heading of the image has been changed (usually manually).static final intThe height has been changedstatic final intThe image has changedstatic final intThe scale of the image has been changed.static final intThe time of the image has been changed.protected IMUListenerPamProcess to listen for IMU measurments (IMUModule)static final intThe landmark group selection has been changedprotected MapFileManagerManages map information for VR Methodsstatic final intThe vrMethod has changedstatic final intThe mouse has moved on the display.static final intstatic final intThe pitch of the image has been changed (usually manually)protected VRHorzMethodsDifferent methods for determining range from image measurements.static final intA repaint has been called.static final intSome settings in the vrparams may have changedprotected TideManagerManages TIDE information for VR Methodsstatic final intThe roll of the image has been changed (usually manually), note: roll is often referred to as tilt.protected VRParametersVideo range paramters.protected VRProcessPamProcess for the video range modulePanel containing all gui componentsFields inherited from class PamController.PamControlledUnit
isMixed, isViewer - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionfindNextFile(File file, ImageFileFilter filefilter, boolean forward) Find the next file which is approved by the Image file filter in the folder.Get the calibration method.doubleGet the current height of the camera from sea level.Get the current pam image.Get the current vr Method.Get the date of the image.longGet the current image time in millis.Get the current image time aprserGet the time of the current image.Get the location manager.Get the file manager for shore based method maps.Get a list of the current measurements on the imageGet an arraylist of all the vr methods currently available.longGet the import system for tide data.Get the tide manager.Get the vr panel.Get the VR paramters class.Get the VRProcess.intbooleanisFX()Check whether the GUI is FX or not.voidLoad an image filevoidnewMousePoint(Point mousePoint) voidnotifyModelChanged(int changeType) General notification when the PAMGAURD model changes.voidPastes an image from the computers clipboard.booleanrestoreSettings(PamControlledUnitSettings pamControlledUnitSettings) voidselectHeight(int heightIndex) Set the current selected heightvoidsetCurrentImage(PamImage image) Set the current image.voidsetMeasuredAnimals(ArrayList<VRMeasurement> measuredAnimals) voidsetRangeMethods(VRHorzMethods rangeMethods) voidsettingsButtonAWT(Frame frame, int tab) Opens the settings dialog and updates the module if new settings are saved.voidsettingsButtonFX(int tab) Opens settings pane which updates module settingsvoidsetVRMethod(int method) Set the current method.voidsetVRParams(VRParameters newParams) voidupdate(int updateType) Updates the VRControl depending on flag and passes update flag to the VRTabPanel (gui) and the VRMethods.Methods inherited from class PamController.PamControlledUnit
addOfflineTaskGroup, addOtherRelatedMenuItems, addPamProcess, addPamProcess, addRelatedMenuItems, canClose, canPlayViewerSound, createDetectionMenu, createDisplayMenu, createFileMenu, createHelpMenu, flushDataBlockBuffers, getBackupInformation, getFrameNumber, getGUI, getGuiFrame, getInstanceIndex, getModuleStatus, getModuleStatusManager, getModuleSummary, getModuleSummary, getNumOfflineTaskGroups, getNumPamProcesses, getOfflineState, getOfflineTaskGroup, getPamConfiguration, getPamController, getPamModuleInfo, getPamProcess, getPamView, getPlugin, getShortUnitType, getSidePanel, getTabClipCopier, getTabPanel, getTabSpecificMenuBar, getToolbarComponent, getUnitName, getUnitTaskManager, getUnitTaskManager, getUnitType, getVerboseLevel, gotoTab, isInMainConfiguration, isNetRx, isViewer, pamClose, pamHasStopped, pamToStart, playViewerSound, removePamProcess, removeUnit, rename, saveViewerData, setFrameNumber, setModuleStatusManager, setPamConfiguration, setPamController, setPamModuleInfo, setPamView, setSidePanel, setTabPanel, setToolbarComponent, setUnitTaskManager, setupControlledUnit, stopViewerSound, tellModule, terminalPrint, terminalPrintln, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface PamController.PamSettings
getUnitTypeMethods inherited from interface PamController.SettingsNameProvider
getUnitName 
- 
Field Details
- 
vrTabPanelControl
Panel containing all gui components - 
vrParameters
Video range paramters. Stores settings. - 
rangeMethods
Different methods for determining range from image measurements. - 
vrProcess
PamProcess for the video range module - 
angleListener
PamProcess to listen for heading angle measurements (AngleMeasurment) - 
imuListener
PamProcess to listen for IMU measurments (IMUModule) - 
mapFileManager
Manages map information for VR Methods - 
tideManager
Manages TIDE information for VR Methods - 
SETTINGS_CHANGE
public static final int SETTINGS_CHANGESome settings in the vrparams may have changed- See Also:
 
 - 
IMAGE_CHANGE
public static final int IMAGE_CHANGEThe image has changed- See Also:
 
 - 
IMAGE_SCALE_CHANGE
public static final int IMAGE_SCALE_CHANGEThe scale of the image has been changed.- See Also:
 
 - 
IMAGE_TIME_CHANGE
public static final int IMAGE_TIME_CHANGEThe time of the image has been changed.- See Also:
 
 - 
HEADING_UPDATE
public static final int HEADING_UPDATEThe heading of the image has been changed (usually manually).- See Also:
 
 - 
PITCH_UPDATE
public static final int PITCH_UPDATEThe pitch of the image has been changed (usually manually)- See Also:
 
 - 
TILT_UPDATE
public static final int TILT_UPDATEThe roll of the image has been changed (usually manually), note: roll is often referred to as tilt.- See Also:
 
 - 
METHOD_CHANGED
public static final int METHOD_CHANGEDThe vrMethod has changed- See Also:
 
 - 
REPAINT
public static final int REPAINTA repaint has been called.- See Also:
 
 - 
NOIMAGE
public static final int NOIMAGE- See Also:
 
 - 
MOUSEMOVED
public static final int MOUSEMOVEDThe mouse has moved on the display.- See Also:
 
 - 
LANDMARKGROUP_CHANGE
public static final int LANDMARKGROUP_CHANGEThe landmark group selection has been changed- See Also:
 
 - 
HEIGHT_CHANGE
public static final int HEIGHT_CHANGEThe height has been changed- See Also:
 
 - 
DBCOMMENTLENGTH
public static final int DBCOMMENTLENGTH- See Also:
 
 
 - 
 - 
Constructor Details
- 
VRControl
 
 - 
 - 
Method Details
- 
getMethods
Get an arraylist of all the vr methods currently available.- Returns:
 
 - 
setVRMethod
public void setVRMethod(int method) Set the current method.- Parameters:
 method- - integer specifying method position in vrMethods ArrayList.
 - 
getCurrentMethod
Get the current vr Method.- Returns:
 
 - 
getCalibrationMethod
Get the calibration method. Some dialogs require this.- Returns:
 - the AddCalibration vrmethod
 
 - 
settingsButtonAWT
Opens the settings dialog and updates the module if new settings are saved.- Parameters:
 frame-tab- - the tab to open the settings dialog on.
 - 
settingsButtonFX
public void settingsButtonFX(int tab) Opens settings pane which updates module settings- Parameters:
 tab- - which tab to open on. e.g. VRSettingsPane.HEIGHTTAB;
 - 
setVRParams
- Parameters:
 newParams-
 - 
pasteButton
public void pasteButton()Pastes an image from the computers clipboard. - 
findNextFile
Find the next file which is approved by the Image file filter in the folder. Returns null if no file is found.- Parameters:
 file- - current file selected in the directory. If null the first file in the directory is chosen.filefilter- - the file filter.forward- - true move forward in the folder, false move backward in the folder.- Returns:
 - the image file
 
 - 
selectHeight
public void selectHeight(int heightIndex) Set the current selected height- Parameters:
 heightIndex-
 - 
getCurrentHeight
public double getCurrentHeight()Get the current height of the camera from sea level. Includes any offset calulated by the tide manager.- Returns:
 - the current height oif the camera from sea level- (this is fiorm the current sea level)
 
 - 
loadFile
Load an image file- Parameters:
 file- - image file.
 - 
getSettingsReference
- Specified by:
 getSettingsReferencein interfacePamSettings- Returns:
 - The serialisable object that will be stored
 
 - 
getSettingsVersion
public long getSettingsVersion()- Specified by:
 getSettingsVersionin interfacePamSettings- Returns:
 - An integer version number for the settings
 
 - 
restoreSettings
- Specified by:
 restoreSettingsin interfacePamSettings- Parameters:
 pamControlledUnitSettings-- 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
 
 - 
update
public void update(int updateType) Updates the VRControl depending on flag and passes update flag to the VRTabPanel (gui) and the VRMethods.- Parameters:
 updateType-
 - 
notifyModelChanged
public void notifyModelChanged(int changeType) Description copied from class:PamControlledUnitGeneral notification when the PAMGAURD model changes.- Overrides:
 notifyModelChangedin classPamControlledUnit- Parameters:
 changeType- type of change
 - 
getVrSubStatus
public int getVrSubStatus() - 
newMousePoint
 - 
getImageName
- Returns:
 
 - 
getImageTimeString
Get the time of the current image.- Returns:
 - the image date and time string.
 
 - 
getMeasuredAnimals
Get a list of the current measurements on the image- Returns:
 - the current measurements on the image
 
 - 
getVRParams
Get the VR paramters class.- Returns:
 - the vr params.
 
 - 
getVRPanel
Get the vr panel.- Returns:
 
 - 
getVRProcess
Get the VRProcess.- Returns:
 - the vr process.
 
 - 
setMeasuredAnimals
 - 
getRangeMethods
 - 
setRangeMethods
 - 
getMapFileManager
Get the file manager for shore based method maps.- Returns:
 - the map manager
 
 - 
getLocationManager
Get the location manager. This handles the location of the images.- Returns:
 - the location manager
 
 - 
getTideManager
Get the tide manager. This handles tide imports.- Returns:
 - tide imports.
 
 - 
setCurrentImage
Set the current image.- Parameters:
 image- - the current displayed image.
 - 
getCurrentImage
Get the current pam image.- Returns:
 - the current image.
 
 - 
getVRTabPanel
 - 
getImageTime
public long getImageTime()Get the current image time in millis.- Returns:
 - the current image time.
 
 - 
getImageDate
Get the date of the image.- Returns:
 - the date of the image
 
 - 
getIMUListener
 - 
isFX
public boolean isFX()Check whether the GUI is FX or not.- Returns:
 
 - 
getTideImport
Get the import system for tide data.- Returns:
 - the tideImport
 
 - 
getImageTimeParser
Get the current image time aprser- Returns:
 
 
 -