Class MHTClickTrainAlgorithm

java.lang.Object
clickTrainDetector.clickTrainAlgorithms.mht.MHTClickTrainAlgorithm
All Implemented Interfaces:
ClickTrainAlgorithm, PamSettings, SettingsNameProvider

public class MHTClickTrainAlgorithm extends Object implements ClickTrainAlgorithm, PamSettings
A click train algorithm based on a multi-hypothesis tracker (MHT) which groups data based on a minimisation function.
Author:
Jamie Macaulay
  • Field Details

  • Constructor Details

    • MHTClickTrainAlgorithm

      public MHTClickTrainAlgorithm(ClickTrainControl clickTrainControl)
  • Method Details

    • getName

      public String getName()
      Description copied from interface: ClickTrainAlgorithm
      The name of the algorithm
      Specified by:
      getName in interface ClickTrainAlgorithm
      Returns:
      the name of the algorithm
    • newDataUnit

      public void newDataUnit(PamDataUnit dataUnit)
      Description copied from interface: ClickTrainAlgorithm
      Adds a data unit to the click train detector algorithm
      Specified by:
      newDataUnit in interface ClickTrainAlgorithm
      Parameters:
      dataUnit - - data unit to be considered for click train detection.
    • getTrackDataUnits

      public static TrackDataUnits getTrackDataUnits(MHTKernel<PamDataUnit> mhtKernel, BitSet bitSet, int kcount)
      Get the track data units for a track possibility bitset.
      Parameters:
      mhtKernel - - the MHTKernel
      bitSet - - the bit set.
      kcount - - the kcount.
      Returns:
      the track data units.
    • grabDoneTrains

      public void grabDoneTrains(MHTClickTrainAlgorithm.MHTAlgorithm mhtAlgortihm)
      Grabs any click trains which are finished and saves them as the appropriate PAM data unit. Also clear the MHTKernel tracks.
      Parameters:
      mhtAlgorithm - - the MHT algorithm to grab finished clicks trains from
    • grabDoneTrains

      public void grabDoneTrains(MHTKernel mhtKernal)
      Grabs any click trains which are finished and saves them as the appropriate PAM data unit. Also clear the MHTKernel tracks.
      Parameters:
      mhtKernal - - the MHT kernel to grab finished clicks trains from
    • getClickTrainGraphics

      public CTDetectorGraphics getClickTrainGraphics()
      Description copied from interface: ClickTrainAlgorithm
      Get the class which handles GUI components for the click train detector algorithm
      Specified by:
      getClickTrainGraphics in interface ClickTrainAlgorithm
      Returns:
      the click train graphics.
    • update

      public void update(int flag, Object info)
      Update the algorithm
      Specified by:
      update in interface ClickTrainAlgorithm
      Parameters:
      flag - - flag indicating the update type.
      info - - an object to add to update
    • getParams

      public MHTParams getParams()
      Get general MHT params.
      Returns:
      the MHT params.
    • getUnitName

      public String getUnitName()
      Specified by:
      getUnitName in interface SettingsNameProvider
      Returns:
      A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
    • getUnitType

      public String getUnitType()
      Specified by:
      getUnitType in interface PamSettings
      Returns:
      A Name specific to the type, e.g. Click detector
    • 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
    • setParams

      public void setParams(MHTParams mhtParams2)
      Set the parameters for the MHT algorithm.
      Parameters:
      mhtParams2 - - the MHTParams to set as the new parameters.
    • getChi2ProviderManager

      public MHTChi2ProviderManager getChi2ProviderManager()
      Get the MHTChi2 manager.
      Returns:
    • getMHTAlgorithms

      public ArrayList<MHTClickTrainAlgorithm.MHTAlgorithm> getMHTAlgorithms()
      Get a list of the current MHT algortihms
      Returns:
      a list of the current MHT algorithms.
    • getClickTrainControl

      public ClickTrainControl getClickTrainControl()
      Get the click train controls which owns the algorithm
      Returns:
      the click train control.
    • getCTAlgorithmInfoLogging

      public CTAlgorithmInfoLogging getCTAlgorithmInfoLogging()
      Description copied from interface: ClickTrainAlgorithm
      Get logging class for click algorithm specific information.
      Specified by:
      getCTAlgorithmInfoLogging in interface ClickTrainAlgorithm
      Returns:
      the ct algorithm logging.