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
Peak representation improvements #433
Conversation
Codecov Report
@@ Coverage Diff @@
## master #433 +/- ##
==========================================
+ Coverage 88.32% 88.85% +0.53%
==========================================
Files 31 33 +2
Lines 6448 6973 +525
Branches 770 822 +52
==========================================
+ Hits 5695 6196 +501
- Misses 534 546 +12
- Partials 219 231 +12
|
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.
Hi @guaje,
here a quick review. I need to try your PR and go more into details.
Thank you for this feature
xyz = np.asarray(center) | ||
else: | ||
xyz = w_pos[idx, :] | ||
valid_peaks = np.nonzero( |
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.
@Garyfallidis I ran some profiling tests here and these are the results:
For a 56x72x56
image the operation is adding less than 2 seconds (0:00:01.707887
) to the for loop. Also, these are the average time and standard deviation of the operation: Avg = 0:00:00.000017, Std = 0:00:00.000006
.
I don't think this is adding a significant delay in the peaks creation, but if you think something else needs to be done, please let me know.
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.
That image is quite small. You should try it with something much larger. Will merge this PR now. But to run the same test with a much larger image. For example, the superresolved HYDI data.
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 ran the same test on an HCP 7T subject's peaks with a size of 176x207x173
and these are the results: The operation is adding less than 20 seconds (0:00:19.486101
) to the for loop. The average time and standard deviation were similar to the ones obtained with the smaller image.
Additionally, I ran a comparison test between the for loop of the current implementation of the peak slicer and the proposed version and found out that the peaks creation time of the new actor was around 20 minutes (0:03:31.901080
) faster than the current version (0:24:02.964906
).
Thanks @guaje. Merging. |
This PR is a redesign of the current
peak_slicer
actor. The design of the actor is heavily inspired in #374.It includes the following features:
peak_range.mp4
peak_planes.mp4