Do you mean "slices" instead of "layers"? Or do you mean "sub-bricks"? Seeing as you are at MCW, one of the hottest AFNI places around, I suggest you ask someone there who is more familiar with the program.
To extract a subset of slices -- program 3dZeropad -- see the output of "3dZeropad -help".
To extract a subset of sub-bricks -- the "[...]" subscripting notation.
See the output of "afni -help".
bob cox