Class WhistleClassifierControl
- All Implemented Interfaces:
PamSettings
,SettingsNameProvider
Two main run modes / Three main tasks.
While running PAMGUARD, the classifier can either accumulate contours in training data files, or it can run a species classifier.
While PAMGUARD is idle, the user can run the training dialog which will take a set of training contours for various species and use them to tune a classifier.
The output from the classifier training is held in the normal module settings (in the psg files), but there is a facility for the specific training data to be exported to other files so that they can be loaded separately into different PAMGUARD configurations.
- Author:
- Doug
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateDetectionMenu
(Frame parentFrame) Create a JMenu object containing MenuItems associated with PamProcesseslong
Gets a reference to a panel to be added to a viewloadFragmentClassifierParams
(Frame frame, WhistleClassificationParameters whistleClassificationParameters) void
notifyModelChanged
(int changeType) General notification when the PAMGAURD model changes.void
Called for all controlled units after Pam acquisition has stoppedboolean
restoreSettings
(PamControlledUnitSettings pamControlledUnitSettings) boolean
saveClassifierParams
(Window frame, FragmentClassifierParams params) Save a set of classifier params.void
setFragmentClassifier
(Classifier fragmentClassifier) void
setFragmentParameteriser
(FragmentParameteriser fragmentParameteriser) void
settingsDialog
(Frame parentFrame) void
setWhistleClassificationParameters
(WhistleClassificationParameters whistleClassificationParameters) void
setWhistleFragmenter
(WhistleFragmenter whistleFragmenter) void
updateClassification
(boolean ok) called from the Classification Process whenever the statistical model has runMethods inherited from class PamController.PamControlledUnit
addOfflineTaskGroup, addOtherRelatedMenuItems, addPamProcess, addPamProcess, addRelatedMenuItems, canClose, canPlayViewerSound, 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, getTabSpecificMenuBar, getToolbarComponent, getUnitName, getUnitType, getVerboseLevel, gotoTab, isInMainConfiguration, isNetRx, isViewer, pamClose, pamToStart, playViewerSound, removePamProcess, removeUnit, rename, saveViewerData, setFrameNumber, setModuleStatusManager, setPamConfiguration, setPamController, setPamModuleInfo, setPamView, setSidePanel, setTabPanel, setToolbarComponent, setupControlledUnit, stopViewerSound, tellModule, terminalPrint, terminalPrintln, toString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface PamController.PamSettings
getUnitType
Methods inherited from interface PamController.SettingsNameProvider
getUnitName
-
Field Details
-
trainingFileEnd
File end for training data (contour) files- See Also:
-
classifierFileEnd
File end for whistle classifier data (i.e. Eigen matrixes and that stuff)- See Also:
-
-
Constructor Details
-
WhistleClassifierControl
-
-
Method Details
-
getWhistleClassifierProcess
- Returns:
- the whistleClassifierProcess
-
createDetectionMenu
Description copied from class:PamControlledUnit
Create a JMenu object containing MenuItems associated with PamProcesses- Overrides:
createDetectionMenu
in classPamControlledUnit
- Parameters:
parentFrame
- The owner frame of the menu- Returns:
- reference to a JMenu which can be added to an existing menu or
menu bar
Note that if multiple views are to use the same menu, then they should each create a new menu (by setting Create to true) the first time they call this method.
-
settingsDialog
-
pamHasStopped
public void pamHasStopped()Description copied from class:PamControlledUnit
Called for all controlled units after Pam acquisition has stopped- Overrides:
pamHasStopped
in classPamControlledUnit
-
notifyModelChanged
public void notifyModelChanged(int changeType) Description copied from class:PamControlledUnit
General notification when the PAMGAURD model changes.- Overrides:
notifyModelChanged
in classPamControlledUnit
- Parameters:
changeType
- type of change
-
getTabPanel
Description copied from class:PamControlledUnit
Gets a reference to a panel to be added to a view- Overrides:
getTabPanel
in classPamControlledUnit
- Returns:
- reference to a PamTabPanel object
- See Also:
-
updateClassification
public void updateClassification(boolean ok) called from the Classification Process whenever the statistical model has run- Parameters:
ok
-
-
getSettingsReference
- Specified by:
getSettingsReference
in interfacePamSettings
- Returns:
- The serialisable object that will be stored
-
getSettingsVersion
public long getSettingsVersion()- Specified by:
getSettingsVersion
in interfacePamSettings
- Returns:
- An integer version number for the settings
-
restoreSettings
- Specified by:
restoreSettings
in interfacePamSettings
- 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
-
saveClassifierParams
Save a set of classifier params. Since this is primarily an export function, it will always show the file save dialog- Parameters:
params
- parameters to save- Returns:
- true if successful.
-
loadFragmentClassifierParams
public FragmentClassifierParams loadFragmentClassifierParams(Frame frame, WhistleClassificationParameters whistleClassificationParameters) -
setWhistleFragmenter
- Parameters:
whistleFragmenter
- the whistleFragmenter to set
-
getWhistleFragmenter
- Returns:
- the whistleFragmenter
-
setWhistleClassificationParameters
public void setWhistleClassificationParameters(WhistleClassificationParameters whistleClassificationParameters) - Parameters:
whistleClassificationParameters
- the whistleClassificationParameters to set
-
getWhistleClassificationParameters
- Returns:
- the whistleClassificationParameters
-
getFragmentParameteriser
-
setFragmentParameteriser
-
setFragmentClassifier
- Parameters:
fragmentClassifier
- the fragmentClassifier to set
-
getFragmentClassifier
- Returns:
- the fragmentClassifier
-