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

median_otsu misused in three_tissue_response_dhollander16 #76

Closed
matteofrigo opened this issue Sep 27, 2019 · 3 comments · Fixed by #88
Closed

median_otsu misused in three_tissue_response_dhollander16 #76

matteofrigo opened this issue Sep 27, 2019 · 3 comments · Fixed by #88

Comments

@matteofrigo
Copy link
Contributor

The median_otsu method from dipy takes as input the variable vol_idx which must be an iterable.
In the three_tissue_response_dhollander16 function this parameter is passed as a scalar.

I'll fix it and push a PR, but we should be aware of the fact that this could be happening somewhere else. It may be due to the recent dipy update (v1.0) but again, I'm not sure and this must be checked.

@matteofrigo
Copy link
Contributor Author

The old syntax is

median_otsu(input_volume, median_radius=4, numpass=4,
autocrop=False, vol_idx=None, dilate=None):

The new one is

median_otsu(input_volume, vol_idx=None, median_radius=4, numpass=4,
autocrop=False, dilate=None):

@heejong-kim
Copy link

heejong-kim commented Apr 27, 2020

Hi @matteofrigo, "b0_mask, mask = median_otsu(data, 2, 1)" still makes the problem of iteration. I am guessing that the median_otsu line is based on dipy example. You may want to update three_tissue_response.py median_otsu line to: b0_mask, mask = median_otsu(data, median_radius=2, numpass=1)

@rutgerfick
Copy link
Collaborator

Hi @heejong-kim, following your comment I just updated the usage of the median_otsu function as suggested. Things should work now as expected!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants