Implementing Shift and Add Algorithm for 3D Reconstruction of X-ray Images

In summary, the conversation discusses a project in which the implementation of a shift and add algorithm is required to obtain cross-section slices and reconstruct a 3D model of a finger joint using 16 xray images taken with a C-arm system. The algorithm is based on two research articles and involves variables such as rotation, distance, and equations to describe the shift and add process. The individual conversing has encountered issues with
  • #1
Aaerion
4
2
Problem:
In my class, we have been assigned a project where we must implement a shift and add algorithm to a set of xray images. There are 16 xray images of a finger joint taken with a 5 angle increment using a C-arm xray system. The xray images we will be given is from the second citation that I have below. We have to use the shift and add algorithm with these images to obtain cross-section slices through the entire figure so that we can reconstruct a 3D model of the object shown in the xray projections.

All of the work that we do in this project is based upon two research articles:

Z. Kolitsi, G. Panayiotakis, V. Anastassopoulos, A. Scodras, and N. Pallikarakis, “A multiple projection method for digital tomosynthesis,” Med. Phys. http://dx.doi.org/10.1118/1.596822 19, 1045–1050 (1992).

and

S. Li and H. Jiang, “A practical method for three-dimensional reconstruction of joints using C-arm system and shift-and-add algorithm,” Med. Phys. 32, 1491–1499 (2005). http://dx.doi.org/10.1118/1.1915289My understanding of the problem:

The experimental set-up in Li's article is the following:
experiment_zpsb1103de4.png

Where the cylindrical object is rotated along the y axis.The variables to describe the shift and add algorithm are given in the below figure:
nomen_zps2375ed23.png


Where:
ω= rotation relative to isocenter
b= distance of source to isocenter
d= distance of source to intensifier plane
l = distance of object plane to isocenter

The given equations in the article to describe the shift-and-add algorithm are the following:
equations_zps64afbbb6.png

Where:
i = column number in matrix of projection image [tex]M_n(i,j)[/tex]
r= the column position where i is moved to in [tex]M'_n(i,j)[/tex]

The final projection image at depth m is:
finaleq_zps76816a78.png

where [tex]M'_n(i,j) = M_n(r,j)[/tex]My attempt:
From the above information, I determined:

i= 1 to total columns of image
l= 0 to 20mm
[tex]\omega= \omega + \Delta \omega = \omega + 5°[/tex]
b= 315 mm
d= 315mm + 135mm =450 mm

I think this might be one place where I am going wrong, but I'm not sure how it would be wrong. The code that I made for this is: http://pastebin.com/S949UbQs

In order to test my code, I followed what Li did in his article and used an xray picture of a cylinder:
http://i1302.photobucket.com/albums/ag122/abysstheory/image1_zpsb2be43fc.jpg

My results looked like this:
http://i1302.photobucket.com/albums/ag122/abysstheory/0_zps21e9ff15.jpeg
http://i1302.photobucket.com/albums/ag122/abysstheory/11_zps0a0c4fe9.jpeg
http://i1302.photobucket.com/albums/ag122/abysstheory/20_zpsd7c1e352.jpeg

When they should have looked like this:
http://i1302.photobucket.com/albums/ag122/abysstheory/Proper_zps41ef5696.pngNoticed Problems:

When I run my code, the value of r is almost always is a non integer value which is strange since it is supposed to be an integer index value. I deal with this by rounding the value of r and using that as the new index value that column i will be shifted to.

Furthermore, I notice that many times r becomes greater than the maximum column value for the matrix or it becomes negative. I currently deal with this in my code by setting r=1, but I'm not sure that this is really the correct way to go about things.

I'm not really sure where I'm going wrong with my implementation of the shift and add algorithm.
 
  • Like
Likes Isha Tawade
Physics news on Phys.org
  • #2
By the way, here are links to the sources:
https://drive.google.com/file/d/0B2znAN7W7eljdENfZE5tWUhUUk0/edit?usp=sharing

https://drive.google.com/file/d/0B2znAN7W7eljZTZPZV8tMUxuQVU/edit?usp=sharing

I made a slight change to my code because I had the following:

else
Mp(j,i)=imageData(j,rn);​

but then I realized that it should instead be:
else​
Mp(j,rn)=imageData(j,i);
since I am taking the data from imageData in the i column and shifting it to rn in the new matrix, Mp.

With this adjustment, I now get the following output (that is still not what I want):
http://i1302.photobucket.com/albums/ag122/abysstheory/0_zpscb7d6498.jpeg
 
  • Like
Likes Isha Tawade

What is the Shift and Add algorithm?

The Shift and Add algorithm is a method used for performing multiplication of two numbers using only addition and bit shifting operations. It is commonly used in digital computers and calculators.

How does the Shift and Add algorithm work?

The algorithm works by breaking down the two numbers into their binary digits and performing a series of shifts and additions to get the final product. It involves shifting one of the numbers to the left by a certain number of bits and then adding the shifted number to itself a certain number of times based on the value of the other number's binary digit.

What are the advantages of using the Shift and Add algorithm?

The main advantage of using this algorithm is that it only uses addition and bit shifting operations, which are simpler and faster to perform than multiplication. This makes it a more efficient method for multiplying large numbers.

Are there any limitations to the Shift and Add algorithm?

One limitation of this algorithm is that it can only be used for multiplying positive integers. It also requires the numbers to be converted to binary form, which can be time-consuming for large numbers.

Can the Shift and Add algorithm be used for division?

No, the Shift and Add algorithm can only be used for multiplication. To perform division, a different algorithm, such as the Shift and Subtract algorithm, must be used.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
Replies
1
Views
894
  • Advanced Physics Homework Help
Replies
6
Views
1K
  • Introductory Physics Homework Help
Replies
6
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
3K
  • Programming and Computer Science
Replies
6
Views
2K
  • Advanced Physics Homework Help
Replies
1
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
3K
  • Programming and Computer Science
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
272
Back
Top