MeVisLab Toolbox Reference
ml::R2SonicWC::WaterColumnM1OrM2 Class Reference

A structure describing the common data header of an M1_Data and an M2_Data section of a WaterColumn data package. More...

#include <mlWaterColumnStructures.h>

Inheritance diagram for ml::R2SonicWC::WaterColumnM1OrM2:
ml::R2SonicWC::WaterColumnSectionBase

Classes

struct  DoubleMLint16
 Vector entry for storage for data from M2 sections. More...
 

Public Member Functions

 WaterColumnM1OrM2 ()
 Default constructor.
 
 ~WaterColumnM1OrM2 () override
 Default destructor.
 
std::string getSectionName () const override
 Get name of section as std::string.
 
void reset () override
 Resets all members to construction state.
 
void mapMxSectionData () const
 Actually load the M1/M2 section data.
 
void clearMxSectionData () const
 Unload magnitude and/or phase data from arrays and really try to unmap the array memory.
 
void unmapMxSectionDataHint () const
 If memory saving mode is enabled then unload magnitude and/or phase data from arrays; may be ignored if memory saving is off.
 
MLuint64 read (R2SonicWCLoader &reader, MLuint64 &fileReadPos)
 Read section from a file with help of ByteDataReader reader and increase fileReadPos appropriately.
 
std::string getAsString (const MLint maxBeams=-1, const MLint maxSamplesPerBeam=-1, std::string prefix="", const std::string &sep=" ") const
 See WaterColumnDataSet.getAsString for documentation.
 
- Public Member Functions inherited from ml::R2SonicWC::WaterColumnSectionBase
 WaterColumnSectionBase ()
 Default constructor.
 
virtual ~WaterColumnSectionBase ()
 Default destructor.
 

Public Attributes

WaterColumnM1AndM2Header m1OrM2CommonHeader
 Common part of M1 and M2 section data.
 
MLuint64 fileDataReadPos
 Location of M1/M2 data in file.
 
std::vector< MLuint16magnitudeData
 Values 0 to 65535 map non-linearly (due to TVG scaling and possible gain compression) to signal amplitude magnitude data (typical example: 256 beams each containing 36 two-byte structs, 16 kilobytes) 16-bit magnitude data (present only during "magnitude-only" water column data mode, many per ping, you assemble them into complete ping data)
 
std::vector< DoubleMLint16magnitudePhaseData
 Magnitude and phase data (typical example: 256 beams each containing 36 four-byte structs, 36 kilobytes) 16-bit magnitude and phase data (present only during "magnitude and phase" water column data mode, many per ping, you assemble them into complete ping data)
 
bool saveMemory
 Flag to indicate whether memory save mode is enabled or not.
 
- Public Attributes inherited from ml::R2SonicWC::WaterColumnSectionBase
MLuint64 posInFile
 Location of section in file.
 
MLuint16 sectionName
 'WC', 'H0', 'A1', 'M1', 'M2'
 

Protected Attributes

R2SonicWCLoader_reader
 Pointer to the reader which loaded this file; it must (and must be valid during entire life time) to be able to perform a delayed (un/re)load of magnitude and/or phase data.
 

Detailed Description

A structure describing the common data header of an M1_Data and an M2_Data section of a WaterColumn data package.

Definition at line 217 of file mlWaterColumnStructures.h.

Constructor & Destructor Documentation

◆ WaterColumnM1OrM2()

ml::R2SonicWC::WaterColumnM1OrM2::WaterColumnM1OrM2 ( )

Default constructor.

◆ ~WaterColumnM1OrM2()

ml::R2SonicWC::WaterColumnM1OrM2::~WaterColumnM1OrM2 ( )
override

Default destructor.

Member Function Documentation

◆ clearMxSectionData()

void ml::R2SonicWC::WaterColumnM1OrM2::clearMxSectionData ( ) const

Unload magnitude and/or phase data from arrays and really try to unmap the array memory.

◆ getAsString()

std::string ml::R2SonicWC::WaterColumnM1OrM2::getAsString ( const MLint maxBeams = -1,
const MLint maxSamplesPerBeam = -1,
std::string prefix = "",
const std::string & sep = " " ) const

See WaterColumnDataSet.getAsString for documentation.

◆ getSectionName()

std::string ml::R2SonicWC::WaterColumnM1OrM2::getSectionName ( ) const
overridevirtual

Get name of section as std::string.

Implements ml::R2SonicWC::WaterColumnSectionBase.

◆ mapMxSectionData()

void ml::R2SonicWC::WaterColumnM1OrM2::mapMxSectionData ( ) const

Actually load the M1/M2 section data.

◆ read()

MLuint64 ml::R2SonicWC::WaterColumnM1OrM2::read ( R2SonicWCLoader & reader,
MLuint64 & fileReadPos )

Read section from a file with help of ByteDataReader reader and increase fileReadPos appropriately.

◆ reset()

void ml::R2SonicWC::WaterColumnM1OrM2::reset ( )
overridevirtual

Resets all members to construction state.

Reimplemented from ml::R2SonicWC::WaterColumnSectionBase.

◆ unmapMxSectionDataHint()

void ml::R2SonicWC::WaterColumnM1OrM2::unmapMxSectionDataHint ( ) const

If memory saving mode is enabled then unload magnitude and/or phase data from arrays; may be ignored if memory saving is off.

Member Data Documentation

◆ _reader

R2SonicWCLoader* ml::R2SonicWC::WaterColumnM1OrM2::_reader
mutableprotected

Pointer to the reader which loaded this file; it must (and must be valid during entire life time) to be able to perform a delayed (un/re)load of magnitude and/or phase data.

Otherwise we have no chance to limit memory usage on large files.

Definition at line 255 of file mlWaterColumnStructures.h.

◆ fileDataReadPos

MLuint64 ml::R2SonicWC::WaterColumnM1OrM2::fileDataReadPos

Location of M1/M2 data in file.

Definition at line 228 of file mlWaterColumnStructures.h.

◆ m1OrM2CommonHeader

WaterColumnM1AndM2Header ml::R2SonicWC::WaterColumnM1OrM2::m1OrM2CommonHeader

Common part of M1 and M2 section data.

Definition at line 225 of file mlWaterColumnStructures.h.

◆ magnitudeData

std::vector<MLuint16> ml::R2SonicWC::WaterColumnM1OrM2::magnitudeData
mutable

Values 0 to 65535 map non-linearly (due to TVG scaling and possible gain compression) to signal amplitude magnitude data (typical example: 256 beams each containing 36 two-byte structs, 16 kilobytes) 16-bit magnitude data (present only during "magnitude-only" water column data mode, many per ping, you assemble them into complete ping data)

size=M1_Beams*M1_Samples if in M1 mode, otherwise empty.

Definition at line 234 of file mlWaterColumnStructures.h.

◆ magnitudePhaseData

std::vector<DoubleMLint16> ml::R2SonicWC::WaterColumnM1OrM2::magnitudePhaseData
mutable

Magnitude and phase data (typical example: 256 beams each containing 36 four-byte structs, 36 kilobytes) 16-bit magnitude and phase data (present only during "magnitude and phase" water column data mode, many per ping, you assemble them into complete ping data)

size=M1_Beams*M1_Samples if in M2 mode, otherwise empty.

Definition at line 246 of file mlWaterColumnStructures.h.

◆ saveMemory

bool ml::R2SonicWC::WaterColumnM1OrM2::saveMemory

Flag to indicate whether memory save mode is enabled or not.

Definition at line 249 of file mlWaterColumnStructures.h.


The documentation for this class was generated from the following file: