Hi Rick,
I create the file using a series of system calls through matlab. Basically, I build up the dataset using this function:
function [] = udump_and_glue(master,oneDfile,label,fglue)
[~,~] = system(['3dUndump -datum float -prefix temp.nii -master ' master ' -orient RAI -xyz ' oneDfile]);
[~,~] = system(['3drefit -sublabel 0 ' label ' temp.nii']);
[~,~] = system(['3dbucket -aglueto ' fglue '+orig temp.nii']);
delete('temp*')
Then, when I am done I run 3dcopy to create a .nii file from the +orig. One final point of confusion; I have another file created in the same manner and it "behaves" appropriately when it comes to 3dExtrema. In the AFNI viewer and 3dinfo both have the proper # of sub-bricks, etc. I would be happy to upload both for the sake of troubleshooting.
Thanks,
Andy