save_volume(fn::AbstractString,
+High level functions · Minc2.jl voxel_to_world(grid::GridTransform)
Extract voxel to world affine transform from a GridTransform
source voxel_to_world(grid::InverseGridTransform)
Extract voxel to world affine transform from a InverseGridTransform
grid
- InverseGridTransformsource voxel_to_world(hdr::MincHeader)::AffineTransform{Float64}
Give AffineTransform for world to voxel transformation based on header
source voxel_to_world(h::VolumeHandle,ijk::Vector{Float64})::Vector{Float64}
Convert contignuous 0-based voxel indexes (I,J,K) to world coordinates (X,Y,Z) 0-based
source voxel_to_world(vol::Volume3D)
Extract voxel to world affine transform from a Volume3D
source world_to_voxel(grid::GridTransform)
Extract world to voxel affine transform from a GridTransform
source world_to_voxel(grid::InverseGridTransform)
Extract world to voxel affine transform from a InverseGridTransform
grid
- InverseGridTransformsource world_to_voxel(h::VolumeHandle, xyz::Vector{Float64})::Vector{Float64}
Convert world coordinates (X,Y,Z) to contignuous voxel indexes (I,J,K) 0-based
source world_to_voxel(hdr::MincHeader)::AffineTransform{Float64}
Give AffineTransform for voxel to world transformation
source world_to_voxel(vol::Volume3D)
Extract world to voxel affine transform from a Volume3D
source array(grid::GridTransform)
Extract underlying plain array
source array(grid::InverseGridTransform)
Extract underlying plain array
grid
- InverseGridTransformsource array(vol::Volume3D)
Extract underlying plain array
source history(vol::Volume3D)
Extract history metadata
source read_volume(fn::String; store::Type{T}=Float64)::Volume3D{T}
Read Volume3D from minc file
fn
- filenamestore
- underlying array typesource read_nifti_volume(fn::AbstractString; store::Type{T}=Float64)::Volume3D{T}
Read Volume3D from .nii or .nii.gz file
source save_volume(fn::AbstractString,
vol::Volume3D{T,N};
store::Type{S}=Float32,
- history=nothing)
Save Volume3D to minc file
fn
- filenamevol
- Volume3D to savestore
- underlying MINC data type, to be used for storagesource save_nifti_volume(fn::AbstractString, vol::Volume3D{T};
- store::Type{S}=Float32, history=nothing)
Save Volume3D into .nii or .nii.gz file
source read_transforms(fname::String)::Vector{AnyTransform}
Read transformations from .xfm file fname
source read_itk_nifti_transform(fn::AbstractString;
- store::Type{T}=Float32)::Minc2.GridTransform{Float64,T}
Read ANTs style warp transform
source read_ants_transform(fn::AbstractString; store::Type{T}=Float32)::Minc2.AnyTransform
Read .txt and .nii(.nii.gz) transforms produces by ANTs
source save_transforms(fname::String,
+ history=nothing)
Save Volume3D to minc file
fn
- filenamevol
- Volume3D to savestore
- underlying MINC data type, to be used for storagesource save_nifti_volume(fn::AbstractString, vol::Volume3D{T};
+ store::Type{S}=Float32, history=nothing)
Save Volume3D into .nii or .nii.gz file
source read_transforms(fname::String)::Vector{AnyTransform}
Read transformations from .xfm file fname
source read_itk_nifti_transform(fn::AbstractString;
+ store::Type{T}=Float32)::Minc2.GridTransform{Float64,T}
Read ANTs style warp transform
source read_ants_transform(fn::AbstractString; store::Type{T}=Float32)::Minc2.AnyTransform
Read .txt and .nii(.nii.gz) transforms produces by ANTs
source save_transforms(fname::String,
xfm::Union{Vector{XFM}, XFM};
- grid_store::Type{T}=Float32 ) where {T, XFM<:AnyTransform}
Save transformations into .xfm file,
Arguments
fname
: output file namexfm
: vector of transformations to save, or a single transformationgrid_store
: type of storage for grid files (default: Float32)source save_itk_nifti_transform(fn::AbstractString,
- xfm::Minc2.GridTransform{Float64,T}; store::Type{S}=Float32)
Write ANTs style warp transform
source save_itk_txt_transform(fn::AbstractString,
- xfm::Minc2.AffineTransform{Float64})
Write affine transform in ITK .txt format
source Volume3D{T,N}
An abstract 3D volume, could be vector field or volume with time dimension
source empty_volume_like(
+ grid_store::Type{T}=Float32 ) where {T, XFM<:AnyTransform}
Save transformations into .xfm file,
Arguments
fname
: output file namexfm
: vector of transformations to save, or a single transformationgrid_store
: type of storage for grid files (default: Float32)source save_itk_nifti_transform(fn::AbstractString,
+ xfm::Minc2.GridTransform{Float64,T}; store::Type{S}=Float32)
Write ANTs style warp transform
source save_itk_txt_transform(fn::AbstractString,
+ xfm::Minc2.AffineTransform{Float64})
Write affine transform in ITK .txt format
source Volume3D{T,N}
An abstract 3D volume, could be vector field or volume with time dimension
source empty_volume_like(
fn::String;
- store::Type{T}=Float64, history=nothing)::Volume3D{T}
Create an empty Volume3D
fn
- filename of a minc file that is used for sampling informationstore
- underlying array typesource empty_volume_like(
+ store::Type{T}=Float64, history=nothing)::Volume3D{T}
Create an empty Volume3D
fn
- filename of a minc file that is used for sampling informationstore
- underlying array typesource empty_volume_like(
vol::Volume3D{T1,N};
store::Type{T}=Float64,
- history=nothing)
Create an empty Volume3D
vol
- Volume3D that is used for sampling informationstore
- underlying array typehistory
- minc historysource full_volume_like(
+ history=nothing)
Create an empty Volume3D
vol
- Volume3D that is used for sampling informationstore
- underlying array typehistory
- minc historysource full_volume_like(
fn::String,
fill::T=zero(T);
- store::Type{T}=Float64, history=nothing)::Volume3D{T}
Create an empty Volume3D
fn
- filename of a minc file that is used for sampling informationstore
- underlying array typesource full_volume_like(
+ store::Type{T}=Float64, history=nothing)::Volume3D{T}
Create an empty Volume3D
fn
- filename of a minc file that is used for sampling informationstore
- underlying array typesource full_volume_like(
vol::Volume3D{T1,N};
store::Type{T}=Float64,
- history=nothing)
Create an empty Volume3D
vol
- Volume3D that is used for sampling informationstore
- underlying array typehistory
- minc historysource resample_volume(
+ history=nothing)
Create an empty Volume3D
vol
- Volume3D that is used for sampling informationstore
- underlying array typehistory
- minc historysource resample_volume(
in_vol::Volume3D{T,3};
like::Union{Volume3D{O,3},Nothing}=nothing,
tfm::Union{Vector{XFM},XFM,Nothing}=nothing,
@@ -28,7 +28,7 @@
fill=0.0,
order=1,
ftol=1.0/80,
- max_iter=10)::Volume3D
Resample Volume3D using transformation
in_vol
- input Volume3Dlike
- Volume3D that is used for sampling informationitfm
- inverse of the transformation to apply (i.e from output to input)tfm
- transformation to apply (i.e from output to input) (instead of itfm
)interp
- interpolation methodfill
- fill valueftol
- tolerance, for inverse transformationsmax_iter
- maximum number of iterations, for inverse transformationsEquivalent to mincresample
minc command
source resample_volume!(in_vol::AbstractArray{T,3},
+ max_iter=10)::Volume3D
Resample Volume3D using transformation
in_vol
- input Volume3Dlike
- Volume3D that is used for sampling informationitfm
- inverse of the transformation to apply (i.e from output to input)tfm
- transformation to apply (i.e from output to input) (instead of itfm
)interp
- interpolation methodfill
- fill valueftol
- tolerance, for inverse transformationsmax_iter
- maximum number of iterations, for inverse transformationsEquivalent to mincresample
minc command
source resample_volume!(in_vol::AbstractArray{T,3},
out_vol::AbstractArray{T,3},
v2w::AffineTransform{C},
w2v::AffineTransform{C},
@@ -36,7 +36,7 @@
interp::I=BSpline(Quadratic(Line(OnCell()))),
fill=0.0,
ftol=1.0/80,
- max_iter=10)
Resample 3D array using transformation
in_vol
- input 3D arrayout_vol
- output 3D arrayv2w
- voxel to world affine transform in the output arrayw2v
- world to voxel affine transform in the input arrayitfm
- inverse of the transformation to apply (i.e from output to input)interp
- interpolation methodfill
- fill valueftol
- tolerance, for inverse transformationsmax_iter
- maximum number of iterations, for inverse transformationssource resample_volume!(
+ max_iter=10)
Resample 3D array using transformation
in_vol
- input 3D arrayout_vol
- output 3D arrayv2w
- voxel to world affine transform in the output arrayw2v
- world to voxel affine transform in the input arrayitfm
- inverse of the transformation to apply (i.e from output to input)interp
- interpolation methodfill
- fill valueftol
- tolerance, for inverse transformationsmax_iter
- maximum number of iterations, for inverse transformationssource resample_volume!(
in_vol::Volume3D{T,3},
out_vol::Volume3D{O,3};
tfm::Union{Vector{XFM},XFM,Nothing}=nothing,
@@ -45,34 +45,34 @@
fill=0.0,
order=nothing,
ftol=1.0/80,
- max_iter=10)::Volume3D{O,3}
Resample Volume3D using transformation
in_vol
- input Volume3Dout_vol
- output Volume3Ditfm
- inverse of the transformation to apply (i.e from output to input)tfm
- transformation to apply (i.e from output to input) (instead of itfm
)interp
- interpolation methodfill
- fill valueftol
- tolerance, for inverse transformationsmax_iter
- maximum number of iterations, for inverse transformationsEquivalent to mincresample
minc command
source resample_grid(
+ max_iter=10)::Volume3D{O,3}
Resample Volume3D using transformation
in_vol
- input Volume3Dout_vol
- output Volume3Ditfm
- inverse of the transformation to apply (i.e from output to input)tfm
- transformation to apply (i.e from output to input) (instead of itfm
)interp
- interpolation methodfill
- fill valueftol
- tolerance, for inverse transformationsmax_iter
- maximum number of iterations, for inverse transformationsEquivalent to mincresample
minc command
source resample_grid(
in_grid::Volume3D{T,4},
itfm::Union{Vector{XFM}, XFM};
- like::Union{Nothing,Volume3D{L,4}}=nothing)::Volume3D{T,4}
Resample Volume3D that contain 4D array, using transformation, assume 1st dimension is non spatial
in_grid
- input Volume3D with 4D array describing vector fielditfm
- inverse of the transformation to apply (i.e from output to input)like
- Volume3D that is used for sampling informationsource resample_grid!(
+ like::Union{Nothing,Volume3D{L,4}}=nothing)::Volume3D{T,4}
Resample Volume3D that contain 4D array, using transformation, assume 1st dimension is non spatial
in_grid
- input Volume3D with 4D array describing vector fielditfm
- inverse of the transformation to apply (i.e from output to input)like
- Volume3D that is used for sampling informationsource resample_grid!(
in_grid::Volume3D{T,4},
out_grid::Volume3D{T,4},
- itfm::Union{Vector{XFM}, XFM}=nothing)::Volume3D{T,4}
Resample Volume3D that contain 4D array, using transformation, assume 1st dimension is non spatial
in_grid
- input Volume3D with 4D array describing vector fieldout_grid
- output Volume3D with 4D array describing vector fielditfm
- inverse of the transformation to apply (i.e from output to input)source crop_volume(in_vol::Volume3D{T,N},crop;
- fill_val::T=zero(T))::Volume3D{T,N}
Crop (or pad) a volume
in_vol
- input Volume3Dcrop
- crop specification for each direction, e.g. [(10,10),(20,20),(5,10)]
, negative values mean paddingsource calculate_jacobian(
+ itfm::Union{Vector{XFM}, XFM}=nothing)::Volume3D{T,4}
Resample Volume3D that contain 4D array, using transformation, assume 1st dimension is non spatial
in_grid
- input Volume3D with 4D array describing vector fieldout_grid
- output Volume3D with 4D array describing vector fielditfm
- inverse of the transformation to apply (i.e from output to input)source crop_volume(in_vol::Volume3D{T,N},crop;
+ fill_val::T=zero(T))::Volume3D{T,N}
Crop (or pad) a volume
in_vol
- input Volume3Dcrop
- crop specification for each direction, e.g. [(10,10),(20,20),(5,10)]
, negative values mean paddingsource calculate_jacobian(
tfm::Union{Vector{XFM},XFM};
like::Volume3D{T,3};
interp::I=BSpline(Quadratic(Line(OnCell()))),
ftol=1.0/80,
- max_iter=10)::Volume3D{T,3}
Calculate dense jacobian determinant field for an arbitrary transformation
tfm
- transformation to useout_vol
- output Volume3Dinterp
- interpolation methodftol
- tolerance, for inverse transformationsmax_iter
- maximum number of iterations, for inverse transformationsRoughly equivalent to mincblob
minc command
source calculate_jacobian!(
+ max_iter=10)::Volume3D{T,3}
Calculate dense jacobian determinant field for an arbitrary transformation
tfm
- transformation to useout_vol
- output Volume3Dinterp
- interpolation methodftol
- tolerance, for inverse transformationsmax_iter
- maximum number of iterations, for inverse transformationsRoughly equivalent to mincblob
minc command
source calculate_jacobian!(
tfm::Union{Vector{XFM},XFM},
out_vol::AbstractArray{T,3},
out_v2w::AffineTransform{C};
interp::I=BSpline(Quadratic(Line(OnCell()))),
ftol=1.0/80,
- max_iter=10)
Calculate dense jacobian determinant field for an arbitrary transformation
tfm
- transformation to useout_vol
- output 3D arrayout_v2w
- voxel to world affine transform in the output arrayinterp
- interpolation methodftol
- tolerance, for inverse transformationsmax_iter
- maximum number of iterations, for inverse transformationsRoughly equivalent to mincblob
minc command
source calculate_jacobian!(
+ max_iter=10)
Calculate dense jacobian determinant field for an arbitrary transformation
tfm
- transformation to useout_vol
- output 3D arrayout_v2w
- voxel to world affine transform in the output arrayinterp
- interpolation methodftol
- tolerance, for inverse transformationsmax_iter
- maximum number of iterations, for inverse transformationsRoughly equivalent to mincblob
minc command
source calculate_jacobian!(
tfm::Union{Vector{XFM},XFM},
out_vol::Volume3D{T,3};
interp::I=BSpline(Quadratic(Line(OnCell()))),
ftol=1.0/80,
- max_iter=10)::Volume3D{T,3}
Calculate dense jacobian determinant field for an arbitrary transformation
tfm
- transformation to useout_vol
- output Volume3Dinterp
- interpolation methodftol
- tolerance, for inverse transformationsmax_iter
- maximum number of iterations, for inverse transformationsRoughly equivalent to mincblob
minc command
source Missing docstring for Minc2.GridTransform
. Check Documenter's build log for details.
Missing docstring for Minc2.InverseGridTransform
. Check Documenter's build log for details.
tfm_to_grid(
+ max_iter=10)::Volume3D{T,3}
Calculate dense jacobian determinant field for an arbitrary transformation
tfm
- transformation to useout_vol
- output Volume3Dinterp
- interpolation methodftol
- tolerance, for inverse transformationsmax_iter
- maximum number of iterations, for inverse transformationsRoughly equivalent to mincblob
minc command
source Missing docstring for Minc2.GridTransform
. Check Documenter's build log for details.
Missing docstring for Minc2.InverseGridTransform
. Check Documenter's build log for details.
tfm_to_grid(
tfm::Union{Vector{XFM}, XFM},
ref::G;
- store::Type{T}=Float64,ftol=1.0/80,max_iter=10)::Volume3D{T,4}
Convert arbitrary transformation into Volume3D with 4D array containing vector field
tfm
- transformation to usev2w
- voxel to world affine transform in the output arrayftol
- tolerance, for inverse transformationsmax_iter
- maximum number of iterations, for inverse transformationssource normalize_tfm(tfm::Union{Vector{XFM}, XFM},
+ store::Type{T}=Float64,ftol=1.0/80,max_iter=10)::Volume3D{T,4}
Convert arbitrary transformation into Volume3D with 4D array containing vector field
tfm
- transformation to usev2w
- voxel to world affine transform in the output arrayftol
- tolerance, for inverse transformationsmax_iter
- maximum number of iterations, for inverse transformationssource normalize_tfm(tfm::Union{Vector{XFM}, XFM},
ref::G;
- store::Type{T}=Float64,ftol=1.0/80,max_iter=10)::GridTransform{Float64,T}
Convert arbitrary transformation into a single GridTransform
tfm
- transformation to useref
- GridTransform that is used for sampling informationstore
- underlying array typeftol
- tolerance, for inverse transformationsmax_iter
- maximum number of iterations, for inverse transformationssource normalize_tfm(tfm::Union{Vector{XFM}, XFM},
+ store::Type{T}=Float64,ftol=1.0/80,max_iter=10)::GridTransform{Float64,T}
Convert arbitrary transformation into a single GridTransform
tfm
- transformation to useref
- GridTransform that is used for sampling informationstore
- underlying array typeftol
- tolerance, for inverse transformationsmax_iter
- maximum number of iterations, for inverse transformationssource normalize_tfm(tfm::Union{Vector{XFM}, XFM},
ref::G;
- store::Type{T}=Float64,ftol=1.0/80,max_iter=10)::GridTransform{Float64,T}
Convert arbitrary transformation into a single GridTransform
tfm
- transformation to useref
- Volume3D that is used for sampling informationstore
- underlying array typeftol
- tolerance, for inverse transformationsmax_iter
- maximum number of iterations, for inverse transformationssource
Theme
Automatic (OS) documenter-light documenter-dark catppuccin-latte catppuccin-frappe catppuccin-macchiato catppuccin-mocha
This document was generated with Documenter.jl version 1.7.0 on Wednesday 11 September 2024 . Using Julia version 1.6.7.
+ store::Type{T}=Float64,ftol=1.0/80,max_iter=10)::GridTransform{Float64,T}
Convert arbitrary transformation into a single GridTransform
tfm
- transformation to useref
- Volume3D that is used for sampling informationstore
- underlying array typeftol
- tolerance, for inverse transformationsmax_iter
- maximum number of iterations, for inverse transformations