I would need an automatic way of running Foreground Masking via command line.
As far as I understood it is not a cli module, so I need to load the image and run the mask generation via a python script.
However, I didn’t find a way for accessing its logic.
Thanks a lot.
Hi Paolo -
Can you elaborate on what you mean by Foreground Masking ?
Hmm, I don’t recall that one, perhaps we deprecated it. But it looks like you can do the same thing with the segment editor pretty easily.
Thanks @pieper, I got it !
If volume geometries are matching then you can also do masking (or combine volumes with various functions) using standard numpy array operations. See this example in the script repository.
thanks for answering.
I was interested in generating the mask, so I think I’ll give a try to something different to foreground masking.
Otsu (and about 6-8 other) automatic threshold computation methods are available in Threshold effect and morphological opening is available in Smoothing effect in Segment Editor. You can use these effects from Python as shown in examples in the script repository.