Loading...
Searching...
No Matches
TestOp.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 ANDRE_TEST_OP_H_
32#define ANDRE_TEST_OP_H_
33
34// #include "RemoverOp.h"
35#include "DetectorOp.h"
36
37using namespace drain::image;
38
39namespace rack {
40
44class TestOp: public DetectorOp {
45
46public:
47
49
54 inline
55 TestOp(double value=0.0, double prob=1.0) :
56 DetectorOp(__FUNCTION__, "Create rectangular fake anomaly (value) and 'detect' it with desired probability (prob).", "nonmet.clutter"){
57 //RemoverOp(__FUNCTION__, "Create rectangular fake anomaly (value) and 'detect' it with desired probability (prob)."){ // Optional postprocessing: morphological closing.
58
59 dataSelector.setQuantities("^DBZH$");
61 UNIVERSAL = true;
62
63 parameters.link("value", this->value = value, "value");
64 parameters.link("prob", this->prob = prob, "prob");
65
66 parameters.link("i", this->iRange.tuple() = {200,230}, "coord range"); // ~500m
67 parameters.link("j", this->jRange.tuple() = {240,300}, "coord range"); // deg
68
69 // TODO: classEntry.code (final code derived from numeric or (partial) string)
70 // parameters.link("code", this->code = "clutter.test", "class code"); // deg
71
72 };
73
74 double value;
75 double prob;
76 drain::Range<int> iRange;
77 drain::Range<int> jRange;
78
79
80 void runDetection(const DataSet<PolarSrc> & srcDataSet, PlainData<PolarDst> & dstProb, DataSet<PolarDst> & cache) const;
81
82protected:
83
84 /*
85 virtual
86 void runDetector(const PlainData<PolarSrc> & srcData, const PlainData<PolarSrc> & srcQuality,
87 PlainData<PolarDst> & dstData, PlainData<PolarDst> & dstProb) const;
88 */
90 // virtual void processDataSet(const DataSet<PolarSrc> & src, PlainData<PolarDst> & dst, DataSet<PolarDst> & aux) const; // DataSetDst & dst) const;
91
92};
93
94
95}
96
97#endif
98// Rack
Definition Range.h:52
void setQuantities(const std::string &s)
Sets basic quantities and quality quantities. These sets are separated by '/'.
Definition DataSelector.cpp:282
A map of radar data, indexed by quantity code (DBZH, VRAD, etc).
Definition Data.h:1215
Base class for anomaly detectors.
Definition DetectorOp.h:49
bool REQUIRE_STANDARD_DATA
Set to true if operator expects fixed background intensities instead of "nodata" defined by the Polar...
Definition DetectorOp.h:216
bool UNIVERSAL
If true, applies also to quantities str than the one used in detection. The detection and the accumul...
Definition DetectorOp.h:181
Essential class for storing radar data.
Definition Data.h:300
Definition TestOp.h:44
TestOp(double value=0.0, double prob=1.0)
Create rectangular fake anomaly (value) and 'detect' it with desired probability (prob)
Definition TestOp.h:55
void runDetection(const DataSet< PolarSrc > &srcDataSet, PlainData< PolarDst > &dstProb, DataSet< PolarDst > &cache) const
Process as sweep (data in one elevation angle)
Definition TestOp.cpp:56
Namespace for images and image processing tools.
Definition AccumulationArray.cpp:45
Definition DataSelector.cpp:44