Class WignerPlot<D extends PamDataUnit>

java.lang.Object
detectionPlotFX.plots.WignerPlot<D>
Type Parameters:
D - the specific pamDetection type.
All Implemented Interfaces:
DetectionPlot<D>
Direct Known Subclasses:
MTClassifierPane.WignerTemplateData, RawWignerPlot, WhistleWignerPlot

public abstract class WignerPlot<D extends PamDataUnit> extends Object implements DetectionPlot<D>
Plots a Wigner transform of a detection.
Author:
Jamie Macaulay
  • Constructor Details

    • WignerPlot

      public WignerPlot(DetectionPlotDisplay detectionPlotDisplay)
      Constructor for the waveform plot.
  • Method Details

    • getName

      public String getName()
      Description copied from interface: DetectionPlot
      Get the name of the plot e.g. waveform, spectrum etc.
      Specified by:
      getName in interface DetectionPlot<D extends PamDataUnit>
    • setupPlot

      public void setupPlot()
      Description copied from interface: DetectionPlot
      Setup the plot. This may, for example, involve changing axis etc.
      Specified by:
      setupPlot in interface DetectionPlot<D extends PamDataUnit>
    • setupAxis

      public void setupAxis(D pamDetection, double sR, DetectionPlotProjector projector)
      Called to set up the axis correctly before the plot is created
      Specified by:
      setupAxis in interface DetectionPlot<D extends PamDataUnit>
      Parameters:
      pamDetection - - the data of every channel. e.g. might be a waveform with each point representing a sample.
      sR - - the sample rate.
      waveform - - the waveforms of every channel. Each point represents one sample.
      pamAxis - - all the axis of the graph. this is in order TOP, RIGHT, BOTTOM, LEFT.
    • getWaveform

      public abstract double[] getWaveform(D pamDetection, int chan)
      Get the waveforms from a PamDetection
      Parameters:
      pamDetection - the detection
      chan - - the single channel to plot (not the channel bitmap)
      Returns:
      the waveform for each channel
    • paintPlot

      public void paintPlot(D pamDetection, javafx.scene.canvas.GraphicsContext gc, javafx.scene.shape.Rectangle rectangle, DetectionPlotProjector projector, int flag)
      Description copied from interface: DetectionPlot
      Plot the relevent data from a detection.
      Specified by:
      paintPlot in interface DetectionPlot<D extends PamDataUnit>
      Parameters:
      pamDetection - - the data of every channel. e.g. might be a waveform with each point representing a sample.
      gc - - the graphics handle to draw on.
    • conditionWaveform

      public double[][] conditionWaveform(double[] clickWave)
      Perform pre-conditioning of waveform. Returns both the waveform and bin limits if the waveform has been shortened.
      Returns:
      conditioned waveform in first row and bin limits in second row.
    • getSettingsPane

      public javafx.scene.layout.Pane getSettingsPane()
      Description copied from interface: DetectionPlot
      Get the settings pane for the particular plot. This sits on the right hand side of the display inside a hiding pane.
      Specified by:
      getSettingsPane in interface DetectionPlot<D extends PamDataUnit>
      Returns:
      a pane with controls for changing settings in a node.
    • getWignerParameters

      public WignerPlotParams getWignerParameters()
      Get the parameters for the wigner plot.
      Returns:
    • reDrawLastUnit

      public void reDrawLastUnit()
      Repaint the current data unit.
    • setWignerParameters

      public void setWignerParameters(WignerPlotParams params)
    • checWignerRecalc

      public void checWignerRecalc(WignerPlotParams wignerParameters)
      Check whether the wigner plot needs recalculated with a new settings.
      Parameters:
      wignerParameters -
    • isNeedsRecalc

      public boolean isNeedsRecalc()
      Indicates whether the wigner image needs recalculated.
      Returns:
    • setNeedsRecalc

      public void setNeedsRecalc(boolean needsRecalc)
      Set the needs recalc flag. This will force a recalculation of wigner data.
      Parameters:
      needsRecalc -
    • getNeedsRecalc

      public boolean getNeedsRecalc()
    • getWignerSettingsPane

      public WignerSettingsPane<D> getWignerSettingsPane()
      Get the settings pane. This pane changes wigner plot specific settings.
      Returns:
      the Wigner settings pane
    • getWignerWaveform

      public double[] getWignerWaveform()
      Get the current waveform used to calculate the wigner plot.
      Returns:
      - the current wigner waveform
    • setWignerWaveform

      public void setWignerWaveform(double[] wignerWaveform)
      Set th current wigner waveform.
      Parameters:
      wignerWaveform - - the current wigner waveform.
    • getDetectionPlotDisplay

      public DetectionPlotDisplay getDetectionPlotDisplay()