Giter Site home page Giter Site logo

ri-imaging / radontea Goto Github PK

View Code? Open in Web Editor NEW
14.0 3.0 7.0 1.11 MB

python library for tomographic image reconstruction

Home Page: https://radontea.readthedocs.io

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%
tomography backprojection radon-transform

radontea's People

Contributors

paulmueller avatar szanko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

radontea's Issues

new image

Hello,
How can I make radon transfrom to custom image with radontea?

Bug in `utils.compute_angle_weights_1d`

I believe this function should return a flat line in case all the angles in theta are equidistant.

This is true in this example:

theta = np.arange(0., 360., 1.)
>> [0.  1.  2.  ...  357.  358.  359.]
weights = utils.compute_angle_weights_1d(np.deg2rad())
>> [1.  1.  1. ... 1.  1.  1.]

But there seems to be a problem in the following cases:

1) Not a full circle

But it is not the case on the edge angles (first and last in the vector) if we do not do a full circle:

theta = np.arange(0., 136., 1.)  
>> [0.  1.  2. ...  133.  134.  135.]
weights = utils.compute_angle_weights_1d(np.deg2rad())
>> [17.37777778  0.75555556  0.75555556  ...  0.75555556  0.75555556 17.37777778]

# theta = np.arange(-90., 46., 1.)  # This theta vector produces the same result

image

2) Edges lying on the same line

And then there is another problem, if the edge angles lie on the same line through the origin of the unit circle:

theta = np.arange(-90., 91., 1.)
>> [-90.  -89.  -88.  ...  88.  89.  90.]
weights = utils.compute_angle_weights_1d(np.deg2rad())
>> [0.50277778 1.00555556 1.00555556  ...  1.00555556 1.00555556  0.50277778]

image

# This theta vector produces the same result as above
theta = np.arange(-80., 101., 1.) 

image

3) Edges are the same angle

Also, when the edge angles are the same, we get a 0 weight on the 90°, which does not make sense IMO:

theta = np.arange(-90., 271., 1.)
>>
weights = utils.compute_angle_weights_1d(np.deg2rad())
>> [-90.  -89.  -88.  ...  89.  90.  91.  ...  268.  269.  270.]
>> [1.00277778  1.00277778  1.00277778  ...  1.00277778  0.  1.00277778  ...  1.00277778  1.00277778  1.00277778]

image

Summary

Either this is not a correct implementation, or I do not understand the intentions with this function.
When I try to reconstruct a tomogram from the projections recorded at the usual tilt angles (-60°, 60°), the two edge tilts get extremely big weights and the reconstruction looks terrible. Thanks for looking at this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.