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

[FIX] correctly calculate min / max sl length, update step_size docs #905

Merged
merged 11 commits into from
Sep 24, 2022

Conversation

36000
Copy link
Collaborator

@36000 36000 commented Sep 19, 2022

Previously, min_length, max_length, and step_size were all in voxel space units but we docs said they were in mm. Now, min_length and max_length are input in mm and docs clarify that step_size is in voxel space units. Then, min and max length are converted to step size units. I think this makes the most sense.

@36000
Copy link
Collaborator Author

36000 commented Sep 19, 2022

The old default min and max sl lengths were so lenient that this would not be a problem in previous runs. Only with the recent merge has this become a problem.

@36000
Copy link
Collaborator Author

36000 commented Sep 19, 2022

Just to finish off the VOF/pARC addition, we need to make the cleaning parameters stronger.

@36000
Copy link
Collaborator Author

36000 commented Sep 19, 2022

This is heading towards fixing master, however the problem is some bundles, like the IFOF, cannot be found even with max streamline length of 250 mm. So we may need to do some testing on bundle length, or maybe there is some bug in converting max/min sl length to step size that I don't yet understand. I am going to pause on this for now to focus on other things (GRFP , IN-BIC meeting)

@36000
Copy link
Collaborator Author

36000 commented Sep 19, 2022

With min SL 20mm, max SL 250mm
image

@36000
Copy link
Collaborator Author

36000 commented Sep 19, 2022

Nevermind, tweaked defaults/example reqs and now it has a chance of passing the docs test. Still, we should revisit the min/max bundle lengths stuff in the future.

@36000
Copy link
Collaborator Author

36000 commented Sep 22, 2022

@arokem The broken master has to do with changes to min/max SL length in the recent PR. I fixed a bug in this code (which was not previously relevant as we had lenient min/max) but it seems like some bundles (FA/FP) require a small min sl length. I think we should make min/max sl length a bundle-specific parameter in the future, and then merge this PR to fix master.

@36000
Copy link
Collaborator Author

36000 commented Sep 22, 2022

I also changed the cleaning parameter reasonable default. This helps with VOF/pAF. This we should also make bundle-specific in the future.

Copy link
Collaborator

@arokem arokem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall. Just one question about the changes to the tractography code.

if len_sl > self.min_length * self.step_size\
and len_sl < self.max_length * self.step_size\
and len_sl > 1:
if len_sl > self.min_length:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this change mean we are no longer enforcing max_length?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that DIPY already uses a max_length. its enforced via the size of F and the function _tracker .

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it!

@arokem arokem merged commit 288e5a4 into yeatmanlab:master Sep 24, 2022
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 this pull request may close these issues.

2 participants