Can you please provide the 3dresample and 3dcalc commands you used? That will help.
And note that when resampling a mask onto a different grid (e.g. with 3dresample), one main aspect that might drive whether the mask gets larger or smaller is... luck. An ROI volume (nvoxels * voxel size) might go up or down, depending on how the new grid lands on top of the old grid, whether some of the new edge voxel centers just happen to land closer to original mask voxel centers, or closer to non-mask ones. Using cubic interpolation and truncating above zero will almost certainly make the new mask volume larger. What is better depends on your perspective.
3dfractionize is also an option for this operation.
Here is my 3dresample command for a given participant using the cubic interpolation:
3dresample -master ../func/sub-1003_task-facerep_run-01_bold_space-MNI152NLin2009cAsym_brainmask.nii.gz -prefix 3dresample_sub-1003_rmode.nii.gz -rmode Cubic -input sub-1003_output_warped_refT1anat.nii.gz
Here is my 3dcalc command for a given participant:
3dcalc -a '3dresample_sub-1003_rmode.nii.gz' -expr 'bool(a)' -prefix 3dresample_mask_sub_1003_rmode_binarized_bool.nii.gz
I forgot to also mention that I preciously used 'step(a)' instead of 'bool(a)' in the 3dcalc command; however, I found that bool(a) worked better.
Thank you for your help.
I tried 3dfractionize and it worked well; however, the same issue is happening when I apply 3dcalc to the mask to binarize it (3dcalc is setting voxel values to 0 even if the voxel has a value above 0 in the input image).
My afni version is 22.1.12.