#include <fast_morpho.hxx>
Static Public Member Functions | |
void | doit (I &input, S &size, H &hist, B *se_add, B *se_rem, B *se_add_back, B *se_rem_back, P &p, O &output, const unsigned *dims) |
Definition at line 161 of file fast_morpho.hxx.
|
Perform the action. Definition at line 167 of file fast_morpho.hxx. References oln::morpho::internal::hist_update().
00170 { 00171 const unsigned N = *dims; 00172 00173 fast_morpho_inner<NP1 + 1, Dim, 00174 I, S, H, B, P, O>::doit(input, size, hist, 00175 se_add, se_rem, 00176 se_add_back, se_rem_back, p, 00177 output, dims + 1); 00178 if (p.nth(N) == 0) { // Go forward 00179 for(++p.nth(N); p.nth(N) < size.nth(N); ++p.nth(N)) { 00180 hist_update(hist, input, p, se_rem[N], se_add[N]); 00181 output[p] = hist.res(); 00182 fast_morpho_inner<NP1 + 1, Dim, 00183 I, S, H, B, P, O>::doit(input, size, hist, 00184 se_add, se_rem, 00185 se_add_back, 00186 se_rem_back, 00187 p, output, dims + 1); 00188 } 00189 --p.nth(N); 00190 } else { // Go backward 00191 for(--p.nth(N); p.nth(N) >= 0; --p.nth(N)) { 00192 hist_update(hist, input, p, se_rem_back[N], se_add_back[N]); 00193 output[p] = hist.res(); 00194 fast_morpho_inner<NP1 + 1, Dim, 00195 I, S, H, B, P, O>::doit(input, size, hist, 00196 se_add, se_rem, 00197 se_add_back, 00198 se_rem_back, 00199 p, output, dims + 1); 00200 } 00201 ++p.nth(N); 00202 } 00203 return; 00204 } |