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
FieldsModifier and TypeFieldDescriptionstatic final StringFile end for whistle classifier data (i.e.static final StringFile end for training data (contour) filesprotected WhistleClassifierProcessFields inherited from class PamController.PamControlledUnit
isMixed - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptioncreateDetectionMenu(Frame parentFrame) Create a JMenu object containing MenuItems associated with PamProcesseslongGets a reference to a panel to be added to a viewloadFragmentClassifierParams(Frame frame, WhistleClassificationParameters whistleClassificationParameters) voidnotifyModelChanged(int changeType) General notification when the PAMGAURD model changes.voidCalled for all controlled units after Pam acquisition has stoppedbooleanrestoreSettings(PamControlledUnitSettings pamControlledUnitSettings) booleansaveClassifierParams(Window frame, FragmentClassifierParams params) Save a set of classifier params.voidsetFragmentClassifier(Classifier fragmentClassifier) voidsetFragmentParameteriser(FragmentParameteriser fragmentParameteriser) voidsettingsDialog(Frame parentFrame) voidsetWhistleClassificationParameters(WhistleClassificationParameters whistleClassificationParameters) voidsetWhistleFragmenter(WhistleFragmenter whistleFragmenter) voidupdateClassification(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, getUnitTaskManager, getUnitTaskManager, getUnitType, getVerboseLevel, gotoTab, isInMainConfiguration, isNetRx, isViewer, pamClose, 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
- 
whistleClassifierProcess
 - 
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:PamControlledUnitCreate a JMenu object containing MenuItems associated with PamProcesses- Overrides:
 createDetectionMenuin 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:PamControlledUnitCalled for all controlled units after Pam acquisition has stopped- Overrides:
 pamHasStoppedin classPamControlledUnit
 - 
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
 - 
getTabPanel
Description copied from class:PamControlledUnitGets a reference to a panel to be added to a view- Overrides:
 getTabPanelin 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:
 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
 
 - 
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
 
 
 -