Package aris

Class ARISImageRecord

java.lang.Object
aris.ARISImageRecord
All Implemented Interfaces:
Serializable, Cloneable, SonarImageRecordI, SonarRecordI

public class ARISImageRecord extends Object implements SonarImageRecordI
See Also:
  • Constructor Details

  • Method Details

    • getFileHeader

      public ARISFileHeader getFileHeader()
      Returns:
      the fileHeader
    • getFrameHeader

      public ARISFrameHeader getFrameHeader()
      Returns:
      the frameHeader
    • getRecordTime

      public long getRecordTime()
      Specified by:
      getRecordTime in interface SonarRecordI
      Returns:
      Image time in milliseconds UTC.
    • getSonarPlatform

      public int getSonarPlatform()
      Description copied from interface: SonarRecordI
      Specific type of sonar
      720is=1
      720ik=2
      720im=3
      1200ik=4
      Specified by:
      getSonarPlatform in interface SonarRecordI
      Returns:
      type of sonar
    • getSonarIndex

      public int getSonarIndex()
      Specified by:
      getSonarIndex in interface SonarRecordI
      Returns:
      the index (0 if only one sonar, 0,1,etc for multiple sonars)
    • getDeviceId

      public int getDeviceId()
      Specified by:
      getDeviceId in interface SonarRecordI
      Returns:
      the sonar unique id,
    • getImageData

      public byte[] getImageData()
      Description copied from interface: SonarImageRecordI
      Get image data array. This is a one dimensional array of all data, that goes across bearings, then range. Needs reshaping to create a 2D array.
      Be very careful if you use the output of this function since data will be unsigned byte, so you need to use the Byte.toUnsignedInt(byte x) function to get an unsigned value. For most purposes, you're better off getting the short[] array, which will have already been converted.
      Specified by:
      getImageData in interface SonarImageRecordI
      Returns:
      image data in a single array
    • setImageData

      public void setImageData(byte[] imageData)
      Description copied from interface: SonarImageRecordI
      Set the image data.
      Specified by:
      setImageData in interface SonarImageRecordI
    • getShortImageData

      public short[] getShortImageData()
      Description copied from interface: SonarImageRecordI
      Get the decompressed image data in an array of shorts this allows correction of problems caused by Java not understanding unsigned values, so what should be large values (>=128) are negative.
      This will return an array of values between 0 and 255
      Specified by:
      getShortImageData in interface SonarImageRecordI
      Returns:
      Decompressed raw data in short format.
    • getBearingTable

      public double[] getBearingTable()
      Specified by:
      getBearingTable in interface SonarImageRecordI
      Returns:
      List of beam angles in radians.
    • getnRange

      public int getnRange()
      Specified by:
      getnRange in interface SonarImageRecordI
      Returns:
      The number of range bins
    • getMaxRange

      public double getMaxRange()
      Specified by:
      getMaxRange in interface SonarImageRecordI
      Returns:
      The maximum range for this frame in metres.
    • getnBeam

      public int getnBeam()
      Specified by:
      getnBeam in interface SonarImageRecordI
      Returns:
      the total number of beams
    • getFilePath

      public String getFilePath()
      Description copied from interface: SonarImageRecordI
      Path to the image file
      Specified by:
      getFilePath in interface SonarImageRecordI
      Returns:
      path name of file
    • getRecordNumber

      public int getRecordNumber()
      Specified by:
      getRecordNumber in interface SonarImageRecordI
      Returns:
      Record number in file (zero indexed)
    • getSonarType

      public int getSonarType()
      Description copied from interface: SonarImageRecordI
      Generic type of sonar
      Imager = 0
      Profiler = 1
      Specified by:
      getSonarType in interface SonarImageRecordI
      Returns:
      The type of sonar
    • getSoS

      public double getSoS()
      Description copied from interface: SonarImageRecordI
      Get the speed of sound in m/s
      Specified by:
      getSoS in interface SonarImageRecordI
      Returns:
      speed of sound
    • getChirp

      public int getChirp()
      Description copied from interface: SonarImageRecordI
      Get if chirp was on 0 off, 1 on, -1 unknown
      Specified by:
      getChirp in interface SonarImageRecordI
      Returns:
      true if chirp mode
    • getGain

      public int getGain()
      Specified by:
      getGain in interface SonarImageRecordI
      Returns:
      the gain for that frame
    • isFullyLoaded

      public boolean isFullyLoaded()
      Description copied from interface: SonarImageRecordI
      Is record fully loaded ?
      Specified by:
      isFullyLoaded in interface SonarImageRecordI
      Returns:
      true if record is fully loaded.
    • freeImageData

      public void freeImageData()
      Description copied from interface: SonarImageRecordI
      Free the data to save memory.
      Specified by:
      freeImageData in interface SonarImageRecordI
    • setLoadTime

      public void setLoadTime(long nanos)
      Description copied from interface: SonarImageRecordI
      Record how long it took to load the record in nanoseconds.
      Specified by:
      setLoadTime in interface SonarImageRecordI
    • getLoadTime

      public long getLoadTime()
      Description copied from interface: SonarImageRecordI
      Get the record load time in nanoseconds.
      Specified by:
      getLoadTime in interface SonarImageRecordI
      Returns:
    • clone

      public ARISImageRecord clone()
      Description copied from interface: SonarImageRecordI
      Clone in interface which is properly overridden in inherited classes
      Specified by:
      clone in interface SonarImageRecordI
      Overrides:
      clone in class Object
      Returns:
      cloned record.
    • getBearingIndex

      public int getBearingIndex(double bearing)
      Description copied from interface: SonarImageRecordI
      Get the index from the bearing table of the bearing closest to the given bearing.
      Specified by:
      getBearingIndex in interface SonarImageRecordI
      Parameters:
      bearing - in radians
      Returns:
      index of closest bearing.
    • getRangeIndex

      public int getRangeIndex(double range)
      Description copied from interface: SonarImageRecordI
      Get the index of the range bin closest to the given range
      Specified by:
      getRangeIndex in interface SonarImageRecordI
      Parameters:
      range - range in metres
      Returns:
      index of closest range bin.
    • setExtraRanges

      public void setExtraRanges(int extras)
    • getEchoLineStore

      public EchoLineStore getEchoLineStore()
      Description copied from interface: SonarImageRecordI
      Get storage for echogram lines.
      Specified by:
      getEchoLineStore in interface SonarImageRecordI
      Returns:
    • setRecordNumber

      public void setRecordNumber(int recordNumber)
      Description copied from interface: SonarImageRecordI
      Set the record number
      Specified by:
      setRecordNumber in interface SonarImageRecordI
      Parameters:
      recordNumber -