Class ConnectedRegionDataUnit

All Implemented Interfaces:
Comparable<PamDataUnit>, PamDetection, AcousticDataUnit, FFTDataHolder, TFContourProvider, WhistleContour

public class ConnectedRegionDataUnit extends AbstractWhistleDataUnit implements TFContourProvider, FFTDataHolder
  • Constructor Details

  • Method Details

    • getConnectedRegion

      public ConnectedRegion getConnectedRegion()
    • getFrequency

      public double[] getFrequency()
      Description copied from class: PamDataUnit
      gets the frequency limits from the DataUnitBaseData object
      Overrides:
      getFrequency in class PamDataUnit<PamDataUnit,PamDataUnit>
      Returns:
    • getSliceCount

      public int getSliceCount()
      Description copied from class: AbstractWhistleDataUnit
      Get the total number of slices
      Specified by:
      getSliceCount in class AbstractWhistleDataUnit
      Returns:
      total number of slices
    • getFreqsHz

      public double[] getFreqsHz()
      Description copied from class: AbstractWhistleDataUnit
      Get an array of the peak frequencies in Hz.
      Specified by:
      getFreqsHz in interface WhistleContour
      Specified by:
      getFreqsHz in class AbstractWhistleDataUnit
      Returns:
      peak frequencies in Hz.
    • getTimesInSeconds

      public double[] getTimesInSeconds()
      Description copied from class: AbstractWhistleDataUnit
      Get an array of the times of each slice in seconds
      Specified by:
      getTimesInSeconds in interface WhistleContour
      Specified by:
      getTimesInSeconds in class AbstractWhistleDataUnit
      Returns:
      times in seconds
    • setTimeDelaysSeconds

      public void setTimeDelaysSeconds(double[] timeDelaysSeconds)
      As of version 2 time delays are now stored in the DataUnitBaseData object. An important difference, however, is that if there are no time delays yet the DataUnitBaseData would set the array to null, whereas this object would have set it to an empty array (in the WhistleBinaryDataSource object). Therefore, override PamDataUnit's setTimeDelaysSeconds method to intercept any empty arrays and set them as null
      Overrides:
      setTimeDelaysSeconds in class PamDataUnit<PamDataUnit,PamDataUnit>
      Parameters:
      timeDelaysSeconds - the time delays (in seconds) to set
    • getTimeDelaysSeconds

      public double[] getTimeDelaysSeconds()
      As of version 2 time delays are now stored in the DataUnitBaseData object. An important difference, however, is that if there are no time delays yet the DataUnitBaseData would set the array to null, whereas this object would have set it to an empty array (in the WhistleBinaryDataSource object). Therefore, override PamDataUnit's getTimeDelaysSeconds method to intercept any null arrays and return them as empty
      Overrides:
      getTimeDelaysSeconds in class PamDataUnit<PamDataUnit,PamDataUnit>
      Returns:
      the time delays in seconds
    • getTFContourData

      public TFContourData getTFContourData()
      Description copied from interface: TFContourProvider
      Gets time-frequency contour information in units of milliseconds and frequency
      Specified by:
      getTFContourData in interface TFContourProvider
      Returns:
      TFContour data object.
    • getFFTDataUnits

      public List<FFTDataUnit> getFFTDataUnits(Integer fftLength)
      Description copied from interface: FFTDataHolder
      Return a list of FFT data units from the data unit.
      Specified by:
      getFFTDataUnits in interface FFTDataHolder
      Parameters:
      fftLength - Length of FFT to use. If this is null, a default from the data source will be used, otherwise the source should recalculate if possible. If it's not possible to recalculate, then return what's available and the calling process must decide whether it can use the data or not.
      Returns:
      list of FFT units, interleaved by channel.