You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
every voxel at or below −800 HU is assigned the same scalar. Normal aerated lung parenchyma spans roughly −950 to −700 HU, so on chest CTs most of the lung lands on that floor and becomes indistinguishable from the air outside the patient.
nanodrr's hu_to_mu doesn't do this: it clamps at −1000 and applies a bilinear
water/bone model, so the variation is preserved.
I assume the DiffDRR behaviour is deliberate for the registration setting the library was built around, where bone carries the signal and NCC/MI are invariant to intensity rescaling. If that's right, would a one-line note in the docstring be welcome? It isn't obvious from the outside, and DiffDRR is still what most X-ray-to-CT work installs.
Hi @danielemolino thanks for trying out diffdrr! The thresholding ranges were a port from the behavior in deepdrr. I don't know if it actually makes a difference for registration, it's just a convention I adopted early in development. Absolutely feel free to make a PR (note the archaic nbdev structure used for diffdrr's docs, sorry about that).
Activity
eigenvivek commentedon Sep 8, 2026
Hi @danielemolino thanks for trying out diffdrr! The thresholding ranges were a port from the behavior in deepdrr. I don't know if it actually makes a difference for registration, it's just a convention I adopted early in development. Absolutely feel free to make a PR (note the archaic nbdev structure used for diffdrr's docs, sorry about that).
https://github.com/arcadelab/deepdrr/blob/cb2cb3ad1a1f68c09f79a11f4ce583bff9ff67bb/deepdrr/load_dicom.py#L132-L143
I did want something more principled for nanodrr, so I just implemented #378 in that package.