Closed poretga99 closed 1 month ago
Hi @poretga99, it's always a fun time transforming from one person's affine geometry to another's :) DiffDRR is able to support all the geometry geometry you have (including the principal offset point), but it'll be annoying to get it back in term of a single set of intrinsic/extrinsic parameters. In case all reverse engineering fails, just note that the internal rendering system allows you to directly pass the 3D world coordinates of the X-ray source and detector pixels (source
and target
):
I'm also happy to help reverse engineer the intrinsic/extrinsic parameters if you want! Just let me know which route you'd prefer to go.
Before deciding on which route to choose, maybe I should describe the setup first.
I have a 2D3D registration problem. Given two reference XRays and CT image, I have to find the optimal position of CT in space.
As far as I’ve gone through the code and documentation, you use RAS convention, whereas we use DICOM, which will be another problem by itself.
Each of my XRays has the following information:
3D CT scan has the following information:
In my case, XRay SPos (source position) may not be coincident with the detector midpoint. This typically happens when you crop the XRay image to the desired region of interest.
What would your suggestion be on how to proceed? I can also provide the images and geometry as a result of our current rendering engine.
I managed to reconstruct the desired DRR by directly passing the detector points and source position as per your suggestion. Thanks for the help!
Even though, I would be interested in the intrinsic/extrinsic parameter extraction.
Hi @poretga99 sorry for the slow reply on this. If you still want to find the intrinsic/extrinsic parameters, feel free to send me an email and we can try to work through it.
I recently worked on another project where I knew the source/target points in 3D for every pixel in a set of X-ray images, but not their intrinsics/extrinsics. Trying to solve for them proved to be a fruitless blackhole with minimal benefit, so directly using the source/targets is what I've been doing for my own stuff.
I want to perform DRR rendering with reference geometry given in transformation matrices instead of the C-arm parameters and can't get the same result as our internal rendering engine.
Given the following matrices given in DICOM coordinate system:
TPos: 4x4 homogenous matrix, representing the detector position in WCS SPos: 3x1 vector, representing X-Ray source position in WCS
How can one properly construct the geometry? I can expose the SSD by calculating the distance from source location (SPos) to X-Ray detector plane, but the ray does not need to directly intersect with the detector midpoint.