Closed kabasset closed 8 months ago
Done as apply()
for now, to be confirmed:
for (const auto& p : in.domain()) {
mask[p] = (laplacian[p] > tl) && (quotient.apply(in, p) > tq);
}
Now that patch()
has been replaced with operator|
, it would be nice to have a uniform syntax, e.g. filter.transform(in | p, out)
and out = filter * (in | p)
. Yet, out
would be a single value.
Could also be an array, to allow for several pixelwise evaluations, e.g.:
auto out_box = filter * (in | box);
auto out_p = filter * (in | p);
auto out_pqr = filter * (in | {p, q, r});
Or maybe operator|
is not the best choice, and operator()
would be better for isolated transforms:
auto out_box = filter * in(box);
auto out_p = filter * in(p);
auto out_pqr = filter * in(p, q, r);
To be verified that Interpolation::operator()
would not conflict anywhere.
It is also possible to go back to a named function, like pixels()
:
auto out_box = filter * (in | box);
auto out_p = filter * in.pixel(p);
auto out_pqr = filter * in.pixels(p, q, r);
Feature implemented with operator()
as the patch maker.
auto out_box = filter * in(box);
auto out_p = filter * in(p);
auto out_pqr = filter * in(p, q, r);
Sometimes, a filter has to be evaluated over few positions, such that
operator*
could be specialized forraster.patch(Position)
or a new operator, e.g.()
, could be introduced. No split is needed in this case.Example, for flagging cosmics: