Skip to content

operations: make gegl:watershed-transform input format-agnostic.

Jehan requested to merge Jehan/gegl:wip/Jehan/watershed-transform into master

Until now, gegl:watershed-transform was processing the input buffer as "YA u32". You could let the operation convert your data but this may not be what you wanted, especially if you were working on labels without color meaning. In any case, since we are not actually processing the pixel data, forcing an input format is meaningless. Now any format is accepted.

Moreover let's make the flag value (and the component where to find it) parametric instead of using absolutely the alpha component and use 0 as unlabelled flag. For instance, this would allow to use a single component buffer and simply make any label in it be the "unlabelled" flag.

Note that the defaults are so that any previous use of this operation won't be broken (since we default to using the last component, hence alpha in "YA u32" with value 0). So we keep compatibility while allowing new usages.

Edited by Jehan

Merge request reports