-
Notifications
You must be signed in to change notification settings - Fork 60
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
Add check_bbox argument management #641
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personnellement je mettrais ça partout dans scilpy, mais c'est en effet une bonne idée d'ajouter ça au moins au scoring.
Build passed ! Good Job 🍻 ! |
Ok can you tell me a little bit about why this is such an issue ? Why we don't add a new arg to force bbox_valid_check to false ? |
I'm not sure in other scripts, but here we are scoring tractograms that are potentially bad. But if I try to think about general cases, I would say the most probable case is when vertical bundles/streamlines go too far in the brainstem under the pons, into the spinal cord, they can go out of the image quite easily. Other ideas, @AntoineTheb ? |
Yeah that's usually the problem. The FiberCup's ground truth also goes out its volume. |
Thinking about it, it could probably be a good idea to add an option to the |
I agree, I don't like to automatically skip the bbox checking. |
I agree too. |
I made the change in all scripts using that check. Tested the whole pytest locally, it works. During loading: when using During saving: we use |
Cool ! Do you have a tractogram to test it ? |
Build passed ! Good Job 🍻 ! |
1 similar comment
Build passed ! Good Job 🍻 ! |
|
Build passed ! Good Job 🍻 ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at all these modifications I think we have to really discuss about this implication because a lot of save and load were using bbox_valid_check=False and also now there is no distinctions between load and save and I don't really know if it's a good thing or not.
@@ -70,8 +70,7 @@ def main(): | |||
parser.error('Min-Max ufactor "{},{}" '.format(args.minU, args.maxU) + | |||
'must be between -1 and 1.') | |||
|
|||
sft = load_tractogram_with_reference( | |||
parser, args, args.in_tractogram) | |||
sft = load_tractogram_with_reference(parser, args, args.in_tractogram) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing add_bbox_check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bbox_check=False
was not there to start with. I just removed the unnecessary newline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what you mean with "no distinction between load and save" @arnaudbore
Build passed ! Good Job 🍻 ! |
Maybe I can remove this big commit for now, just so that scil_score_bundles can be usable in the next release, and we keep this bigger change for later? |
@EmmaRenauld yes go ! |
Same as Antoine. I'm not sure either what you mean. I did not change the way it already was. Even better, I removed the default "False" in many places to make it optional. But to try and answer... In the case where you need to use it because you have a faulty tractogram, there is a very good change that if a streamline is misplaced in the input, it will also be in the output, no matter what the script does. So I would guess that it's ok in general. |
2e7736a
to
6e8fe6f
Compare
Build Failed 💥 |
Build Failed 💥 |
6e8fe6f
to
b1f9e46
Compare
Build passed ! Good Job 🍻 ! |
Is this ready, now that the release is done? @arnaudbore |
Build passed ! Good Job 🍻 ! |
Build passed ! Good Job 🍻 ! |
@EmmaRenauld Can you update this code with master and then check if everything runs normally. |
Build passed ! Good Job 🍻 ! |
Out of curiosity, how did you pick which script to change immediately in this PR? Are they all script that runs even with invalid? |
Hmmm.. it was 6 months ago so I don't exactly remember, sorry. I probably searched the word bbox_valid_check in all files. |
Build passed ! Good Job 🍻 ! |
Very small fix, remove bounding box valid checks.