Functions for gemetric transformations
Base.length
— MethodBase.length(tr::AnyTransform)
Length of concatenated transform
Base.show
— MethodBase.show(io::IO, z::GridTransform{T,F,I})
Print summary information about grid transform
Base.show
— MethodBase.show(io::IO, z::InverseGridTransform{T,F,I})
Print summary information about inverse grid transform
Minc2.array
— Methodarray(grid::GridTransform)
Extract underlying plain array
grid
- GridTransform
Minc2.array
— Methodarray(grid::InverseGridTransform)
Extract underlying plain array
grid
- InverseGridTransform
Minc2.decompose
— Methoddecompose(rot, shift)
Decompose affine transform specified as rotation matrix ans shift vector into three components start, step, direction cosines
rot
- rotation matrix (3x3)shift
- shift vector (3)
Minc2.decompose
— Methoddecompose(tfm::Matrix{T})
Decompose affine transform into three components start, step, direction cosines
Minc2.decompose
— Methoddecompose(tfm::AffineTransform{T})
Decompose affine transform into three components start, step, direction cosines
tfm
- affine transform
Minc2.interpolate_field
— Methodinterpolate_field(
v2w::AffineTransform{T},
itp_vector_field::I,
p::SVector{3,T} )::SVector{3,T}
Internal support function
v2w
- voxel to world affine transformitp_vector_field
- vector fieldp
- point to transform
Minc2.inv
— Methodinv(::IdentityTransform)::IdentityTransform
Invert IdentityTransform transform, does nothing
Minc2.inv
— Methodinv(t::AffineTransform{T})::AffineTransform{T}
Invert AffineTransform transform
t
- AffineTransform
Minc2.inv
— Methodinv(t::GridTransform{T,F,VF})::InverseGridTransform{T,F,VF}
Invert GridTransform transform
t
- GridTransform
Minc2.inv
— Methodinv(t::InverseGridTransform{T,F,VF})::GridTransform{T,F,VF}
Invert InverseGridTransform transform
t
- InverseGridTransform
Minc2.inv
— Methodinv(t::Vector{T})::Vector{AnyTransform}
Invert concatenated transform
t
- concatenated transform
Minc2.transform_point
— Methodtransform_point(
tfm::GridTransform{T,F}, p::SVector{3,T};
_whatever...)::SVector{3,T} where {T,F}
Apply forward grid transform to a point
tfm
- grid transformp
- point to transform
Minc2.transform_point
— Methodtransform_point(
tfm::AffineTransform{T},
p::CartesianIndex{3};
_whatever...)::SVector{3,T}
Apply inverse grid transform reimplements algorithm from MNIformats/gridtransforms.c:gridinversetransform_point
tfm
- affine transformp
- point to transform
Minc2.transform_point
— Methodtransform_point(
tfm::AffineTransform{T},
p::CartesianIndex{3};
_whatever...)::SVector{3,T}
Apply affine transform to CartesianIndices
tfm
- affine transformp
- point to transform
Minc2.transform_point
— Methodtransform_point(
tfm::AffineTransform{T},
p::SVector{3,T};
_whatever...)::SVector{3,T}
Apply affine transform to a point
tfm
- affine transformp
- point to transform
Minc2.transform_point
— Methodtransform_point(tfm::IdentityTransform,
p::SVector{3,T};
_whatever...)
tfm
- IdentityTransformp
- point to transform
Apply identity transform to a point (returns same point)
Minc2.transform_point
— Methodtransform_point(
tfm::Vector{XFM},
p::SVector{3,T};
max_iter::Int=10,
ftol::Float64=1.0/80)::SVector{3,T}
Apply concatenated transform to a point
tfm
- concatenated transformp
- point to transformmax_iter
- maximum number of iterations for inverse transformftol
- tolerance for inverse transform
Minc2.voxel_to_world
— Methodvoxel_to_world(grid::GridTransform)
Extract voxel to world affine transform from a GridTransform
grid
- GridTransform
Minc2.voxel_to_world
— Methodvoxel_to_world(grid::InverseGridTransform)
Extract voxel to world affine transform from a InverseGridTransform
grid
- InverseGridTransform
Minc2.world_to_voxel
— Methodworld_to_voxel(grid::GridTransform)
Extract world to voxel affine transform from a GridTransform
grid
- GridTransform
Minc2.world_to_voxel
— Methodworld_to_voxel(grid::InverseGridTransform)
Extract world to voxel affine transform from a InverseGridTransform
grid
- InverseGridTransform
Minc2.AffineTransform
— TypeAffineTransform{T}
Affine transform, described by rotation matrix and shift vector
Minc2.AffineTransform
— MethodAffineTransform(rot, shift) Create affine transform from rotation and shift
rot
- rotation matrix-like (3x3)shift
- shift vector-like (3)
Minc2.AffineTransform
— MethodAffineTransform(mat) Create affine transform from a matrix-like object
mat
- matrix (4x4 or 3x4)
Minc2.AnyTransform
— TypeAnyTransform()
Any 3D Geometrical transform, abstract type
Minc2.GeoTransforms
— TypeGeoTransforms=Vector{AnyTransform}
Concatenated transforms
Minc2.GridTransform
— TypeGridTransform{T,F,I}
Dense vector field transform (grid transform)
Minc2.GridTransform
— MethodGridTransform(
voxel_to_world::AffineTransform{T},
vector_field::Array{F, 4})
Construct GridTransform from voxel to world transform and a vector field
voxel_to_world
- voxel to world affine transformvector_field
- vector field
Minc2.GridTransform
— MethodGridTransform(::Type{T}=Float64,::Type{F}=Float64)
Construct empty GridTransform, which should generate identity transform
Minc2.IdentityTransform
— TypeIdentityTransform()
Identity transform, does nothing
Minc2.InverseGridTransform
— TypeInverseGridTransform{T,F,VF}
Dense vector field transform (GridTransform) used in inverse
Minc2.InverseGridTransform
— MethodInverseGridTransform(
voxel_to_world::AffineTransform{T},
vector_field::Array{F, 4})
Construct InverseGridTransform
from voxel to world transform and a vector field
voxel_to_world
- voxel to world affine transformvector_field
- vector field
Minc2.InverseGridTransform
— MethodInverseGridTransform(::Type{T}=Float64,::Type{F}=Float64)
Construct InverseGridTransform
empty transform