pTFCE icon indicating copy to clipboard operation
pTFCE copied to clipboard

Warning message: In ptfce(Z, MASK) : NAs detected and replaced with zero! [1] "pTFCE_Z.nii.gz"

Open robbwh opened this issue 2 years ago • 1 comments

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...

Screen Shot 2022-03-14 at 10 54 59 AM

Is the masking not functioning as expected?

robbwh avatar Mar 14 '22 15:03 robbwh

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.

guochun-yang avatar Aug 04 '22 17:08 guochun-yang