-
Notifications
You must be signed in to change notification settings - Fork 12
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
ACR Slice Position Functionality #299
Conversation
Adds algorithm to calculate slice position displacements. Rotation detection (and correction) pending!
Adds unit tests for the ACR slice position HazenTask. No coverage for the find_n_peaks static method as it will be later placed in a separate module along with an improved centroid detection function.
Make the find_n_peaks method static until an ACR-specific module is created with commonly reused functions.
Corrects wording used in docstring.
Add additional CLI test for ACR Slice Position.
Note that there is a function outside of the class, find_n_peaks, which will be later refactored into a library of ACR specific functions, in the same vein as tools.py. |
Pretty much. Measurement of wedge lengths didn't perform so well in low SNR datasets, and this method allows sub-pixel measurement via interpolation (similar to how it would be done in a DICOM viewer). I'll add axis labels to the plots with the x units being relative pixel position in mm. Would that make it easier to understand? |
Add x-label to plots.
@YassineRMH But the final number for slice position is the difference in length of the wedges right? |
Yes, but I calculate it by finding the minimum difference in the subtraction of the right line profile through the wedge (subject to various shifts) and the left profile through the wedge. Here's the updated docstring:
|
Trimmed down the docstring and attempted to make it clearer.
Hi @YassineRMH, could you please expand on this sentence as I cannot quite understand it "Circular shifts are applied to the right wedge's line profile and I will then merge this PR. |
How about this: This script calculates the bar length difference in accordance with the ACR Guidance. Line profiles are drawn Right line profile: [1, 2, 3, 4, 5] This wrapping process, from hereon referred to as circular shifting, is then used for subtractions. The shift used to produce the minimum difference between the circularly shifted right line profile and the static left one are used to determine the bar length difference, which is twice the slice position displacement. The results are also visualised. If this is acceptable, I'll commit it. Let me know where it does not make sense. |
@YassineRMH thank you @YassineRMH, please commit this and I'll merge |
Updated docstring.
These results are visualised in the report, as shown below: