Allow automatic deriving of a Domain from a Mask, e.g.
const float filter_mask[] = {0.25f, 0.5f, 0, 0.5f, 0.25f};
Mask<float> mask(5, 1);
mask = filter_mask;</float>
// old, verbose syntax
Domain dom(5, 1);
const uchar domain[] = {1, 1, 0, 1, 1};
dom = domain;
// new, concise syntax
Domain dom(mask);
dom = mask;
The new syntax allows to initialize/assign is as follows:
float data[3][3] = { { 1, 2, 1 }, { 2, 4, 2 }, { 1, 2, 1 } };
// mask is directly initialized using 2-dim array:
Mask<float> mask(data);</float>
// domain is either derived from Mask
Domain domain(mask);
// or from the 2-dim array
Domain domain(data);