Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
robbwh opened this issue Mar 14, 2022 · 1 comment

Comments

@robbwh
Copy link

robbwh commented Mar 14, 2022

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?

@guochun-yang
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants