Loading...
Searching...
No Matches
DualPolBioMetOp.h
1/*
2
3MIT License
4
5Copyright (c) 2017 FMI Open Development / Markus Peura, first.last@fmi.fi
6
7Permission is hereby granted, free of charge, to any person obtaining a copy
8of this software and associated documentation files (the "Software"), to deal
9in the Software without restriction, including without limitation the rights
10to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11copies of the Software, and to permit persons to whom the Software is
12furnished to do so, subject to the following conditions:
13
14The above copyright notice and this permission notice shall be included in all
15copies or substantial portions of the Software.
16
17THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23SOFTWARE.
24
25*/
26/*
27Part of Rack development has been done in the BALTRAD projects part-financed
28by the European Union (European Regional Development Fund and European
29Neighbourhood Partnership Instrument, Baltic Sea Region Programme 2007-2013)
30*/
31#ifndef RACK_GLIDER_OP
32#define RACK_GLIDER_OP
33
34#include <andre/FuzzyDetectorOp.h>
35#include <string>
36
37#include <drain/image/Image.h>
38#include <drain/image/Window.h>
39#include <drain/imageops/ImageOp.h>
40
41// RAISED
42/*
43#include <drain/imageops/SlidingWindowOp.h>
44#include "radar/Analysis.h"
45#include "radar/Doppler.h"
46
47//#include "data/Data.h"
48#include "andre/DetectorOp.h"
49// #include <drain/util/FunctorPack.h>
50// #include <drain/util/Fuzzy.h>
51// RAISED
52*/
53
54
55
56namespace rack {
57
58using namespace drain::image;
59
60
62
65class BirdOp: public FuzzyDetectorOp {
66
67public:
68
79// BirdOp(double dbzPeak = -5.0, double vradDevMin = 5.0, double rhoHVmax = 0.7, double zdrAbsMin = 2.0, double windowWidth = 2500, double windowHeight = 5.0) :
80 BirdOp(double dbzPeak = 0.0, double vradDevMin = 1.0, double rhoHVmax = 0.95, double zdrAbsMin = 1.0, double windowWidth = 2500, double windowHeight = 5.0) :
81
82 FuzzyDetectorOp(__FUNCTION__, "Estimates bird probability from DBZH, VRAD, RhoHV and ZDR.", "nonmet.biol.bird", false){ // Optional postprocessing: morphological closing.
83
84 init(dbzPeak, vradDevMin, rhoHVmax, zdrAbsMin, windowWidth, windowHeight);
85
86 };
87
88 inline
89 BirdOp(const BirdOp & op) : FuzzyDetectorOp(op) {
90 this->parameters.copyStruct(op.getParameters(), op, *this);
91 };
92
93 virtual inline
94 ~BirdOp(){};
95
96 virtual
97 void init(double dbzPeak, double vradDevMax, double rhoHVmax, double zdrDevMin, double windowWidth, double windowHeight);
98
99 virtual
100 void computeFuzzyDBZ(const PlainData<PolarSrc> & src, PlainData<PolarDst> & dstData, DataSet<PolarDst> & dstProduct) const;
101
102 virtual
103 void computeFuzzyVRAD(const PlainData<PolarSrc> & src, PlainData<PolarDst> & dstData, DataSet<PolarDst> & dstProduct) const;
104
105 virtual
106 void computeFuzzyZDR(const PlainData<PolarSrc> & src, PlainData<PolarDst> & dstData, DataSet<PolarDst> & dstProduct) const;
107
108 virtual
109 void computeFuzzyRHOHV(const PlainData<PolarSrc> & src, PlainData<PolarDst> & dstData, DataSet<PolarDst> & dstProduct) const;
110
111
112};
113
114
116
117public:
118
119 // BIRD: double dbzPeak = -5.0, double vradDevMin = 5.0, double rhoHVmax = 0.7, double zdrAbsMin = 2.0, double windowWidth = 2500, double windowHeight = 5.0
120
131 // InsectOp(double dbzPeak = -10.0, double vradDevMax = +5.0, double rhoHVmax = 0.7, double zdrAbsMin = 3.0, double windowWidth = 2500, double windowHeight = 5.0) :
132 InsectOp(double dbzPeak = 0.0, double vradDevMax = +5.0, double rhoHVmax = 0.95, double zdrAbsMin = 3.0, double windowWidth = 2500, double windowHeight = 5.0) :
133 FuzzyDetectorOp(__FUNCTION__, "Estimates probability from DBZH, VRAD, RhoHV and ZDR.", "nonmet.biol.insect", true){
134 init(dbzPeak, vradDevMax, rhoHVmax, zdrAbsMin, windowWidth, windowHeight);
135 };
136
137 InsectOp(const InsectOp & op) : FuzzyDetectorOp(op) {
138 this->parameters.copyStruct(op.getParameters(), op, *this);
139 }
140
141 virtual
142 void init(double dbzPeak, double vradDevMax, double rhoHVmax, double zdrDevMin, double windowWidth, double windowHeight);
143
144 virtual
145 void computeFuzzyDBZ(const PlainData<PolarSrc> & src, PlainData<PolarDst> & dstData, DataSet<PolarDst> & dstProduct) const;
146
147 virtual
148 void computeFuzzyVRAD(const PlainData<PolarSrc> & src, PlainData<PolarDst> & dstData, DataSet<PolarDst> & dstProduct) const;
149
150 virtual
151 void computeFuzzyZDR(const PlainData<PolarSrc> & src, PlainData<PolarDst> & dstData, DataSet<PolarDst> & dstProduct) const;
152
153 virtual
154 void computeFuzzyRHOHV(const PlainData<PolarSrc> & src, PlainData<PolarDst> & dstData, DataSet<PolarDst> & dstProduct) const;
155
156
157};
158
159
160}
161
162#endif
163
164// Rack
void copyStruct(const ReferenceMap &m, const T &src, T &dst, extLinkPolicy policy=RESERVE)
Experimental. Copies references and values of a structure to another.
Definition ReferenceMap.h:399
Definition DualPolBioMetOp.h:65
BirdOp(double dbzPeak=0.0, double vradDevMin=1.0, double rhoHVmax=0.95, double zdrAbsMin=1.0, double windowWidth=2500, double windowHeight=5.0)
Definition DualPolBioMetOp.h:80
Base class for BirdOp and InsectOp.
Definition FuzzyDetectorOp.h:50
Definition DualPolBioMetOp.h:115
InsectOp(double dbzPeak=0.0, double vradDevMax=+5.0, double rhoHVmax=0.95, double zdrAbsMin=3.0, double windowWidth=2500, double windowHeight=5.0)
Definition DualPolBioMetOp.h:132
virtual void init(double dbzPeak, double vradDevMax, double rhoHVmax, double zdrDevMin, double windowWidth, double windowHeight)
Definition DualPolBioMetOp.cpp:67
Namespace for images and image processing tools.
Definition AccumulationArray.cpp:45
Definition DataSelector.cpp:44