How to generate orthogonal X-ray Projection, Digitally Reconstructed Radiographs (DRR), from a particular CT volume

38 views (last 30 days)
Hello everyone,
I am simulating Orthogonal X-ray Projection, specifically Digitally Reconstructed Radiographs (DRR), from a particular CT volume.
To accomplish this, I first created a CT volume and then used the "generateOptimizedXrayProjections" function to produce DRR for both the anteroposterior (AP) and lateral projections.
1. To view the results from this process, please refer to lines 34-35 and line 53. When I run this simulation, I can see the DRR results.
2. However, when I used a real CT image (lines 38-39 and line 54), the generated DRR appeared completely dark.
My goal is to generate a DRR from a real CT image, such as CT_13.nii.gz.
I would greatly appreciate any insights or suggestions regarding this code.
Attached below are the MATLAB code (zip file) for reference.
Thank you!
  1 Comment
Rik
Rik on 27 Dec 2025 at 15:56
The underlying reason seems to be that this code produces an image that mostly consists of 0 and 1, as you can see in the histogram below.
Are you sure you're using the correct data type and range as inputs? Is the code perhaps expecting HU instead of CT numbers?
unzip('Code.zip'),cd('Code')
run('Code7.m')
============================================ [1/6] Creating synthetic CT volume... [2/6] Generating X-ray projections...
This variable is a double. The variable range is 0.0 - 1.0.
figure,histogram(xray_A)

Sign in to comment.

Accepted Answer

Matt J
Matt J on 27 Dec 2025 at 17:35
This is a popular Matlab compatible library,
It does both cone beam and parallel projections.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!