Previously I can use the following command to generate a MIP image of the MR angiographic image:

3dLocalstat -nbhd ‘RECT(0,0,50)’ -stat max -mask tof_al_mask_0.5+tlrc -prefix test tof_al_0.5+tlrc

Recently I update the AFNI version and I couldn’t generate the MIP with the same command.

Any suggestions?


The RECT option requires at least the size of a voxel for each dimension. Zeros won’t give anything, and any value less than the size in any dimension result in only a single voxel. Increase the size in each dimension to get a projection image. We should probably allow for less than voxel sizes in a more sensible way.

I fixed the way 3dLocalstat works. For RECT neighborhoods, it will now allow dimensions of 0, but not all zeros. Dimensions less than a voxel will include voxels within the same row, column or across slices. The help now includes this additional information:

            ** Note the a,b,c are not the full dimensions of
                of the block. They are radially used - effectively
                half the dimension of a side. So if one wanted to
                compute a 5-slice projection on a 1mm3 volume,
                then a RECT(0,0,2) would be appropriate, and 
                the program would report 5 voxels used in the mask
                Any dimension less than a voxel will avoid
                voxels in that direction.

The changes include a bug fix that removed a double counting of the center in some cases and the undercounting of voxels exactly on an orthogonal axis with the center. The changes will be available in the next binary distribution.