Hi Andrea,
In 3dcalc, the output datum is set by the first input, which
might be your mask. It's a subtle point to be aware of, if
that is what is causing you trouble. The mask is probably
unsigned bytes (small, non-negative integers), so that is what
the result would be.
Try running 3dcalc with the 3dmerge result as dataset '-a'
and the mask as dataset '-b'.
Or you could add the -datum option explicitly.
Please let me know whether that resolves the problem.
- rick