Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Passing in Function to Anisotropic Diffusion Filtering #61

Closed
cancan101 opened this issue Nov 14, 2017 · 2 comments
Closed

Allow Passing in Function to Anisotropic Diffusion Filtering #61

cancan101 opened this issue Nov 14, 2017 · 2 comments

Comments

@cancan101
Copy link
Collaborator

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:

  1. different conductance param by dimension
  2. other scaling forms for the existing 3 functions
  3. new functions (eg huber)
@loli
Copy link
Owner

loli commented Dec 11, 2017

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?

@cancan101 cancan101 mentioned this issue Feb 17, 2018
@loli loli added this to the MedPy1.0.0 milestone Nov 23, 2018
@loli
Copy link
Owner

loli commented Dec 15, 2023

Closed due to inactivity.

@loli loli closed this as completed Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants