I resampled a mask from T1 (1x1x1mm) space to functional (2.3x2.3x3.99) space using 3dresample (nearest neighbour interpolation). This cut off the mask in some areas and also made it smaller than the original mask. Using cubic interpolation, the mask looks better. Why does this happen with 3dresample?
After creating the cubic interpolated mask, I used 3dcalc to binarize the mask using the boolean function but in some cases 3dcalc is setting voxel values to 0 even if the voxel has a value above 0 in the input image. Why does this happen with 3dcalc?
And note that when resampling a mask onto a different grid (e.g. with 3dresample), one main aspect that might drive whether the mask gets larger or smaller is... luck. An ROI volume (nvoxels * voxel size) might go up or down, depending on how the new grid lands on top of the old grid, whether some of the new edge voxel centers just happen to land closer to original mask voxel centers, or closer to non-mask ones. Using cubic interpolation and truncating above zero will almost certainly make the new mask volume larger. What is better depends on your perspective.
3dfractionize is also an option for this operation.
I tried 3dfractionize and it worked well; however, the same issue is happening when I apply 3dcalc to the mask to binarize it (3dcalc is setting voxel values to 0 even if the voxel has a value above 0 in the input image).
My afni version is 22.1.12.
Thanks again.
The
National Institute of Mental Health (NIMH) is part of the National Institutes of
Health (NIH), a component of the U.S. Department of Health and Human
Services.