Hi AFNI gurus,
I am running 3dclust on many files at 17 different thresholds. At some of the higher thresholds no clusters are found and no output file is written. I was wondering if I could somehow make an binary mask of all zeros via the command line in the case where no clusters are found.
Any help would be much appreciated, thank you!
It might be easier to use an “if” condition in your code to avoid looking for the given/missing file…
But is something like this (in tcsh syntax):
if ( ! -e EXPECTED_FILE_NAME ) then
3dcalc -a SOMEFILE_OF_CORRECT_DIMENSIONS -expr '0' -prefix EXPECTED_FILE_NAME
what you would want?
It requires that you 1) know the name of the output file in question ahead of time (which you likely do, from scripting it), and 2) know a file of correct dimensionality to use as a grid for your output (again, which I assume you would).