Package aris
Class ARISImageRecord
java.lang.Object
aris.ARISImageRecord
- All Implemented Interfaces:
Serializable,Cloneable,SonarImageRecordI,SonarRecordI
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionARISImageRecord(ARISFileHeader fileHeader, ARISFrameHeader frameHeader, double[] bearingTable) -
Method Summary
Modifier and TypeMethodDescriptionclone()Clone in interface which is properly overridden in inherited classesvoidFree the data to save memory.intgetBearingIndex(double bearing) Get the index from the bearing table of the bearing closest to the given bearing.double[]intgetChirp()Get if chirp was on 0 off, 1 on, -1 unknownintGet storage for echogram lines.Path to the image fileintgetGain()byte[]Get image data array.longGet the record load time in nanoseconds.doubleintgetnBeam()intintgetRangeIndex(double range) Get the index of the range bin closest to the given rangeintlongshort[]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.intintSpecific type of sonar
720is=1
720ik=2
720im=3
1200ik=4intGeneric type of sonar
Imager = 0
Profiler = 1doublegetSoS()Get the speed of sound in m/sbooleanIs record fully loaded ?voidsetExtraRanges(int extras) voidsetImageData(byte[] imageData) Set the image data.voidsetLoadTime(long nanos) Record how long it took to load the record in nanoseconds.voidsetRecordNumber(int recordNumber) Set the record number
-
Constructor Details
-
ARISImageRecord
public ARISImageRecord(ARISFileHeader fileHeader, ARISFrameHeader frameHeader, double[] bearingTable)
-
-
Method Details
-
getFileHeader
- Returns:
- the fileHeader
-
getFrameHeader
- Returns:
- the frameHeader
-
getRecordTime
public long getRecordTime()- Specified by:
getRecordTimein interfaceSonarRecordI- Returns:
- Image time in milliseconds UTC.
-
getSonarPlatform
public int getSonarPlatform()Description copied from interface:SonarRecordISpecific type of sonar
720is=1
720ik=2
720im=3
1200ik=4- Specified by:
getSonarPlatformin interfaceSonarRecordI- Returns:
- type of sonar
-
getSonarIndex
public int getSonarIndex()- Specified by:
getSonarIndexin interfaceSonarRecordI- Returns:
- the index (0 if only one sonar, 0,1,etc for multiple sonars)
-
getDeviceId
public int getDeviceId()- Specified by:
getDeviceIdin interfaceSonarRecordI- Returns:
- the sonar unique id,
-
getImageData
public byte[] getImageData()Description copied from interface:SonarImageRecordIGet 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:
getImageDatain interfaceSonarImageRecordI- Returns:
- image data in a single array
-
setImageData
public void setImageData(byte[] imageData) Description copied from interface:SonarImageRecordISet the image data.- Specified by:
setImageDatain interfaceSonarImageRecordI
-
getShortImageData
public short[] getShortImageData()Description copied from interface:SonarImageRecordIGet 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:
getShortImageDatain interfaceSonarImageRecordI- Returns:
- Decompressed raw data in short format.
-
getBearingTable
public double[] getBearingTable()- Specified by:
getBearingTablein interfaceSonarImageRecordI- Returns:
- List of beam angles in radians.
-
getnRange
public int getnRange()- Specified by:
getnRangein interfaceSonarImageRecordI- Returns:
- The number of range bins
-
getMaxRange
public double getMaxRange()- Specified by:
getMaxRangein interfaceSonarImageRecordI- Returns:
- The maximum range for this frame in metres.
-
getnBeam
public int getnBeam()- Specified by:
getnBeamin interfaceSonarImageRecordI- Returns:
- the total number of beams
-
getFilePath
Description copied from interface:SonarImageRecordIPath to the image file- Specified by:
getFilePathin interfaceSonarImageRecordI- Returns:
- path name of file
-
getRecordNumber
public int getRecordNumber()- Specified by:
getRecordNumberin interfaceSonarImageRecordI- Returns:
- Record number in file (zero indexed)
-
getSonarType
public int getSonarType()Description copied from interface:SonarImageRecordIGeneric type of sonar
Imager = 0
Profiler = 1- Specified by:
getSonarTypein interfaceSonarImageRecordI- Returns:
- The type of sonar
-
getSoS
public double getSoS()Description copied from interface:SonarImageRecordIGet the speed of sound in m/s- Specified by:
getSoSin interfaceSonarImageRecordI- Returns:
- speed of sound
-
getChirp
public int getChirp()Description copied from interface:SonarImageRecordIGet if chirp was on 0 off, 1 on, -1 unknown- Specified by:
getChirpin interfaceSonarImageRecordI- Returns:
- true if chirp mode
-
getGain
public int getGain()- Specified by:
getGainin interfaceSonarImageRecordI- Returns:
- the gain for that frame
-
isFullyLoaded
public boolean isFullyLoaded()Description copied from interface:SonarImageRecordIIs record fully loaded ?- Specified by:
isFullyLoadedin interfaceSonarImageRecordI- Returns:
- true if record is fully loaded.
-
freeImageData
public void freeImageData()Description copied from interface:SonarImageRecordIFree the data to save memory.- Specified by:
freeImageDatain interfaceSonarImageRecordI
-
setLoadTime
public void setLoadTime(long nanos) Description copied from interface:SonarImageRecordIRecord how long it took to load the record in nanoseconds.- Specified by:
setLoadTimein interfaceSonarImageRecordI
-
getLoadTime
public long getLoadTime()Description copied from interface:SonarImageRecordIGet the record load time in nanoseconds.- Specified by:
getLoadTimein interfaceSonarImageRecordI- Returns:
-
clone
Description copied from interface:SonarImageRecordIClone in interface which is properly overridden in inherited classes- Specified by:
clonein interfaceSonarImageRecordI- Overrides:
clonein classObject- Returns:
- cloned record.
-
getBearingIndex
public int getBearingIndex(double bearing) Description copied from interface:SonarImageRecordIGet the index from the bearing table of the bearing closest to the given bearing.- Specified by:
getBearingIndexin interfaceSonarImageRecordI- Parameters:
bearing- in radians- Returns:
- index of closest bearing.
-
getRangeIndex
public int getRangeIndex(double range) Description copied from interface:SonarImageRecordIGet the index of the range bin closest to the given range- Specified by:
getRangeIndexin interfaceSonarImageRecordI- Parameters:
range- range in metres- Returns:
- index of closest range bin.
-
setExtraRanges
public void setExtraRanges(int extras) -
getEchoLineStore
Description copied from interface:SonarImageRecordIGet storage for echogram lines.- Specified by:
getEchoLineStorein interfaceSonarImageRecordI- Returns:
-
setRecordNumber
public void setRecordNumber(int recordNumber) Description copied from interface:SonarImageRecordISet the record number- Specified by:
setRecordNumberin interfaceSonarImageRecordI- Parameters:
recordNumber-
-