Class Scrolling2DPlotDataFX

java.lang.Object
dataPlotsFX.scrollingPlot2D.Scrolling2DPlotDataFX
Direct Known Subclasses:
Spectrogram2DPlotData

public class Scrolling2DPlotDataFX extends Object
Contains the spectrogram data for a single channel. Will only exist and be populated if that channel is included in the spectrogram display.
Author:
Doug Gillespie and Jamie Macaulay Was SpectrogramPlotDataFX
  • Constructor Details Link icon

    • Scrolling2DPlotDataFX Link icon

      public Scrolling2DPlotDataFX(Scrolling2DPlotInfo specPlotInfo, int iChannel)
    • Scrolling2DPlotDataFX Link icon

      public Scrolling2DPlotDataFX(TimeProjectorFX tdProjector, DataBlock2D fftDataBlock, Plot2DColours spectrogramColours, int iChannel, boolean isViewer)
      Called when making a datagram.
      Parameters:
      tdProjector -
      fftDataBlock -
      spectrogramColours -
      iChannel -
      isViewer -
  • Method Details Link icon

    • new2DData Link icon

      public void new2DData(DataUnit2D fftDataUnit)
      New fft data arrived for this channel.
      Parameters:
      fftDataUnit - fft data unit.
    • checkTimeGap Link icon

      public void checkTimeGap(DataUnit2D dataUnit2D)
      Check that the new fft is concurrent to the last fft. If not fill the spectrogram with blank sapce.
    • checkConfig Link icon

      public void checkConfig()
      Check the configuration of the channel data - array sizes are correct, etc.
    • drawSpectrogramWrap Link icon

      public double drawSpectrogramWrap(javafx.scene.canvas.GraphicsContext g2d, double timePixels, double freqPixels, PamAxisFX timeAxis, double scrollStart, double scrollEndTime, double imageFP1, double imageFP2, double[] freqBinRange, double freqWidth)
    • drawSpectrogramScroll Link icon

      public void drawSpectrogramScroll(javafx.scene.canvas.GraphicsContext g2d, double timePixels, double freqPixels, PamAxisFX timeAxis, double scrollStart, double scrollEndTime, double imageFP1, double imageFP2, double[] freqBinRange, double freqWidth)
    • drawSpectrogram Link icon

      public void drawSpectrogram(javafx.scene.canvas.GraphicsContext g2d, javafx.scene.shape.Rectangle windowRect, javafx.geometry.Orientation orientation, PamAxisFX timeAxis, double scrollStart, boolean wrap)
    • drawWrapLine Link icon

      public void drawWrapLine(javafx.scene.canvas.GraphicsContext g2d, double wrapScreenPix, double freqPixels)
      Draw the wrap line.
      Parameters:
      g2d -
      wrapScreenPix -
      freqPixels -
    • reBuildImage Link icon

      public void reBuildImage()
    • reBuildImage Link icon

      protected boolean reBuildImage(javafx.concurrent.Task<Boolean> task)
      Call to re build the image, for example if colour map or amplitude scale changes. Note: Do not run a seperate thread if the image is running in real time mode. Can be used on thread if image is paused or in viewer mode. During rebuilding in real time mode some data may be lost
      Parameters:
      if - on a separate thread input which task this function is a part of. Means the rebuild can be cancelled. Can null
      Returns:
      true if image was completely rebuilt.
    • resetForLoad Link icon

      public void resetForLoad()
      Reset anything necessary before new data are loaded offline in viewer mode.
    • resetForLoad Link icon

      public void resetForLoad(boolean newWritableImage)
      Reset anything necessary before new data are loaded offline in viewer mode.
    • getFftHop Link icon

      public int getFftHop()
      Get the current FFT hop size in bins (samples) for this spectrogram plot.
      Returns:
      FFT hop size in bins (samples)
    • rebuildFinished Link icon

      public void rebuildFinished()
    • setFreqLimits Link icon

      @Deprecated public void setFreqLimits(javafx.beans.property.DoubleProperty[] frequencyLimits)
      Deprecated.
      Checks the frequency range range to be displayed.
    • setSpecColors Link icon

      public void setSpecColors(Plot2DColours specColors)
      Set the colours for the spectrogram
      Parameters:
      specColors - - spectrogram colours.
    • getSpecColors Link icon

      public Plot2DColours getSpecColors()
      Get the colours for the spectrogram
      Parameters:
      specColors - - spectrogram colours.
    • getWritableImage Link icon

      public javafx.scene.image.Image getWritableImage()
      Get the image in memory of the spectrogram
      Returns:
      the current image whihc has spectrogram drawn on it.
    • getTotalPowerSpec Link icon

      public long getTotalPowerSpec()
      Get the total number of 2D data units added to the plot
      Returns:
      the total number of 2D plot lines.
    • getLastPowerSpecTime Link icon

      public long getLastPowerSpecTime()
    • setLastPowerSpecTime Link icon

      public void setLastPowerSpecTime(long lastPowerSpecTime)