Test images

MartaCT.CTTestImages.ImageParamsMethod
ImageParams([T=Float32]; <keyword arguments>) where {T}

Construct ImageParams object.

Arguments:

  • width=200: width of the rectangle gray scale image.
  • height=40: height of the rectangle gray scale image.
  • pad=30: padding around image.
  • dist=10: distance between images.
  • radius=20: radius of calibration circle.
  • gray_scale=1000..1000: interval of gray scale values.
  • calibration_value=nothing: value of the calibration circle. If not specified, is gray_scale[2].
  • background=nothing: value to be used as background.
  • hounsfield=false: whether the gray scale should be in Hounsfield units.
source
MartaCT.CTTestImages.circle_polar_imageMethod
circle_polar_image([T=Float32] nr, nϕ, radius; value=1) where {T}

Create a circle of radius radius inside a nr×nϕ image in polar coordinates .

Examples

julia> circle_polar_image(30, 30, 10)
30×30 Array{Float32,2}:
[...]
source
MartaCT.CTTestImages.combine_imagesMethod
combine_images(imp::ImageParams{T}, rect::AbstractMatrix{T}, circle::AbstractMatrix{T}) where {T}

Helper function to create a gray scale image.

Combine the rect image with the circle image for calibration. The circle image should be smaller than the gray scale image!

See also: gray_scale_image, circle_image

source
MartaCT.CTTestImages.gray_scale_imageMethod
gray_scale_image(
    [T=Float32];
    rows=40,
    cols=200,
    swidth=nothing,
    sheight=nothing,
    gray_scale=-1000..1000,
) where {T}

Create an image with a gray scale rectangle with given scale gray_scale.

Examples

julia> gray_scale_image(swidth=80, sheight=40, gray_scale=-1000..1000)
40×80 Array{Float32,2}:
[...]

See also: circle_image, combine_images

source
MartaCT.CTTestImages.pyramid_gray_scale_imageMethod
pyramid_gray_scale_image(imp::ImageParams)

Create an image with a pyramid gray scale rectangle with given scale gray_scale from parameters imp.

Create an image with a pyramid gray scale rectangle with given scale gray_scale from parameters imp.

source
MartaCT.CTTestImages.pyramid_gray_scale_imageMethod

pyramidgrayscaleimage([T=Float32]; swidth=200, sheight=40, grayscale=0..1, plateau = 0) where {T}

Create an image with a pyramid gray scale rectangle with given scale grayscale. The plateau parameter denotes the percentage of the rectangle width that has the maximum value of `grayscale`.

Examples

julia> pyramid_gray_scale_image(swidth=80, sheight=40, gray_scale=-1000..1000)
40×80 Array{Float32,2}:
[...]

See also: gray_scale_image, circle_image, combine_images

source
MartaCT.CTTestImages.square_imageMethod
square_image([T=Float32] r, c; l=nothing) where {T}

Create a l×l square inside a r×c image.

Examples

julia> square_image(30, 30; l=10)
30×30 Array{Float32,2}:
[...]
source