Restrict computation of op to a specific region of the input

mask
imagej-ops
label
Tags: #<Tag:0x00007fd69c937838> #<Tag:0x00007fd69c9376d0> #<Tag:0x00007fd69c9351c8>

#1

Dear all,

in the context of a recent PR by Simon (thanks for working on it) to add an implementation of the Watershed algorithm, I have asked in the imagej-ops Gitter channel how to handle the scenario where you’d want to run the op only on specific parts of an image. In this particular case, the implementation features an optional mask parameter that is used to determine which input samples are taken into account during the computation.

I was wondering if this is a more general concept and if you could come up with scenarios where such functionality might also be useful?

Best,
Stefan


#2

I think a general way to do this would be very awesome, I mean it should be already possible to do this by defining a mask shaped IterableRegion of some kind as the input image. But having an easily accessible API for this would make this a lot better.