Package matchedTemplateClassifer
Class MTClassifierControl
java.lang.Object
PamController.PamControlledUnit
matchedTemplateClassifer.MTClassifierControl
- All Implemented Interfaces:
ClickTypeProvider
,PamSettings
,SettingsNameProvider
public class MTClassifierControl
extends PamControlledUnit
implements PamSettings, ClickTypeProvider
Classifier which classifies clicks.
- Author:
- Jamie Macaulay
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Flag to indicate a setup is requiredstatic final int
static final int
Flag for processing start -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
codeToListIndex
(int code) Returns the index in the list for the click type.createDetectionMenu
(Frame parentFrame) Create a JMenu object containing MenuItems associated with PamProcessesint[]
Returns a list of the currently-defined click types / species codes.getGUI
(int flag) Get the GUI for the PAMControlled unit.Get params for the controlled unit.Get the MT process.The offline MT process.Convenience function to get parent data blockGet the settings pane.long
String[]
Get a list of species names.getSymbolData
(byte clickType) Returns the symbol data for a classification type.Get a list of symbols for each species corresponding to getSpeciesList.void
notifyModelChanged
(int changeType) General notification when the PAMGAURD model changes.boolean
restoreSettings
(PamControlledUnitSettings pamControlledUnitSettings) void
setMTParams
(MatchedTemplateParams newParams) void
Currently the click detector has an integrated classifier and click detection type flags are integrated into this.void
called for all PamControlledUnits after all units have been created.void
showSettingsDialog
(Frame parentFrame) Show settings dialog.void
update
(int processingFlag) Called whenever offline processing is occurringMethods inherited from class PamController.PamControlledUnit
addOfflineTaskGroup, addOtherRelatedMenuItems, addPamProcess, addPamProcess, addRelatedMenuItems, canClose, canPlayViewerSound, createDisplayMenu, createFileMenu, createHelpMenu, flushDataBlockBuffers, getBackupInformation, getFrameNumber, getGuiFrame, getInstanceIndex, getModuleStatus, getModuleStatusManager, getModuleSummary, getModuleSummary, getNumOfflineTaskGroups, getNumPamProcesses, getOfflineState, getOfflineTaskGroup, getPamConfiguration, getPamController, getPamModuleInfo, getPamProcess, getPamView, getPlugin, getShortUnitType, getSidePanel, getTabClipCopier, getTabPanel, getTabSpecificMenuBar, getToolbarComponent, getUnitName, 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.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:
-
-
Constructor Details
-
MTClassifierControl
-
-
Method Details
-
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
-
setupClickClassifier
public void setupClickClassifier()Currently the click detector has an integrated classifier and click detection type flags are integrated into this. Therefore to properly display flags in the click detectior display and generic time base displays a classifer needs to be set up in the click detector. This is a bit of a HACK for now. Currently we set the flag of this classifier to 101. -
showSettingsDialog
Show settings dialog.- Parameters:
parentFrame
- - the frame.
-
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
-
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.
-
getSettingsPane
Get the settings pane.- Returns:
- the settings pane.
-
getMTParams
Get params for the controlled unit.- Returns:
- the params.
-
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
-
getUnitType
- Specified by:
getUnitType
in interfacePamSettings
- Overrides:
getUnitType
in classPamControlledUnit
- Returns:
- A Name specific to the type, e.g. Click detector
-
getSettingsReference
- Specified by:
getSettingsReference
in interfacePamSettings
- Returns:
- The serialisable object that will be stored
-
getParentDataBlock
Convenience function to get parent data block- Returns:
- the parent data block.
-
getMTProcess
Get the MT process.- Returns:
- the MT process.
-
update
public void update(int processingFlag) Called whenever offline processing is occurring- Parameters:
processingFlag
-
-
getSymbolData
Returns the symbol data for a classification type. If the type does not match the current type then null is returned.- Parameters:
clickType
- - the click type.- Returns:
- symbol data for the click type.
-
getSpeciesList
Description copied from interface:ClickTypeProvider
Get a list of species names.- Specified by:
getSpeciesList
in interfaceClickTypeProvider
- Returns:
- list speces names.
-
getCodeList
public int[] getCodeList()Description copied from interface:ClickTypeProvider
Returns a list of the currently-defined click types / species codes.- Specified by:
getCodeList
in interfaceClickTypeProvider
- Returns:
- int array with the codes
-
codeToListIndex
public int codeToListIndex(int code) Description copied from interface:ClickTypeProvider
Returns the index in the list for the click type.- Specified by:
codeToListIndex
in interfaceClickTypeProvider
- Parameters:
code
- - the click type code- Returns:
- the index.
-
getSymbolsData
Description copied from interface:ClickTypeProvider
Get a list of symbols for each species corresponding to getSpeciesList.- Specified by:
getSymbolsData
in interfaceClickTypeProvider
- Returns:
- list of species symbols.
-
getOfflineMTProcess
The offline MT process.- Returns:
- the offline mt process.
-
setMTParams
-
getGUI
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.
-