using SPECTrecon: imrotate1, imrotate1_adj using SPECTrecon: imrotate2, imrotate2_adj using MIRTjim: jim using ImageTransformations: imrotate, Linear using Plots: savefig """ `imrotate1` visualization """ T = Float32 N = 100 img = zeros(T, N, N) img[30:50, 20:60] .= 1 θ = 3*π/16 my = imrotate1(img, θ) julia = imrotate(img, -θ, axes(img), method = Linear(), fill = 0) diff1 = my - julia my_adj = imrotate1_adj(img, θ) julia_adj = imrotate(img, θ, axes(img), method = Linear(), fill = 0) diff1_adj = my_adj - julia_adj jim(jim(my, "my"), jim(julia, "julia"), jim(diff1, "diff1"), jim(my_adj, "my_adj"), jim(julia_adj, "julia_adj"), jim(diff1_adj, "diff1_adj")) # savefig() """ `imrotate2` visualization """ T = Float32 N = 100 img = zeros(T, N, N) img[30:50, 20:60] .= 1 θ = 3*π/16 my = imrotate2(img, θ) julia = imrotate(img, -θ, axes(img), method = Linear(), fill = 0) diff2 = my - julia my_adj = imrotate2_adj(img, θ) julia_adj = imrotate(img, θ, axes(img), method = Linear(), fill = 0) diff2_adj = my_adj - julia_adj jim(jim(my, "my"), jim(julia, "julia"), jim(diff2, "diff1"), jim(my_adj, "my_adj"), jim(julia_adj, "julia_adj"), jim(diff2_adj, "diff1_adj")) # savefig()