Hi,
Thanks for the reply. I deleted the files and ran the code again. Now the result i get using BRIK.gz and HEAD are the same but i still get 256 and 257 as values. Here are the results of codes you told me to run (I am running it on OSC owens server):
afni -ver
Precompiled binary linux_openmp_64: Sep 2 2020 (Version AFNI_20.2.16 'Aulus Vitellius')
ls bin_rest_binarized*+orig.HEAD | wc -l
28
ls bin_rest_binarized*+orig.BRIK.gz | wc -l
28
This is my code (I ran it from R):
# name of file
binarize_name <- paste("bin_rest_binarized", sub_code, "_", les_code, sep = "")
# code for 3dcalc
system2("3dcalc", args = paste0("-a ", bin_name, " -expr 'notzero(a)' -prefix ", binarize_name))
#code for 3dmask_tool
system2("3dmask_tool", args = paste0("-input bin_rest_binarized*+orig.HEAD -prefix mask_inter \
-frac 1.0"))
system2("3dmask_tool", args = paste0("-input bin_rest_binarized*+orig.BRIK.gz -prefix mask_inter_brik \
-frac 1.0"))
The data is 91 * 109 * 91 and this is the values i see
0 1 256 257
654657 9402 9404 229166
Thanks
Prateek Sasan