medpy
                                
                                 medpy copied to clipboard
                                
                                    medpy copied to clipboard
                            
                            
                            
                        Allow Passing in Function to Anisotropic Diffusion Filtering
Right now the Anisotropic Diffusion Filtering takes in an option {1,2,3}, which limits the set of functions that can be used. I suggest allowing the user to pass in a function.
the signature should be: f(delta, spacing, dim_idx).
This will allow:
- different conductance param by dimension
- other scaling forms for the existing 3 functions
- new functions (eg huber)
Yes... I must confess, I fear a little increasing the complexity of the functions. Out of the box, they should work with as many default parameters as possible. Having to write (or at leas pass) a complete function might confuse some of the less experienced users.
Maybe an additional parameter, that allows to optionally pass a function?
def anisotropic_diffusion(..., equation=None):
   """
   Parameters
   ----------
   equation : function
      Can be used to supply a personal condgradient function of signature f(delta, spacing, dim_idx).
      The `option` parameter will be ignored if this parameter is set.
   """
What do you think?
Closed due to inactivity.