Title: | Gradient and Vesselness Tools for Arrays and NIfTI Images |
---|---|
Description: | Simple functions for calculating the image gradient, image hessian, volume ratio filter, and Frangi vesselness filter of 3-dimensional volumes. |
Authors: | Jordan D. Dworkin [aut, cre] |
Maintainer: | Jordan D. Dworkin <[email protected]> |
License: | GPL-2 |
Version: | 0.2.1 |
Built: | 2025-03-11 05:31:03 UTC |
Source: | https://github.com/jdwor/vesselr |
This function returns a blobness map for a 3D array or NIfTI volume. This blobness measure is based on the volume ratio described by Pierpaoli and Basser (1996).
blobness3D(image, mask, radius = 5, color = "dark", parallel = FALSE, cores = 2)
blobness3D(image, mask, radius = 5, color = "dark", parallel = FALSE, cores = 2)
image |
a 3D array or image of class |
mask |
an array or |
radius |
an integer specifying radius of the neighborhood (in voxels) for which the blobness should be calculated. Note that this value essentially serves as the scale of the blob objects |
color |
a string specifying whether blobs will appear darker ("dark") or brighter ("bright") than their surroundings |
parallel |
is a logical value that indicates whether the user's computer is Linux or Unix (i.e. macOS), and should run the code in parallel |
cores |
if parallel = TRUE, cores is an integer value that indicates how many cores the function should be run on |
A 3D volume of the volume ratio blobness scores.
C. Pierpaoli, P.J. Basser (1996). Toward a Quantitative Assessment of Diffusion Anisotropy. Magnetic Resonance in Medicine. 36, pp. 893-906.
## Not run: library(neurobase) flair <- readnii('path/to/epi') mask <- flair!=0 brightspots <- blobness3D(image = flair, mask = mask, radius = 5, color = "bright", parallel = TRUE, cores = 4) ## End(Not run)
## Not run: library(neurobase) flair <- readnii('path/to/epi') mask <- flair!=0 brightspots <- blobness3D(image = flair, mask = mask, radius = 5, color = "bright", parallel = TRUE, cores = 4) ## End(Not run)
This function returns the gradient images for a 3D array or NIfTI volume.
gradient3D(image, mask = NULL, which = "all", radius = 1)
gradient3D(image, mask = NULL, which = "all", radius = 1)
image |
a 3D array or image of class |
mask |
an array or |
which |
a string specifying the gradient direction that should be returned; either "all" for a list of x, y, and z gradient volumes, or "x", "y", or "z" for a single volume with the given gradient |
radius |
an integer specifying radius of the neighborhood (in voxels) for which the gradient should be calculated |
Either a list of three gradient volumes or a single gradient volume, in either array or NIfTI format based on what was input.
## Not run: library(neurobase) epi <- readnii('path/to/epi') gradients <- gradient3D(image = epi, which = "all") ## End(Not run)
## Not run: library(neurobase) epi <- readnii('path/to/epi') gradients <- gradient3D(image = epi, which = "all") ## End(Not run)
This function returns the eigenvalues of the hessian matrices for a 3D array or NIfTI volume.
hessian3D(image, mask, radius = 1, parallel = FALSE, cores = 2)
hessian3D(image, mask, radius = 1, parallel = FALSE, cores = 2)
image |
a 3D array or image of class |
mask |
an array or |
radius |
an integer specifying radius of the neighborhood (in voxels) for which the hessian should be calculated |
parallel |
is a logical value that indicates whether the user's computer is Linux or Unix (i.e. macOS), and should run the code in parallel |
cores |
if parallel = TRUE, cores is an integer value that indicates how many cores the function should be run on |
A list of three eigenvalue volumes.
## Not run: library(neurobase) epi <- readnii('path/to/epi') mask <- epi!=0 hesseigs <- hessian3D(image = epi, mask = mask) ## End(Not run)
## Not run: library(neurobase) epi <- readnii('path/to/epi') mask <- epi!=0 hesseigs <- hessian3D(image = epi, mask = mask) ## End(Not run)
This function returns a vesselness map for a 3D array or NIfTI volume. This vesseless measure is based on the method described by Frangi (1998).
vesselness3D(image, mask, radius = 1, color = "dark", parallel = FALSE, cores = 2)
vesselness3D(image, mask, radius = 1, color = "dark", parallel = FALSE, cores = 2)
image |
a 3D array or image of class |
mask |
an array or |
radius |
an integer specifying radius of the neighborhood (in voxels) for which the vesselness should be calculated. Note that this value essentially serves as the scale of the vessel objects |
color |
a string specifying whether vessels will appear darker ("dark") or brighter ("bright") than their surroundings |
parallel |
is a logical value that indicates whether the user's computer is Linux or Unix (i.e. macOS), and should run the code in parallel |
cores |
if parallel = TRUE, cores is an integer value that indicates how many cores the function should be run on |
A 3D volume of the Frangi vesselness scores.
A.F. Frangi, W.J. Niessen, K.L. Vincken, M.A. Viergever (1998). Multiscale vessel enhancement filtering. In Medical Image Computing and Computer-Assisted Intervention - MICCAI'98, W.M. Wells, A. Colchester and S.L. Delp (Eds.), Lecture Notes in Computer Science, vol. 1496 - Springer Verlag, Berlin, Germany, pp. 130-137.
## Not run: library(neurobase) epi <- readnii('path/to/epi') mask <- epi!=0 veins <- vesselness3D(image = epi, mask = mask, radius = 1, color = "dark", parallel = TRUE, cores = 4) ## End(Not run)
## Not run: library(neurobase) epi <- readnii('path/to/epi') mask <- epi!=0 veins <- vesselness3D(image = epi, mask = mask, radius = 1, color = "dark", parallel = TRUE, cores = 4) ## End(Not run)