D parameter in fanbeam, ifanbeam. similar to radon and iradon!
2 views (last 30 days)
Show older comments
Hello,
I am hoping someone can help me understand the "D" parameter that is used in fanbeam and ifanbeam. The help files say:
"D is the distance in pixels from the fan-beamvertex to the center of rotation. The center of rotation is the centerpixel of the image, defined as floor((size(I)+1)/2). D must be large enough to ensure that the fan-beam vertex is outside of the image at all rotation angles. As a guideline, try making D a few pixels larger than half the image diagonal dimension, calculated as follows sqrt(size(I,1)^2 + size(I,2)^2)"
So, I'm trying to understand where this value of D comes from, so I'm starting with the more simplified case which is a radon transform (parallel projections). Using : http://www.mathworks.com/help/images/examples/reconstructing-an-image-from-projection-data.html I am able to follow the example until we get to the value of N = 367. When I calculate the diagonal of the image (256x256) I get 363 (rounded up). Can someone help me understand where this 367 comes from? I would REALLY appreciate it!
You might be wondering why this matters to me. Basically, the image I'm using fanbeam on is full of values that are [per cm]. When I pass over the image with each beam, I need to know how long the actual beam is so that I can multiply the value by the integration length.
Thanks so much!! Kristin
3 Comments
Accepted Answer
Matt J
on 12 Dec 2012
Edited: Matt J
on 12 Dec 2012
What value of D do I use when calling the function ifanbeam? L1 or L2?
L1. By the way, if you run "doc fanbeam", you would see essentially the same diagram as the one you've drawn, but with L1 labelled as D. Unfortunately, the same diagram is not available in "doc ifanbeam"
What's also interesting is that because we're not measuring a solid object, the area that's shaded green is also captured by all of the fans and is not necessarily = 0. However, the output of ifanbeam is inherently a rectangular matrix (image).
Yes, but you could use a larger reconstruction grid (one that covers the entire green shaded region) if you wanted to reconstruct all of the non-zero material. The only reason, by the way, that you are allowed to reconstruct on a grid that is smaller than your green shaded region is because the particular algorithm used by ifanbeam is capable of reconstructing each pixel independently of all the others, and that flexibility comes at a price. In some reconstruction algorithms, however, all non-zero pixel values are obtained interdependently and so you would have to use a reconstruction grid large enough to cover all non-zero points.
BUT, the data needs to reflect that the length of the beam going through the rectangle. I.e., Lb ~= Ly. After I perform fanbeam on the data, I need to be able to multiply the integrated values by the length of the beam which passed through the matrix of the data. Does that make sense? Or does fanbeam.m already account for this difference in distance?
FANBEAM does take intersection length into account, but remember, it's doing a line integral along each ray through the object. So, it's not normally the total length of intersection with the image grid that is relevant, but rather the length of the intersection of each ray with each material. For example, if you look at your ray Ly, you can see that that ray intersects at least 3 different non-zero materials, and the intersection length with each is different. Approximately speaking, FANBEAM multiplies the length of each of those sub-segments of Ly with the image value of the material they each intersect. Those weighted lengths are summed to obtain the approximate line integral along Ly, and that's what FANBEAM returns as output. Of course, FANBEAM measures those lengths in pixels, as opposed to cm or mm, so there is a global scaling that you would have to perform if you want to work with physical units of length.
0 Comments
More Answers (2)
Matt J
on 11 Dec 2012
Edited: Matt J
on 11 Dec 2012
So, I'm trying to understand where this value of D comes from
I may not be interpreting the question correctly. "Where does it come from" is a little vague to me. But basically, D is supposed to measure a physical dimension in the imaging system.
When you do fanbeam projection, it's usually because you're dealing with a system in which an x-ray source moves in a circular orbit around an object firing a fan-shaped beam of x-rays at it. The parameter D is supposed to represent the radius of this circular orbit measured in pixel lengths.
The requirement that "D must be large enough to ensure that the fan-beam vertex is outside of the image at all rotation angles" sounds a bit ill-phrased, because D is normally a fixed physical dimension of the system, not a parameter you adjust. It's the image grid size that you should be adjusting relative to D. Basically,the doc is saying that you have to use an image grid that is cropped small enough to fit completely within the circular orbit of the source. In practical CT systems, your object would normally fit inside this region so as not to get hit by the rotating gantry holding the source, so it's a very light restriction.
Basically, the image I'm using fanbeam on is full of values that are [per cm]. When I pass over the image with each beam, I need to know how long the actual beam is so that I can multiply the value by the integration length.
I don't think so. If you're projecting an attenuation image expressed in per cm, the length of a pixel in cm is what you would normally use as the integration length, not the length of the beam.
Kristin Busa
on 13 Dec 2012
Edited: Kristin Busa
on 13 Dec 2012
1 Comment
Matt J
on 13 Dec 2012
Edited: Matt J
on 13 Dec 2012
Hi Kristin,
Before moving on to new questions, we should close this question first. Please accept-click my Answer above (since you seem to be satisfied with it) and then post your new question in a separate thread.
It would also be helpful to this board if you closed some of your other open questions, e.g., this one
unless you plan to continue them.
Finally, when you post your new question, you should probably mention the dimensions of the "data" array so that it might be possible for us to run equivalent code. You should also clarify where your "sensor" is. Does it form an arc-shaped array of cells lying along the arc of the fanbeam or is it at the fan beam's vertex. Note that L1=D is supposed to be the distance to the vertex.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!