Class ClickTrainControl

java.lang.Object
PamController.PamControlledUnit
clickTrainDetector.ClickTrainControl
All Implemented Interfaces:
PamSettings, SettingsNameProvider

public class ClickTrainControl extends PamControlledUnit implements PamSettings
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 Details Link icon

    • PROCESSING_START Link icon

      public static final int PROCESSING_START
      Flag for processing start
      See Also:
    • NEW_PARAMS Link icon

      public static final int NEW_PARAMS
      Flag to indicate a setup is required
      See Also:
    • PROCESSING_END Link icon

      public static final int PROCESSING_END
      See Also:
    • NEW_PARENT_DATABLOCK Link icon

      public static final int NEW_PARENT_DATABLOCK
      Flag indicating a new parent data block has been selected. This allows settings panes to execute any appropriate GUI changes.
      See Also:
    • CLOCK_UPDATE Link icon

      public static final int CLOCK_UPDATE
      The PAMGuard clock has been updated.
      See Also:
    • saveTrains Link icon

      protected boolean saveTrains
      True to allow saving of trains. ONLY FOR DEBUG PURPOSES- true to save data units, false otherwise.
    • helpPoint Link icon

      public static final String helpPoint
      Help point which can be referenced form dialogs, etc.
      See Also:
  • Constructor Details Link icon

    • ClickTrainControl Link icon

      public ClickTrainControl(String unitName)
      Constructor for the ClickTrainControl.
      Parameters:
      unitName - - the unit name.
  • Method Details Link icon

    • getClickTrainDataBlock Link icon

      public ClickTrainDataBlock 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 Link icon

      public 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 Link icon

      public void setClickTrainParams(ClickTrainParams clickTrainParams)
    • setupControlledUnit Link icon

      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 class PamControlledUnit
    • getDataSelector Link icon

      public DataSelector getDataSelector()
      The current data selector.
      Returns:
      the current data selector.
    • getSettingsReference Link icon

      public Serializable getSettingsReference()
      Specified by:
      getSettingsReference in interface PamSettings
      Returns:
      The serialisable object that will be stored
    • getSettingsVersion Link icon

      public long getSettingsVersion()
      Specified by:
      getSettingsVersion in interface PamSettings
      Returns:
      An integer version number for the settings
    • restoreSettings Link icon

      public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
      Specified by:
      restoreSettings in interface PamSettings
      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
    • notifyModelChanged Link icon

      public void notifyModelChanged(int changeType)
      Description copied from class: PamControlledUnit
      General notification when the PAMGAURD model changes.
      Overrides:
      notifyModelChanged in class PamControlledUnit
      Parameters:
      changeType - type of change
    • getClickTrainParams Link icon

      public ClickTrainParams getClickTrainParams()
      Get click train parameters.
      Returns:
      the click train parameters.
    • getClickTrainProcess Link icon

      public ClickTrainProcess getClickTrainProcess()
      Get click train process.
      Returns:
      the click train process.
    • getCurrentCTAlgorithm Link icon

      public ClickTrainAlgorithm getCurrentCTAlgorithm()
      Get the current click train algorithm.
      Returns:
      the click train algorithm.
    • update Link icon

      public void update(int flag)
      Send update flag to module. Sends the flag to all click train algorithms.
      Parameters:
      flag - - the update flag.
    • getCTClassificationProcess Link icon

      public CTClassificationProcess getCTClassificationProcess()
      Get the classification process. This classifies the click train.
      Returns:
      the ctClassificationProcess
    • getClickTrainAlgorithms Link icon

      public ArrayList<ClickTrainAlgorithm> getClickTrainAlgorithms()
      Get all available click train algorithms.
      Returns:
      list of available click train algorithms.
    • updateParams Link icon

      public void updateParams(ClickTrainParams newParams)
      Update the parameters.
      Parameters:
      newParams - - the parameters to update.
    • getParentDataBlock Link icon

      public PamDataBlock<?> getParentDataBlock()
      Convenience method to get the current parent data block of the process.
      Returns:
      - the parent data block.
    • getClickDataBlock Link icon

      public PamDataBlock getClickDataBlock()
      Get the parent data block if it is a click train data block
      Returns:
      the click data block.
    • getAlgorithmParams Link icon

      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 Link icon

      public ArrayList<CTClassifier> getCurrentClassifiers()
      Get the current classifiers.
      Returns:
      the current classifiers.
    • getSidePanel Link icon

      public PamSidePanel getSidePanel()
      Swing GUI
      Overrides:
      getSidePanel in class PamControlledUnit
      Returns:
      a pamSidePanel object.
      See Also:
    • createDetectionMenu Link icon

      public JMenuItem createDetectionMenu(Frame parentFrame)
      Description copied from class: PamControlledUnit
      Create a JMenu object containing MenuItems associated with PamProcesses
      Overrides:
      createDetectionMenu in class PamControlledUnit
      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 Link icon

      public CTSwingGUI getSwingGUI()
    • getGUI Link icon

      public PamControlledUnitGUI getGUI(int flag)
      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 class PamControlledUnit
      Parameters:
      flag - . The GUI type flag defined in PAMGuiManager.
      Returns:
      the GUI for the PamControlledUnit unit.
    • getClickTrainsOffline Link icon

      public ClickTrainOfflineProcess getClickTrainsOffline()
      Get the offline process for the click train detector i.e. using it in viewer mode.
      Returns:
      the offline process.
    • createDataSelector Link icon

      public void createDataSelector(PamDataBlock<?> source)
      Get the data selector.
      Parameters:
      source - - the source data block
    • getClassifierManager Link icon

      public CTClassifierManager getClassifierManager()
      The classifier manager.
      Returns:
      the classifier manager.
    • getClickClassifierProccess Link icon

      public CTClassificationProcess getClickClassifierProccess()
      Get the classification process
      Returns:
      the classification process.
    • getCTLocalisationProccess Link icon

      public CTLocalisationProcess getCTLocalisationProccess()
      Get the click train localisation process. This localises clicks from the classified click train data block.
      Returns:
      the click loclaisation process.
    • getWarningManager Link icon

      public CTWarningManager getWarningManager()
      Get the warning manager. This handles any warning messages passed from the UI or other processes.
      Returns:
      the warning manager.
    • isNotifyProcesses Link icon

      public boolean isNotifyProcesses()
      True to notify downstream processes if a new click train is detected.
      Returns:
      true to notify processes.
    • setNotifyProcesses Link icon

      public void setNotifyProcesses(boolean notify)
      Set whether to notify downstream processes if a new click train is detected.
    • getModuleStatus Link icon

      public ModuleStatus getModuleStatus()
      Description copied from class: PamControlledUnit
      Quick convenient way of getting the module status.
      Overrides:
      getModuleStatus in class PamControlledUnit
      Returns:
      Module Status or null if no status manager present.
    • getCTAlgorithmInfoManager Link icon

      public CTAlgorithmInfoManager getCTAlgorithmInfoManager()
      Get the algorithm info manager. This handles logging information on different algorithms into the database
      Returns: