pTFCE
pTFCE copied to clipboard
Warning message: In ptfce(Z, MASK) : NAs detected and replaced with zero! [1] "pTFCE_Z.nii.gz"
Hello,
I am trying to run ptfce on a skeletonized DTI z-stat image.
In the future, I will use residuals in my call. Currently, my script looks like this
library(oro.nifti)
library(pTFCE)
Z=readNIfTI("/gpfs52/data/h_vmac/hudson/dti/data/outZ.nii.gz")
MASK=readNIfTI("/gpfs52/data/h_vmac/sam/oef/main/pop/mean_FA_images/mean_FA_skeleton_mask.nii")
pTFCE=ptfce(Z, MASK)
writeNIfTI(pTFCE$Z, "pTFCE_Z")
The output is:
(base) [robbwh@badger scripts]$ Rscript doPTFCE.R
oro.nifti 0.11.0
* Estimating smoothness based on the data...
|======================================================================| 100%
* Performing pTFCE...
|======================================================================| 100%
Warning message:
In ptfce(Z, MASK) : NAs detected and replaced with zero!
[1] "pTFCE_Z.nii.gz"
Although my mask excludes all nan values in the z-stat image, I get this warning message.
Further, when looking at the output pTFCE_Z.nii.gz image, areas which should be masked out have a value of -8.2...

Is the masking not functioning as expected?
I have the same question. Besides the voxels outside the mask, I found -8.2 in some voxels inside the mask too. Apparently all these voxels are connected. So the mask is probably not working as expected.