I created a preprocessing script for my images using afni_proc.py. I noticed that the anatomical images became extremely bright (the brain is essentially white) after align_epi_anat. I was able to isolate 3dSkullStrip as the issue. The input image I provide appears normal, but after running just the skull stripping, the output is bright. I didn't see any parameters that explicitly change the intensity values or thresholding, but I still played around with the inputs and nothing resolved the image. I was able to work around the issue by saving the mask and using 3dcalc to multiply it by the original, but I'd appreciate help with trying to fix the underlying issue!
If open up the afni GUI, and overlay the skullstripped version on the underlay, and click around, are the voxel values the same (you can see the voxelwise values at the crosshair location in the lower right of the GUI)? Sometimes datasets appear bright or to have different values just because the percentile ranges differ. With -orig_vol, the original values should still be present.
OK, thanks for sharing the dataset. The issue is: It is a short-valued dataset, but there is a big scaling factor applied that blows up the values way above the float maximum (which is 32,767).
The problem is that the output from 3dSkullstrip is not scaled, but it is still short type, so its values get saturated at 32,767, which is why it appears uniformly bright.
So, a couple things that can be done:
you could make that dset a float, so the output of 3dSkullStrip will be a float, and keep all those values; to do so, run:
convert it to short, which you could do by dividing by the scale factor and making a short output:
3dcalc \
-a DSET_IN -expr 'a/162.468399' \
-prefix DSET_OUT \
-datum short -n
I think the latter would be preferable---no reason to create a float valued dset, where there isn't any actual information gained from it.
In either case, visually the output is virtually indistinguishable from the input.
--pt
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.