- If you do not specify a file extension, then “niftiread” looks for a file with the .nii extension.
- If “niftiread” cannot find a file with the .nii extension, then it looks for a gzipped version of the file, with extension .nii.gz.
- If “niftiread” cannot find a file with the .nii.gz extension, then it looks for a file with the .hdr, .hdr.gz, .img, or .img.gz file extension. So, make sure that you specify the right extension.
Using the niftiinfo and niftiread functions, are people getting incorrect values for CT images?
10 次查看(过去 30 天)
显示 更早的评论
We have been using Tools for NIfTI and ANALYZE image found in Matlab Central, to open NIfTI files. When we switched to trying out the Matlab built-in functions of
info=niftiinfo('filename');
img=niftiread(info);
we found that the values in the img variable where not correct. The values appear to be off by a factor of 2. I didn't find any documentation on this with a cursory search online. Does anybody else have this issue when looking at CT images where the values should be in Hounsfield Units?
0 个评论
回答(1 个)
Supraja
2023-7-26
编辑:Supraja
2023-7-26
The user is getting wrong output while using “niftiinfo” and “niftiread” function.
And also the NIfTI header file (.hdr) holds the metadata associated with a NIfTI volume. If you do not specify a corresponding imgfile, then “niftiread” looks in the same folder for a file with the same name and extension .img. So recheck the file location and the extension you are specifying.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!