help
help > RE: Error Running NPM (Incorrect Data Type)
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.
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.
Threaded View
Title | Author | Date |
---|---|---|
Blake N | Jun 20, 2017 | |
Chris Rorden | Jun 20, 2017 | |
Blake N | Jun 20, 2017 | |
Blake N | Jun 20, 2017 | |
Blake N | Jun 20, 2017 | |