Conversation
… + MATLAB) Wang's displaced-detector weights assume a full circle: they ramp one side of the detector down and rely on the opposing (beta + pi) views to bring the coverage back to uniform. On a short scan those views do not exist, so the ramp survives into the reconstruction as a one-sided shading, and any non-zero offDetector - a sub-pixel calibrated value is enough - switched the weights on with no check of the scan arc. Python: is_short_scan(angles) (the test FDK.m already uses for the Parker default: max - min < 2*pi - 1.5*max(step), so endpoint=False full circles are not short); FDK skips the weights and says so when verbose. MATLAB: the same condition in FDK.m with a warning. Full scans unchanged. Demo d26 (Python; MATLAB twin untested here): uniform cylinder, 200-degree scan, 0.1 mm offset - left/right interior ratio 1.171 with the weights, 1.002 without, 1.002 for the centred reference. Tests: 7 pure-NumPy classification cases + 1 GPU reconstruction test.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is wrong. Wang's displaced-detector weighting assumes a full circular scan: it ramps one side of the detector down and relies on the opposing (beta + pi) views to bring the ray coverage back to uniform. On a short scan those opposing views do not exist, so the ramp survives into the reconstruction as a one-sided shading (a "teardrop"). Both bindings switch the weights on whenever
offDetectoris non-zero, with no check of the scan arc - and a sub-pixel calibrated offset is enough to trigger it, so a short scan with a calibrated geometry was silently shaded.Fix. FDK skips the Wang weights when the angles do not cover a full circle. The test is the one MATLAB's
FDK.malready uses to decide Parker weighting (max - min < 2*pi - 1.5*max(step)on the in-plane angle), so a full circle sampled withendpoint=Falsestill gets the weights and the two bindings agree.is_short_scan(angles)insingle_pass_algorithms.py(accepts(n,)or(n, 3)), used byFDK; averbosemessage says when the weights were skipped.FDK.mwith awarning.Full scans are unchanged: the weights are applied exactly as before.
Example (
Python/demos/d26_ShortScanWangWeights.py): a uniform cylinder (mu = 0.02), 200-degree scan, 64^3. Left/right interior ratio of the reconstruction:A MATLAB twin of the demo,
MATLAB/Demos/d26_ShortScanWangWeights.m, reproduces the old behaviour by applyingredundancy_weightingby hand and then calls the default FDK; I could not run MATLAB here, so it is untested - please try it if you can.Tests (
Python/tests/test_fdk_short_scan_wang.py): seven pure-NumPy classification cases (full circle with and without endpoint, 200 degrees, half circle, Euler triplets, descending angles, single angle) and one GPU reconstruction test asserting the offset short scan matches the centred one to 5 %.Not in this PR. Python's FDK still calls

filtering(..., parker=False)(the# TODO: Fix parkerin filtering.py), so Python short scans get no Parker weights where MATLAB applies them by default. Withparkerweightfixed in #767 that parity is a separate, small follow-up.