MeVisLab Toolbox Reference
mlPCLR2SonicWCLoaderModule.h
Go to the documentation of this file.
1 // Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2 // **InsertLicense** code author="Wolf Spindler"
3 //----------------------------------------------------------------------------------
5 
12 //----------------------------------------------------------------------------------
13 #pragma once
14 
16 #include "mlR2SonicWCLoader.h"
17 #include <mlPCLModule.h>
18 #if defined(MLAB_CMAKE_BUILDSYSTEM)
19 #include <include/mlMultiFields.h>
20 #else
21 #include <mlMultiFields.h>
22 #endif
23 
24 ML_START_NAMESPACE
25 
26 //----------------------------------------------------------------------------------
28 //----------------------------------------------------------------------------------
30 {
31 public:
34 
36  ~PCLR2SonicWCLoader() override;
37 
40 
41 protected:
43  void activateAttachments() override;
44 
46  virtual void _updateAnalyzeProgressAndStatus(float percState);
47 
49  virtual void _updateProgressAndStatus(const std::string &statusString,
50  float percState);
51 
53  void handleNotification (Field* field) override;
54 
55 private:
57  friend class R2SonicLoaderFunctionClass;
60 
62  void _addFileMemberFields();
63 
65  bool _isFileMemberField(Field * field);
66 
68  void _resetFileMemberFields();
69 
72  void _updateFileMemberFields();
73 
75  void _clear();
76 
78  void _invalidateLoader();
79 
81  void _load();
82 
84  void _invalidateTextDump();
85 
87  void _updateTextDump();
88 
90  void _invalidateOutputPointClouds();
91 
93  void _updateOutputPointClouds(float percentageStart, float percentageRange);
94 
95  // Members:
100 
101  // Fields:
103  StringField *_fullFilePathFld;
104 
107  BoolField *_autoApplyFld;
108 
110  NotifyField *_loadFld;
111 
113  BoolField *_fileIOHasSucceededFld;
114 
116  IntField *_maxNumberOfPacketsToShowFld;
117 
120  BoolField *_showFirstOfEachPacketTypeOnlyFld;
121 
123  IntField *_maxNumberOfBeamsToShowFld;
124 
126  IntField *_maxNumberOfSamplesPerBeamToShowFld;
127 
129  IntField *_indexOfFirstPingToOutputFld;
130 
132  IntField *_numberOfPingsToOutputFld;
133 
135  IntField *_indexOfFirstBeamToOutputFld;
136 
138  IntField *_numberOfBeamsToOutputFld;
139 
141  FloatField *_magnitudeScaleFld;
142 
144  FloatField *_magnitudeThresholdFld;
145 
147  FloatField *_magnitudeThresholdPercentageFld;
148 
151  FloatField *_actuallyUsedThresholdFld;
152 
161  BoolField *_applyTVGFld;
162 
181  BoolField *_unifyTVGResultsFld;
182 
188  BoolField *_convertOrphanedBeamsAndSamplesFld;
189 
191  FloatField *_angleOfFirstPingInDegreeFld;
192 
195  FloatField *_angleOffsetPerPingInDegreeFld;
196 
200  BoolField *_autoCalculateAngleOffsetPerPingFld;
201 
204  FloatField *_fullRotatorRangeInDegreeFld;
205 
207  FloatField *_actuallyUsedAngleOffsetPerPingInDegreeFld;
208 
211  FloatField *_mountPlaneTiltOffsetInDegreeFld;
212 
215  BoolField *_addRxMountTiltToOffsetFld;
216 
218  BoolField *_disableNormalizationFld;
219 
221  BoolField *_scalePhaseToMinus1To1Fld;
222 
224  BoolField *_createIndexCloudFld;
225 
227  BoolField *_normalizeTxPowerTo191dbFld;
228 
230  BoolField *_compensateGainFld;
231 
234  BoolField *_autoAdaptThresholdFld;
235 
237  StringField *_fileDumpFld;
238 
240  IntField *_numberOfPingsInFileFld;
241 
245  IntField *_maxAllowedFileSizeInMBytesFld;
246 
250  IntField *_maxNumAllowedPointsFld;
251 
256  IntField *_workingMemoryHintInMBytesFld;
257 
268  IntField *_minValidSecondFld;
269 
271 public:
273 
274 private:
276  ProgressField *_progressFld;
277 
279 
281  StringField *_PacketNameFld;
282  IntField *_PacketSizeFld;
283  IntField *_DataStreamIDFld;
284 
286  StringField *_H0_SectionNameFld;
287  IntField *_H0_SectionSizeFld;
288  StringField *_H0_ModelNumberFld;
289  StringField *_H0_SerialNumberFld;
290  IntField *_H0_TimeSecondsFld;
291  IntField *_H0_TimeNanosecondsFld;
292  IntField *_H0_PingNumberFld;
293  FloatField *_H0_PingPeriodFld;
294  FloatField *_H0_SoundSpeedFld;
295  FloatField *_H0_FrequencyFld;
296  FloatField *_H0_TxPowerFld;
297  FloatField *_H0_TxPulseWidthFld;
298  FloatField *_H0_TxBeamwidthVertFld;
299  FloatField *_H0_TxBeamwidthHorizFld;
300  FloatField *_H0_TxSteeringVertFld;
301  FloatField *_H0_TxSteeringHorizFld;
302  IntField *_H0_TxMiscInfoFld;
303  IntField *_H0_VTX_Plus_OffsetFld;
304  FloatField *_H0_RxBandwidthFld;
305  FloatField *_H0_RxSampleRateFld;
306  FloatField *_H0_RxRangeFld;
307  FloatField *_H0_RxGainFld;
308  FloatField *_H0_RxSpreadingFld;
309  FloatField *_H0_RxAbsorptionFld;
310  FloatField *_H0_RxMountTiltFld;
311  IntField *_H0_RxMiscInfoFld;
312  IntField *_H0_reservedFld;
313  IntField *_H0_BeamsFld;
314 
316  StringField *_A1_SectionNameFld;
317  IntField *_A1_SectionSizeFld;
318  FloatMultiField *_A1_MoreInfoFld;
319  FloatMultiField *_A1_BeamAngleFld;
320 
321  StringField *_Mx_SectionNameFld;
322  IntField *_Mx_SectionSizeFld;
323  IntField *_Mx_PingNumberFld;
324  FloatField *_Mx_ScalingFactorFld;
325  IntField *_Mx_TotalSamplesFld;
326  IntField *_Mx_FirstSampleFld;
327  IntField *_Mx_SamplesFld;
328  IntField *_Mx_TotalBeamsFld;
329  IntField *_Mx_FirstBeamFld;
330  IntField *_Mx_BeamsFld;
331  IntField *_Mx_reserved0Fld;
332  IntField *_Mx_reserved1Fld;
333  // Showing all Magnitude and/or phase data is usually a bit large. Therefore this feature is
334  // disabled by default but can be enabled when needed in future.
335 //#define _PCLR2SonicWCLoader_Compile_MagnitudeAndOrPhaseDataField
336 #if defined(_PCLR2SonicWCLoader_Compile_MagnitudeAndOrPhaseDataField)
337  IntMultiField *_Mx_MagnitudeAndOrPhaseDataFld;
340 #endif
342 
345 
348 };
349 
350 ML_END_NAMESPACE
Project global and OS specific declarations.
#define MLPCLR2SonicWCLoader_EXPORT
DLL export macro definition.
Field to encapsulate a boolean value.
Definition: mlFields.h:62
Base class for all fields used in the ML.
Definition: mlField.h:73
Field to encapsulate a float value.
Definition: mlFields.h:627
Class FloatMultiField. See MultiField for documentation.
Field to encapsulate an integer value.
Definition: mlFields.h:161
Class IntMultiField. See MultiField for documentation.
Field without value for notifications.
Definition: mlFields.h:1049
ML Module base class for algorithms from the Point Cloud Library (PCL).
Definition: mlPCLModule.h:26
ML Module class to load a point cloud from the Point Cloud Library from a file.
NotifyField * _stopFld
If triggered then the load operation will be interrupted at the next possible position.
virtual void _updateAnalyzeProgressAndStatus(float percState)
Calls specialised _updateProgressAndStatus for data set analyse time.
~PCLR2SonicWCLoader() override
Destructor.
void handleNotification(Field *field) override
Handles field changes of the field field.
virtual void _updateProgressAndStatus(const std::string &statusString, float percState)
Calls setStatusString(statusString) and updates _progressFld to perc.
const R2SonicWC::R2SonicWCLoader & getLoaderInstance() const
For testing etc.: Allow access to internal loader instance;.
PCLR2SonicWCLoader()
Creates a PCLToSoVertexProperty module with one input connector for a PCLBaseObjectPtr.
void activateAttachments() override
Updates internal state after changes of fields without field notifications.
Field to encapsulate an increasing float value from range [0,1].
Definition: mlFields.h:744
Class to read R2Sonic water column sonar data.
Class describing the common data header of a WaterColumn data package.
Field to encapsulate a string value.
Definition: mlFields.h:1000
#define ML_MODULE_CLASS_HEADER(className)
Like ML_CLASS_HEADER for the usage of derived classes from Module.
ML Module base class for algorithms from the Point Cloud Library (PCL).
#define ML_PCL_TEST_INTERFACE(BASE_OBJECT_NAME)
Implements a dedicated interface for PCL related modules which is required in automatic tests.
The R2SonicWCLoader class to read R2Sonic .wc water column data format.