UFF - Ultrasound File Format

Points

USTB.UFF.PointType
Point(r, θ, ϕ)

Point contains the position of a point in a tridimensional space. It express that location in spherical coordinates which allows to place points at infinity but in a given direction.

The Julia implementation of the UFF Point type is a derivation of the CoordinateTransformations.jl Spherical type. The UFF Point defines the azimuth θ as the angle from the point location to the YZ plane. The elevation ϕ is the angle from the point location to the XZ plane.

source
USTB.UFF.PointFromCartesianType
(::PointFromCartesian)(x::AbstractVector)

Transformation functor to map 3D Cartesian coordinates into UFFs Point type. The conversion for $[x, y, z]$ is given by

\[\begin{aligned} r &= \sqrt{x^2+y^2+z^2} \\ \theta &= \text{atan}(x, z) \\ \phi &= \text{asin}(y, r) \end{aligned}\]

source
USTB.UFF.CartesianFromPointType
(::CartesianFromPoint)(x::Point)

Transformation functor to map UFF Point into Cartesian coordinates. The conversion for $[r, \theta, \phi]$ is given by

\[\begin{aligned} x &= r\cdot\sin(\theta)\cdot\cos(\phi) \\ y &= r\cdot\sin(\phi) \\ z &= r\cdot\cos(\theta)\cdot\cos(\phi) \end{aligned}\]

source

Probe

USTB.UFF.ProbeType
Probe

Probe contains the position and attitude of all elements of a probe. Optionally PROBE can hold each element width and height, assuming the elements were rectangular. Information is stored in a single matrix form called geometry, one row per element containing: [x y z azimuth elevation width height]

source

Interfaces

Probe implements the Instance Properties interface from Base allowing to access specific properties of Probe easily, through the . operator.

Base.getpropertyMethod
Base.getproperty(p::Probe, s::Symbol)

Allow indexing by property, similar to MATLABs dependent get methods, getproperty is extended to allow getting the geometries columns by symbols for lookups. Available symbols and [aliases] for lookup are given by

:x                    = p.geometry[:, 1]  # center of the element in the x axis[m]
:y                    = p.geometry[:, 2]  # center of the element in the y axis[m]
:z                    = p.geometry[:, 3]  # center of the element in the z axis[m]
:θ [:az, :azimuth]    = p.geometry[:, 4]  # orientation of the element in the azimuth direction [rad]
:ϕ [:alt, :elevation] = p.geometry[:, 5]  # orientation of the element in the elevation direction [rad]
:w [:width]           = p.geometry[:, 6]  # element width [m]
:h [:height]          = p.geometry[:, 7]  # element height [m]
:r [:distance]        = norm(p.geometry[:,1:3], dims=2) # Distance from elements to origin [m] 
source

Property Interface Example


julia> a = Probe(Point([2,0,4]), rand(3,7));
julia> a[:,1:3] = [1 2 3; 4 5 6; 7 8 9];
julia> a.x3-element Vector{Float64}: 1.0 4.0 7.0
julia> a.y = [10, 11, 12];
julia> a.geometry3×7 Matrix{Float64}: 1.0 10.0 3.0 0.407818 0.359121 0.489465 0.182945 4.0 11.0 6.0 0.141045 0.741779 0.290317 0.0460081 7.0 12.0 9.0 0.361392 0.759326 0.371401 0.692036

Method delegations

Probe also forwards Base.size and Base.getindex to Probe.geometry, meaning size(p::Probe) and getindex(p::Probe,...) work as they do for matrices, but operate on Probe.geometry.

Linear Array

Curvilinear Array

USTB.UFF.CurvilinearArrayType
mutable struct CurvilinearArray <: USTB.UFF.AbstractProbeArray

Composite type to define a curvilinear array probe geometry CurvilinearArray defines an array of regularly space elements on an arc in the azimuth dimensions. Optionally it can hold each element width and height, assuming the elements are rectangular.

Fields

  • probe::USTB.UFF.Probe: Wrapped probe

  • N::Integer: Number of elements in array

  • pitch::Float64: Distance between the elements in the azimuth direction [m]

  • radius::Float64: Radius of the curvilinear array [m]

  • element_width::Float64: Width of the elements in the azimuth direction [m]

  • element_height::Float64: Height of the elements in the elecation direction [m]

Example

prb = CurvilinearArray()
prb.N = 128;
prb.pitch = 500e-6;
prb.radius = 70e-3;

TODO: Link up Probe

source

Wavefronts

USTB.UFF.WavefrontModule
Wavefront

Enumeration for wave types. Exported through USTB.UFF submodule. Available options are

Wavefront TypeValue
Plane0
Spherical1
Photoacustic1

See also WAVE

TODO: Cross link WAVE

source

Windows

USTB.UFF.WindowModule
Window

Enumeration for window types. Available options and corresponding values are

Window TypeValue
None0
Boxcar1
Flat1
Rectangular1
Hanning2
Hamming3
Tukey254
Tukey505
Tukey756
Tukey807
Sta7
Scanline8

See also PULSE, BEAM, PHANTOM, PROBE

TODO: Link up PULSE

TODO: Link up BEAM

TODO: Link up PHANTOM

TODO: Link up PROBE

source