Description Usage Arguments Value Examples
View source: R/predict_flexconn.R
Predict from FLEXCONN model
| 1 2 3 | 
| t1 | T1-weighted image to predict from: skullstripped, bias-corrected). Since the training is 2D, make sure the test image is properly oriented, i.e. the in-plane has the highest native resolution. E.g. the training images are axial because their native resolution is 1x1x4mm^3 in axial RAI orientation. | 
| flair | FLAIR image to predict from, must be registered to T1 and have same orientation as T1 | 
| t2 | (optional) T2 image to predict from, must be registered to T1 and have same orientation as T1 | 
| outdir | Output directory for predictions | 
| gpu | Either an integer for the GPU. Use "cpu" to use CPU. | 
| normalize | Should the images be normalized? | 
| num_atlases | Specifies which model to use. Determined by the number of atlases in the FLEXCONN model. | 
| outcomes | The outcome used to train the model, from rater 1 or rater 2 | 
| verbose | Print diagnostic messages | 
A vector of filenames
| 1 2 3 4 5 6 7 8 9 10 11 12 | # predict_flexconn(python_cmd = "python3)
library(reticulate)
## Not run: 
reticulate::use_python("/Library/Frameworks/Python.framework/Versions/3.5/bin/python3")
# reticulate::use_python("python3")
flair = system.file("extdata", "FLAIR.nii.gz", package = "flexconnr")
t1 = system.file("extdata", "T1.nii.gz", package = "flexconnr")
pp = predict_flexconn(t1 = t1, flair = flair)
# result = RNifti::readNifti(pp[2])
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.