Effacer les filtres
Effacer les filtres

Using the niftiinfo and niftiread functions, are people getting incorrect values for CT images?

13 vues (au cours des 30 derniers jours)
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?

Réponses (1)

Supraja
Supraja le 26 Juil 2023
Modifié(e) : Supraja le 26 Juil 2023
The user is getting wrong output while using “niftiinfo” and “niftiread” function.
  • 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.
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.

Produits


Version

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by