Hi Jon,
Sure, that would be most easily done with 3dcalc. Swapping
the values of 2 ROIs may take 3 steps of the form (tmp=a, a=b,
b=tmp), but replacing one value with another can be done very
easily.
In a script form, change any 17 to a 6:
set oldval = 17
set newval = 6
3dcalc -a OLD_DSET+orig -expr "a*bool(a-$oldval)+$newval*(1-bool(a-$oldval))" -prefix NEW_DSET
------------
Note that bool(a-$oldval) equals 1 anytime a is not 17, and so
1-bool() equals 1 anytime a is exactly 17. Then 'a' and '$newval'
are used to assign the resulting values, respectively.
- rick