I am using the InverseRadon
function. According to the documentation the function uses a Hann filter and no cutoff ("CutoffFrequency"->1
) by default. However, if this is given as an option the result is different from the default.
Is their a way to determine which parameters (Filter and cutoff) are used by default?
I have tested the filters listed in the documentation. The result is closest to the cosine-ramp filter, but not identical.
i = Import["http://i.imgur.com/zxKkFP9.png"];(* Sinogram from InverseRadon Documentation *)
filter = {{Automatic, "Default"}, {#1&, "ramp filter with constant slope"},{#1 Cos[#1 \[Pi]]&, "ramp filter multiplied by cosine function"}, {(1+Cos[#1 \[Pi]])/2&, "Hann filter (default)"}, {0.54` +0.46` Cos[#1 \[Pi]]&, "Hamming filter"}, {Sqrt[1/(1+#^(2n))]&, Row@{"Butterworth filter of order ",n}}, {1&, "no filtering"}};
TableForm@Transpose[{Last@#,ImageAdjust@InverseRadon[i,{300,300},Method->{First@#, "CutoffFrequency"->1}]}&/@(filter/.n->2)]
Edit: I have tested @JM's suggestion to use the scaled cosine-ramp filter.
ImageDifference@@(ImageAdjust@InverseRadon[i, {300, 300}, Method -> #] & /@ {Automatic, (# (1 + Cos[\[Pi] #])/2 &)})
This results a black image image. The two options are almost equal, but not identical. The maximum difference (Max@ImageData
) is 0.00249.
This is difference image after an ImageAdjust
:
ImageAdjust[InverseRadon[i, {300, 300}, Method -> (# (1 + Cos[π #])/2 &)]]
. UseImageDifference[]
to compare with the result ofImageAdjust[InverseRadon[i, {300, 300}]]
. $\endgroup$ – J. M.'s ennui♦ Mar 23 '17 at 13:59