Description
Issue Details
For many algorithms in PSP for which a size parameter is needed, we often use a factor of the average spacing. It would be nice to add a button "Estimate parameters" to the plugins in the demo so that users can do that automatically.
I'm mainly thinking of:
- outlier selection (use 3x ou 4x average spacing as distance limit)
- advancing front longest edge (use 10x average spacing)
- grid simplification (use 1x average spacing)
- edge aware upsampling (use 3x average spacing)
- WLOP (use 1x average spacing)
For the last 3, the plugin already offers something similar because the parameter you set is the factor of the average spacing. This should be removed, because although it's handy, it can also be annoying (= if I want to grid simplify something with a cell-size that I know, I have to divide this size by the average spacing to set it correctly in the plugin…). Users should be able to give the exact parameter if they don't care about the average spacing.
The behavior that would be nice for all these plugins:
- have a hard-coded default value (as is already the case)
- have a button next to it "Estimate parameter"
- clicking this button triggers a new window that asks for a number of neighbor (mandatory for average spacing)
- OK -> launches computation of average spacing
- when done, the QDoubleSpinBox of the size parameter should be filled with the factor of average spacing (as defined above)
- then the user has the possibility to adjust it or to run the algorithm with these estimated parameters
I imagine most of this could be factorized and reused everytime we need it.