Sampled Transfer Functions
TransferFunctions.SampledTransferFunction
— TypeSampledTransferFunction{N}
A Union
type of N
-dimensional sampled transfer functions.
Sampled PSFs
TransferFunctions.SampledPSF
— TypeSampledPSF{N,<:PointSpreadFunction}
A struct representing a point spread function which has a defined pixel resolution. This can be then used to work with images that also have a sampling, i.e. a pixel size.
Examples
julia> bw = BornWolf(444u"nm", 1.4, 1.2)
BornWolf{Float64}(444.0 nm, 1.4, 1.2)
julia> SampledPSF(bw, 64u"nm")
SampledPSF(BornWolf{Float64}(444.0 nm, 1.4, 1.2)) with Δxy=64 nm
julia> SampledPSF(bw, (64u"nm", 58u"nm")) # different pixel sizes in x and y
SampledPSF(BornWolf{Float64}(444.0 nm, 1.4, 1.2)) with Δxy=(64 nm, 58 nm)
julia> SampledPSF(bw, 58u"nm", (3, 7)) # offset center
SampledPSF(BornWolf{Float64}(444.0 nm, 1.4, 1.2)) with Δxy=58 nm, δ = (3, 7)
TransferFunctions.apply
— Methodapply(tf::SampledOTF, img::AbstractArray)
Apply the transfer function tf
to the image img
, i.e. simulate the transfer through the optical system.
Examples
julia> otf_model = IdealOTFwithCurvature(488u"nm", 1.4, 1.0, 0.9);
julia> sampled_otf = SampledOTF(otf_model, 61u"nm");
julia> img = testimage("moonsurface.tiff");
julia> blurred_img = apply(sampled_otf, img);
Sampled OTFs
TransferFunctions.SampledOTF
— TypeSampledOTF{N,<:OpticalTransferFunction{N}}
A struct representing an optical transfer function that has a defined pixel resolution. For working with images that also have a sampling, i.e. a pixel size
Examples
julia> otf_model = IdealOTFwithCurvature(488u"nm", 1.4, 1.0, 0.9)
IdealOTFwithCurvature{Float64}(488.0 nm, 1.4, 1.0, 0.9)
julia> sampled_otf = SampledOTF(otf_model, 63u"nm")
SampledOTF(IdealOTFwithCurvature{Float64}(488.0 nm, 1.4, 1.0, 0.9)) with Δxy=63 nm, δ = (1, 1)
julia> SampledOTF(otf_model, (45u"nm", 65u"nm")) # different pixel sized in x and y
SampledOTF(IdealOTFwithCurvature{Float64}(488.0 nm, 1.4, 1.0, 0.9)) with Δxy=(45 nm, 65 nm), δ = (1, 1)
julia> SampledOTF(otf_model, 63u"nm", (101.5, -90.3)) # offseted center
SampledOTF(IdealOTFwithCurvature{Float64}(488.0 nm, 1.4, 1.0, 0.9)) with Δxy=63 nm, δ = (101.5, -90.3)
TransferFunctions.apply
— Methodapply(tf::SapledPSF, img::AbstractArray)
Apply the transfer function tf
to the image img
, i.e. simulate the transfer through the optical system.
Examples
julia> psf_model = BornWolf(444u"nm", 1.4, 1.2);
julia> sampled_psf = SampledPSF(psf_model, 61u"nm");
julia> img = testimage("moonsurface.tiff");
julia> blurred_img = apply(sampled_psf, img);