Threshold with vector component

Hi,

I am trying to apply the threshold filter, but it only allows scalar input as criterion. I want to use one component of a vector to set the criterion, and my current workaround is first use the calculator filter to create a new variable as a copy of one of the component of the vector, and then use that new variable to set the threshold. Is there a better way of doing this?

Thanks!

1 Like

You can enable the Auto Convert Properties option in the Settings dialog box (available from the Edit -> Settings menu item). This option exposes the individual vector components as arrays with suffix ā€œ_Xā€, ā€œ_Yā€, ā€œ_Zā€. You can use one of these for the Threshold filter.

2 Likes

That works! Just a follow-up question: what if the criterion is a function of the coordinate, say, z > 0? Is this the proper way?

Alas, no. Calculator works, as you know, but for simple thresholds like Z > 0, you could instead use the Clip filter and set the clipping plain accordingly.