- Check Image Files: Ensure that the image files you are trying to smooth are not corrupted. You can try opening them with another software to check if they are readable.
- Data Type: Verify the data type of the images. SPM expects certain datatypes for its operations. You might need to convert your images to a compatible datatype (e.g., `int16`, `float32`) before smoothing.
- File Permissions: Check the file permissions to make sure that SPM has the necessary read/write access to the image files.
- Headers and Paths: Check the headers of the NIFTI files to make sure they contain the correct information. Also, verify that the file paths are correct and do not contain any special or non-ASCII characters that might be causing issues.
can't smooth GM nifti images using spm12
9 次查看(过去 30 天)
显示 更早的评论
Hello everyone
i segmented my data using cat12 toolbox & tried to smooth them with spm12 but i get the following error :
25-Dec-2022 21:39:44 - Failed 'Smooth'
Error using spm_create_vol>create_vol
"unknown" is an unrecognised datatype (0).
In file "/home/aj/spm12/spm_create_vol.m" (v7455), function "create_vol" at line 66.
In file "/home/aj/spm12/spm_create_vol.m" (v7455), function "spm_create_vol" at line 17.
In file "/home/aj/spm12/spm_smooth.m" (v4419), function "smooth1" at line 105.
In file "/home/aj/spm12/spm_smooth.m" (v4419), function "spm_smooth" at line 37.
In file "/home/aj/spm12/config/spm_run_smooth.m" (v3915), function "spm_run_smooth" at line 20.
The following modules did not run:
Failed: Smooth
any help ??
0 个评论
回答(1 个)
Yash Sharma
2023-12-27
Hi Ali,
It appears that the smoothing operation in SPM12 has failed due to an issue with the datatype of the image you are trying to smooth. The error message indicates that the datatype "unknown" is unrecognised, which suggests that the image file might be corrupted or not in a format that SPM can recognize.
Here are some steps you could take to troubleshoot and resolve the issue:
Hope this Helps!
1 个评论
DGM
2023-12-27
编辑:DGM
2023-12-27
I'm not familiar with SPM, but it seems that in order for spm_type() to return 'unknown', the input would need to not be one of the following:
% if the input is char, it must be one of the following
prec = {'uint8','int16','int32','float32','float64','int8','uint16','uint32'};
% if the input is a numeric scalar, it must be one of the following
types = [ 2 4 8 16 64 256 512 768];
So that suggests that the input is possibly logical or a 64b integer type, though I have not checked to see whether the calling functions would have caught such a thing earlier.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!