fslr
and ANTsR
:
library(ms.lesion) library(neurobase) all_files = get_image_filenames_list_by_subject( group = "training", type = "coregistered") files = all_files$training02 t1 = readnii(files["T1"]) mask = readnii(files["Brain_Mask"])
hist(t1, mask = mask, breaks = 2000); text(x = 600, y = 40000, '"outliers"')
ortho2(rt1, t1 > 400, col.y = alpha("red", 0.5)) # xyz - cog of a region
rt1 = robust_window(t1) hist(rt1, mask = mask, breaks = 2000);