Closed YassineAzma closed 1 year ago
Coverage Report
Tests | Skipped | Failures | Errors | Time |
---|---|---|---|---|
200 | 0 :zzz: | 0 :x: | 0 :fire: | 2m 32s :stopwatch: |
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.
Hi @YassineRMH,
I am having trouble checking this from the images, but you are basically calculating difference in length of the two wedges right? Such as shown in picture below
If that is the case, could this be incorporated as a "short summary" of the algorithm in the docstring?
Hi @YassineRMH,
I am having trouble checking this from the images, but you are basically calculating difference in legth of the two wedges right? Such as shown in picture below
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?
@YassineRMH But the final number for slice position is the difference in length of the wedges right?
@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:
This script calculates the bar length difference in accordance with the ACR Guidance. Line profiles are drawn
vertically through the left and right wedges. Circular shifts are applied to the right wedge's line profile and
subtracted from the static left wedge line profile. 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.
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 subtracted from the static left wedge line profile."
I will then merge this PR.
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 subtracted from the static left wedge line profile."
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 vertically through the left and right wedges. The right wedge's line profile is shifted and wrapped round before being subtracted from the left wedge's line profile, e.g.:
Right line profile: [1, 2, 3, 4, 5] Right line profile wrapped round by 1: [2, 3, 4, 5, 1]
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
These results are visualised in the report, as shown below: