Groupmask ERROR: dataset NOT written to disk!

Hi,
For running -ClustSim option for 3dttest++, we created concatenated masks for three runs per subject. However, the following error is displayed as we run the below script to obtain a group-mask with 70% overlap-
3dmask_tool -input sub*/mask_*+orig.HEAD -prefix group_mask_olap.7 -frac 0.7

++ processing 1 input dataset(s), NN=2...
++ padding all datasets by 0 (for dilations)
++ frac 0.7 over 3 volumes gives min count 3
++ voxel limits: n clipped, N survived, (*) were zero
++ writing result group_mask_olap.7...
** ERROR: output dataset name 'group_mask_olap.7' conflicts with existing file
** ERROR: dataset NOT written to disk!

And the created group_mask_olap.7+orig can not be opened on 3dttest++
** FATAL ERROR: Cannot create mask from '-mask' option

Are we doing something wrong here?
Thank you for the help in advance!

Nt

Hi, Nt-

Most AFNI programs refuse to overwrite a previously existing dataset, without using an explicit -overwrite option. It looks like you have a previously existing dataset here; it also looks like that one is damaged or incorrectly written, if it can't be opened.

Could you try a different output prefix, and see if that will write (which it should), and then see if that one can be opened in the GUI (hopefully it can, too?)? For example

 3dmask_tool -input sub*/mask_*+orig.HEAD -prefix TEST2 -frac 0.7

... and does that open?

Also, is the actual output line this:

 ++ voxel limits: n clipped, N survived, (*) were zero

? There should be numbers instead of the "n", "N" and "(*)".

--pt

Hi Pt,
I could run the intersection group-mask with the command-
3dmask_tool -input sub-/mask.HEAD -prefix group_mask.inter -frac 1.0

And, yes. the voxel limits -clipped, survived and zero were numbers.

However, I'm still not able to import this mask to the 3dtttest++ program, with this error-
3dttest++ -mask group_mask.inter+orig -setA "path/to/directories" -covariates cov.txt -ClustSim
** ERROR: Failed to open mask 'group_mask.inter+orig'
** FATAL ERROR: Cannot create mask from '-mask' option

Can I get any insight on where I might be going wrong?
Also, can the intersection be used for thresholding or 70% overlap is the method that is recommended?

Thank you!

Nt

Hi, Nt-

Going for 100% overlap is fine, just note that it will make a stricter, tighter mask---it might leave out some locations you would want. It is a slightly empirical question, but 70% has seemed a good balance in the past.

Can you open group_mask.inter+orig in the GUI, or run 3dinfo on it? Is there a path missing, perhaps? That usage there looks fine.

--pt

Hi Nt,

There are a few things to ponder here, so it might be good to itemize, starting with Paul's suggestions:

  1. Indeed, do not change the mask_tool method just to use a different prefix. If you want a 70% overlap, do that, but use a slightly different prefix name.

  2. It seems very likely that you are writing a group mask dataset to the current directory, but that is not where the 3dttest++ command is looking for it. It might help to show part of the 3dttest++ command, including the mask and a couple of input datasets.

  3. To be sure, run "ls" and "3dinfo" on the resulting masks. They are probably in that same directory.

ls -l group_mask*
3dinfo group_mask*.HEAD | head
  1. It seems odd that your subject masks and such are in +orig view when doing a group analysis. All data should be in a common template space at that point, so that the voxels refer to the same anatomical locations. Again, seeing part of the 3dttest++ command might clarify this.
  • rick