Package clickTrainDetector
Class ClickTrainControl
java.lang.Object
PamController.PamControlledUnit
clickTrainDetector.ClickTrainControl
- All Implemented Interfaces:
PamSettings
,SettingsNameProvider
A click train detector. The detector has a detection stage and a classification stage.
The detector is an algorithm which extract any plausible click train from the data.
The classification stage decides whether a detected click train should be saved or removed form the click train data block.
- Author:
- Jamie Macaulay
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The PAMGuard clock has been updated.static final String
Help point which can be referenced form dialogs, etc.static final int
Flag to indicate a setup is requiredstatic final int
Flag indicating a new parent data block has been selected.static final int
static final int
Flag for processing start -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
createDataSelector
(PamDataBlock<?> source) Get the data selector.createDetectionMenu
(Frame parentFrame) Create a JMenu object containing MenuItems associated with PamProcessesboolean
Called whenever CLICK train settings panes should getParams() e.g.The classifier manager.Get the classification processGet the parent data block if it is a click train data blockGet all available click train algorithms.Get the click train data block.Get click train parameters.Get click train process.Get the offline process for the click train detector i.e.Get the classified click train data block.Get the algorithm info manager.Get the classification process.Get the click train localisation process.Get the current classifiers.Get the current click train algorithm.The current data selector.getGUI
(int flag) Get the GUI for the PAMControlled unit.Quick convenient way of getting the module status.PamDataBlock<?>
Convenience method to get the current parent data block of the process.long
Swing GUIGet the warning manager.boolean
True to notify downstream processes if a new click train is detected.void
notifyModelChanged
(int changeType) General notification when the PAMGAURD model changes.boolean
restoreSettings
(PamControlledUnitSettings pamControlledUnitSettings) void
setClickTrainParams
(ClickTrainParams clickTrainParams) void
setNotifyProcesses
(boolean notify) Set whether to notify downstream processes if a new click train is detected.void
called for all PamControlledUnits after all units have been created.void
update
(int flag) Send update flag to module.void
updateParams
(ClickTrainParams newParams) Update the parameters.Methods inherited from class PamController.PamControlledUnit
addOfflineTaskGroup, addOtherRelatedMenuItems, addPamProcess, addPamProcess, addRelatedMenuItems, canClose, canPlayViewerSound, createDisplayMenu, createFileMenu, createHelpMenu, flushDataBlockBuffers, getBackupInformation, getFrameNumber, getGuiFrame, getInstanceIndex, getModuleStatusManager, getModuleSummary, getModuleSummary, getNumOfflineTaskGroups, getNumPamProcesses, getOfflineState, getOfflineTaskGroup, getPamConfiguration, getPamController, getPamModuleInfo, getPamProcess, getPamView, getPlugin, getShortUnitType, getTabClipCopier, getTabPanel, getTabSpecificMenuBar, getToolbarComponent, getUnitName, getUnitType, getVerboseLevel, gotoTab, isInMainConfiguration, isNetRx, isViewer, pamClose, pamHasStopped, pamToStart, playViewerSound, removePamProcess, removeUnit, rename, saveViewerData, setFrameNumber, setModuleStatusManager, setPamConfiguration, setPamController, setPamModuleInfo, setPamView, setSidePanel, setTabPanel, setToolbarComponent, 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
-
PROCESSING_START
public static final int PROCESSING_STARTFlag for processing start- See Also:
-
NEW_PARAMS
public static final int NEW_PARAMSFlag to indicate a setup is required- See Also:
-
PROCESSING_END
public static final int PROCESSING_END- See Also:
-
NEW_PARENT_DATABLOCK
public static final int NEW_PARENT_DATABLOCKFlag indicating a new parent data block has been selected. This allows settings panes to execute any appropriate GUI changes.- See Also:
-
CLOCK_UPDATE
public static final int CLOCK_UPDATEThe PAMGuard clock has been updated.- See Also:
-
helpPoint
Help point which can be referenced form dialogs, etc.- See Also:
-
-
Constructor Details
-
ClickTrainControl
Constructor for the ClickTrainControl.- Parameters:
unitName
- - the unit name.
-
-
Method Details
-
getClickTrainDataBlock
Get the click train data block. The click train data block holds all confirmed click trains included those which are not classified to species.- Returns:
- the clickTrainDataBlock
-
getClssfdClickTrainDataBlock
Get the classified click train data block. This holds click trains which have been classified to a species.- Returns:
- the classified click train data block.
-
setClickTrainParams
-
setupControlledUnit
public void setupControlledUnit()Description copied from class:PamControlledUnit
called for all PamControlledUnits after all units have been created. This is a good time for the controlled units and processes to find and check their source data and the configuration generally since most onjects (i.e. output data blocks) should be in place- Overrides:
setupControlledUnit
in classPamControlledUnit
-
getDataSelector
The current data selector.- Returns:
- the current data selector.
-
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
-
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
-
getClickTrainParams
Get click train parameters.- Returns:
- the click train parameters.
-
getClickTrainProcess
Get click train process.- Returns:
- the click train process.
-
getCurrentCTAlgorithm
Get the current click train algorithm.- Returns:
- the click train algorithm.
-
update
public void update(int flag) Send update flag to module. Sends the flag to all click train algorithms.- Parameters:
flag
- - the update flag.
-
getCTClassificationProcess
Get the classification process. This classifies the click train.- Returns:
- the ctClassificationProcess
-
getClickTrainAlgorithms
Get all available click train algorithms.- Returns:
- list of available click train algorithms.
-
updateParams
Update the parameters.- Parameters:
newParams
- - the parameters to update.
-
getParentDataBlock
Convenience method to get the current parent data block of the process.- Returns:
- - the parent data block.
-
getClickDataBlock
Get the parent data block if it is a click train data block- Returns:
- the click data block.
-
getAlgorithmParams
public boolean getAlgorithmParams()Called whenever CLICK train settings panes should getParams() e.g. when a dialog is closed. The algorithms handle their own settings. -
getCurrentClassifiers
Get the current classifiers.- Returns:
- the current classifiers.
-
getSidePanel
Swing GUI- Overrides:
getSidePanel
in classPamControlledUnit
- Returns:
- a pamSidePanel object.
- See Also:
-
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.
-
getSwingGUI
-
getGUI
Description copied from class:PamControlledUnit
Get the GUI for the PAMControlled unit. This has multiple GUI options which are instantiated depending on the view type.- Overrides:
getGUI
in classPamControlledUnit
- Parameters:
flag
- . The GUI type flag defined in PAMGuiManager.- Returns:
- the GUI for the PamControlledUnit unit.
-
getClickTrainsOffline
Get the offline process for the click train detector i.e. using it in viewer mode.- Returns:
- the offline process.
-
createDataSelector
Get the data selector.- Parameters:
source
- - the source data block
-
getClassifierManager
The classifier manager.- Returns:
- the classifier manager.
-
getClickClassifierProccess
Get the classification process- Returns:
- the classification process.
-
getCTLocalisationProccess
Get the click train localisation process. This localises clicks from the classified click train data block.- Returns:
- the click loclaisation process.
-
getWarningManager
Get the warning manager. This handles any warning messages passed from the UI or other processes.- Returns:
- the warning manager.
-
isNotifyProcesses
public boolean isNotifyProcesses()True to notify downstream processes if a new click train is detected.- Returns:
- true to notify processes.
-
setNotifyProcesses
public void setNotifyProcesses(boolean notify) Set whether to notify downstream processes if a new click train is detected. -
getModuleStatus
Description copied from class:PamControlledUnit
Quick convenient way of getting the module status.- Overrides:
getModuleStatus
in classPamControlledUnit
- Returns:
- Module Status or null if no status manager present.
-
getCTAlgorithmInfoManager
Get the algorithm info manager. This handles logging information on different algorithms into the database- Returns:
-