Mask Pixels from command line

Dears,
is there a way to call the “Mask Pixels” function from the command line?!
The function I am interested is located here:


I cannot find it in the graph builder nor in the commandline list of available functions…
does anyone know how to do it?!
thanks!
Luca

Hi Luca,

It has been requested a few times already. But it is not implemented yet.
This is one of the things which need to be addressed in the future. It is summarised in this issue:
https://senbox.atlassian.net/browse/SNAP-624 and also mentioned here https://senbox.atlassian.net/browse/SNAP-828

As a workaround, you can do something similar with GPF. You can create a subset which contains only the mask and then you can write the result as CSV format.

Sorry for not answering your question but, what software are you using to film your screen?

Hi Marco,
thanks for the reply…

I have tried with this workaround, the problem is that the CSV file is huge (ca.2GB), probably containig all image pixels, even those which where not selected by my mask (whuich I created myself with an equation)…

The thing that I need is a list of only pixels satisfying a certain condition, their values and their coordinates…

totally unrelated to the topic, but may I ask how you created that gif file?
I made some for my lectures but I found the process quite cumbersome.

1 Like

it looks like the GIF is more interesting than the topic itself :wink:

the software used for that is ShareX…pretty nice and handy,

cheers

3 Likes

thank you. I thin I’m gonna flood this forum with videos now :grin:

You could set this equation as valid-pixel expression, then pixels which do not meet the expression will be NaN in the output. You could delete these pixels afterwards. But I agree it is still very large an not ideal.