#include <HxExportExtraIdentMaskStdev.h>
Public Types | |
typedef HxTagTransInVar | TransVarianceCategory |
Functor is translation invariant. More... | |
typedef HxTag1Phase | PhaseCategory |
1 phase. More... | |
Public Methods | |
HxExportExtraIdentMaskStdev (HxTagList &tags) | |
Constructor. More... | |
~HxExportExtraIdentMaskStdev () | |
Destructor. More... | |
void | doIt (const ImValT &imV, const ExtraValT &extraV) |
Processing one pixel. More... | |
Static Public Methods | |
HxString | className () |
The name : "identMaskStdev". More... |
|
Functor is translation invariant.
|
|
1 phase.
|
|
Constructor.
00057 : _tags(tags) 00058 { 00059 _maskVal = HxGetTag<int>(tags, "maskVal"); 00060 _exportVariance = HxGetTag(tags, "exportVariance",false); 00061 _sum = HxScalarInt(0); 00062 _sumSqr = HxScalarInt(0); 00063 _num = 0; 00064 } |
|
Destructor.
00068 { 00069 ResultT num = _num; 00070 ResultT num1 = _num - 1; 00071 ResultT result = (_num == 1) ? ResultT(HxScalarInt(0)) 00072 : (_sumSqr - ((_sum * _sum) / num)) / (num1); 00073 if(!_exportVariance) 00074 result = result.sqrt(); 00075 HxAddTag(_tags, "result", HxValue(result)); 00076 } |
|
Processing one pixel.
00082 { 00083 if (extraV == _maskVal) { 00084 _sum += imV; 00085 _sumSqr += imV * imV; 00086 _num += 1; 00087 } 00088 } |
|
The name : "identMaskStdev".
00093 { 00094 return HxString("identMaskStdev"); 00095 } |