A command like
3dcalc -a dataset+orig -prefix fixed_dataset -expr 'a*or(1-equals(l,20),1-equals(k,11))'
will zero out voxels in sub-brick #20 and slice #11, for example. Here, 'l' (the lower case L) is the sub-brick index of a given voxel and 'k' is the slice-index.
The logical function 'or()' is equal to 1 if any of its arguments are nonzero, and is equal to 0 if all of its arguments are 0. In the example above:
-- 'equals(l,20)' is 1 for sub-brick #20 only
-- so '1-equals(l,20)' is 1 for all sub-bricks
except #20
-- similarly, '1-equals(k,11)' is 1 for all slices except slice #11
Thus, the 'or()' expression is 0 only for voxels that are both from sub-brick #20 and from slice #11. Hope that is clear.
You can see voxel indexes instead of spatial coordinates in the AFNI controller window upper-left corner by selecting the Datamode->Misc->Voxel Coords menu item. This feature may help you ensure that you are selecting the correct indexes on which to operate.
bob cox