help > Error Running NPM (Incorrect Data Type)
Showing 1-5 of 5 posts
Display:
Results per page:
Jun 20, 2017  07:06 PM | Blake N
Error Running NPM (Incorrect Data Type)
Hello,

I am trying to run VLSM on my data set, but I am running into an error when I start the analyses. I have followed the tutorial and created my .val file and have it in the same directory/folder as my scans (which are in .nii format). 

My problem is that, when I start the analysis, I receive the error "Unsupported COMPRESSED data type 64' and then if I hit OK the next menu says "File not open. Press OK to ignore and risk data corruption. Press cancel to kill the program."

I have tried pressing OK, but nothing happens and the program freezes. My .nii files are FLOAT64 data types and so I figure that this is the problem. With that said, I cannot seem to the right format for the data to be in so that my data set will be accepted.

If anyone has run into this error before could you please direct me towards the proper steps to fix it?

Thank you,
Blake
Jun 20, 2017  07:06 PM | Chris Rorden
RE: Error Running NPM (Incorrect Data Type)
Lesion maps should be binary (a voxel is either lesioned [=1] or not [=0]). Therefore, instead of FLOAT64 data you will want to have your data in the INT8 format. These are created whenever you draw a lesion with MRIcroGL or MRIcron. There are many tools for changing the data type. My Matlab script will do this for you (select "2" as the output data type)
  https://github.com/rordenlab/spmScripts/blob/master/nii_change_datatype.m
I have not tried it, but depending on your input images, you could also try fslmaths... if you "add 0.0" then the result is the same as the input, but you use the "-dt char" option to change the datatype.
  fslmaths -dt char t1.nii -add 0.0 xt1.nii
If your data is not binary, you will want to use a different tool. In general, I would recommend NiiStat over NPM, though we still need to do a better job creating documentation.
Jun 20, 2017  07:06 PM | Blake N
RE: Error Running NPM (Incorrect Data Type)
Dr. Rorden,

Thank you for responding so quickly to my question. I had created my lesion maps using the SPM LST toolbox (LPA algorithm) and then manually edited them through FSLView instead of MRICron and so that is why they were not automatically converted to INT8. I have previously used fslmaths to convert my maps to binary based on a threshold I had set using this code *fslmaths lpa_mni_binary.nii -thr 0.1 -bin lpa_mni_binary.nii*. It seems that this just changed my values though and not the data type. 

I also appreciate you providing two paths forward for me to try. I will look into both your Matlab script and the fslmaths step you provided. If they do not work for me I may post again with the error or with a method that I was able to find success with. Also, if they do work I will also post here so anyone else who runs into the same problem will be able to find it.

Thank you,
Blake
Jun 20, 2017  08:06 PM | Blake N
RE: Error Running NPM (Incorrect Data Type)
Dr. Rorden, 

The Matlab script worked like a charm. Thank you very much for providing it for me. For anyone else who is interested, I tried the fslmaths method that was suggested and it worked as well.

Thank you,
Blake
Jun 20, 2017  08:06 PM | Blake N
RE: Error Running NPM (Incorrect Data Type)
Dr. Rorden,

I apologize for asking anther question, but it seems another error has popped up. The following errors appear after running the script 

Error: unable to load explicit mask named Y:\infinite\VLSM\1\INT8\lpa_mni.val
Voxels also non-zero in mask Y:\infinite\VLSM\1\INT8\lpa_mni.val = 0
Error: no remaing voxels also non-zero in mask Y:\infinite\VLSM\1\INT8\lpa_mni.val
Unable to complete analysis.

Additionally, this menu pops up when each variable has been analyzed

"Warning: the header file is not in NIFTI format [the first 4 bytes do not have the value 348]. Assuming big-endian data."

When I fslhd all of my scans, the sizeof_hdr is always 348 so I am a little confused why this error would be occuring. Is this something that you have seen before?

Thank you,
Blake