Description Usage Arguments Value Examples
View source: R/normalize_image.R
Normalize Image Based on the Peak
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | normalize_image(
vol,
contrast = c("T1", "PD", "T2", "FLAIR", "FL"),
peak_estimator = c("Python", "R"),
verbose = TRUE
)
image_peak(vol, contrast = c("T1", "PD", "T2", "FLAIR", "FL"), verbose = TRUE)
flexconn_image_peak(
vol,
contrast = c("T1", "PD", "T2", "FLAIR", "FL"),
verbose = TRUE
)
|
vol |
3D array or |
contrast |
What imaging sequence of MRI is this volume |
peak_estimator |
Which functions to use to estimate peak, either wrapper Python code or native R code. |
verbose |
print diagnostic messages |
The peak of the image is returned for image_peak
and the normalized image in normalize_image
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | user = Sys.getenv("USER")
if (user %in% c("johnmuschelli", "travis") &
Sys.info()["sysname"] == "Darwin"){
reticulate::use_python(paste0(
"/Library/Frameworks/Python.framework/Versions/3.5/bin/python3"))
} else {
python = system("which python", intern = TRUE)
print(python)
reticulate::use_python(python)
}
set.seed(1)
vol = array(rpois(10^3, lambda = 10), dim = rep(10, 3))
vol[ vol < 6] = 0
normed = normalize_image(vol, "T1")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.