eigenvivek / DiffDRR

Auto-differentiable digitally reconstructed radiographs in PyTorch
https://vivekg.dev/DiffDRR
MIT License
148 stars 21 forks source link

CT spacing #337

Closed fedeface98 closed 4 weeks ago

fedeface98 commented 1 month ago

Hi,

I have a doubt regarding the spacing of the CT scan. Is this used somehow in the translation of the C-Arm? Because I saw in the paper that the isocenter translation is defined as the number of voxel * spacing of the CT. I was wondering if I should have the same spacing in different patients to have comparable translation.

Thanks a lot for your amazing work.

Federica

eigenvivek commented 4 weeks ago

hi Federica, the CT spacing isn't used in the C-arm translation. the C-arm spacing is applied to the points along each ray, so as to find where in the volume they lie.

the current implementation computes the same integral laid out in the paper, but the steps are different. now, we use the inverse of the affine matrix to map sampled points from world coordinates to voxel space. same operation, just more efficient :)