Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for ellipse_im with nonzero rotation #106

Merged
merged 1 commit into from
Jul 15, 2021

Conversation

cjblocker
Copy link
Contributor

Test code:

import MIRT: ellipse_im, jim
import ImageTransformations: imrotate, Linear
jim([ ellipse_im(256,256; rot=0); 
      ellipse_im(256,256; rot=45);
      imrotate(ellipse_im(256,256; rot=0), π/4, (256,256), Linear(), 0.0)], colorbar=:none)

Before on the current HEAD of master:
Screen Shot 2021-07-13 at 1 40 33 PM

After changes:
Screen Shot 2021-07-13 at 1 46 32 PM

@johnnychen94
Copy link
Contributor

Out of curiosity, I did a small benchmark on this and TestImages. It's not equivalent but at least it indicates some room for optimization.

julia> @btime ellipse_im(256,256; rot=0);
  11.531 ms (714 allocations: 101.42 MiB)

julia> @btime TestImages.shepp_logan(256);
  1.103 ms (4 allocations: 516.33 KiB)

@codecov
Copy link

codecov bot commented Jul 15, 2021

Codecov Report

Merging #106 (bb280cc) into master (b66be11) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #106   +/-   ##
=======================================
  Coverage   99.81%   99.81%           
=======================================
  Files          44       44           
  Lines        2181     2182    +1     
=======================================
+ Hits         2177     2178    +1     
  Misses          4        4           
Impacted Files Coverage Δ
src/fbp/ellipse_im.jl 100.00% <100.00%> (ø)
src/regularize/diffl.jl 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b66be11...bb280cc. Read the comment docs.

@JeffFessler
Copy link
Owner

@cjblocker turns out this was a bug in Matlab MIRT too so you've provided a double fix. thanks!
JeffFessler/mirt#17

@johnnychen94 stay tuned for a more sophisticated version in JuliaImageRecon...

@JeffFessler JeffFessler merged commit bfe1e22 into JeffFessler:master Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants