Class WhistleClassifierControl

java.lang.Object
PamController.PamControlledUnit
whistleClassifier.WhistleClassifierControl
All Implemented Interfaces:
PamSettings, SettingsNameProvider

public class WhistleClassifierControl extends PamControlledUnit implements PamSettings
Whistle Classifier control class.

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 Details

    • trainingFileEnd

      public static final String trainingFileEnd
      File end for training data (contour) files
      See Also:
    • classifierFileEnd

      public static final String classifierFileEnd
      File end for whistle classifier data (i.e. Eigen matrixes and that stuff)
      See Also:
  • Constructor Details

    • WhistleClassifierControl

      public WhistleClassifierControl(String unitName)
  • Method Details

    • getWhistleClassifierProcess

      public WhistleClassifierProcess getWhistleClassifierProcess()
      Returns:
      the whistleClassifierProcess
    • createDetectionMenu

      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.

    • settingsDialog

      public void settingsDialog(Frame parentFrame)
    • pamHasStopped

      public void pamHasStopped()
      Description copied from class: PamControlledUnit
      Called for all controlled units after Pam acquisition has stopped
      Overrides:
      pamHasStopped in class PamControlledUnit
    • notifyModelChanged

      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
    • getTabPanel

      public PamTabPanel getTabPanel()
      Description copied from class: PamControlledUnit
      Gets a reference to a panel to be added to a view
      Overrides:
      getTabPanel in class PamControlledUnit
      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

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

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

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

      public boolean saveClassifierParams(Window frame, FragmentClassifierParams params)
      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

      public void setWhistleFragmenter(WhistleFragmenter whistleFragmenter)
      Parameters:
      whistleFragmenter - the whistleFragmenter to set
    • getWhistleFragmenter

      public WhistleFragmenter getWhistleFragmenter()
      Returns:
      the whistleFragmenter
    • setWhistleClassificationParameters

      public void setWhistleClassificationParameters(WhistleClassificationParameters whistleClassificationParameters)
      Parameters:
      whistleClassificationParameters - the whistleClassificationParameters to set
    • getWhistleClassificationParameters

      public WhistleClassificationParameters getWhistleClassificationParameters()
      Returns:
      the whistleClassificationParameters
    • getFragmentParameteriser

      public FragmentParameteriser getFragmentParameteriser()
    • setFragmentParameteriser

      public void setFragmentParameteriser(FragmentParameteriser fragmentParameteriser)
    • setFragmentClassifier

      public void setFragmentClassifier(Classifier fragmentClassifier)
      Parameters:
      fragmentClassifier - the fragmentClassifier to set
    • getFragmentClassifier

      public Classifier getFragmentClassifier()
      Returns:
      the fragmentClassifier