Hi Siamak,
If you want the dataset values, the viewer may not be the most
convenient way to go, unless you are hunting for particular slices.
Alternatively, you could use "3dZcutup -keep 7 7" to get slice 7
for example. Though that assumes that the z-axis of the dataset
is the slice axis that you want. If not, consider using 3dZeropad.
If datasets are written with a '-prefix' ending in .hdr, they will
be in NIfTI format, where the .img file is the raw slice data. No
afni viewer is involved.
How does that seem?
- rick