Reference to non-existent field 'PixelSpacing'.

9 visualizaciones (últimos 30 días)
Stelios Fanourakis
Stelios Fanourakis el 7 de Mayo de 2018
Comentada: Stelios Fanourakis el 8 de Mayo de 2018
I have a dicom viewer that cannot load ultrasound images because of that error (see subject line). What to do?
I get the error for that line of the dicom viewer
scale=[info.PixelSpacing(1) info.PixelSpacing(2) info.SliceThickness];

Respuestas (1)

Walter Roberson
Walter Roberson el 7 de Mayo de 2018
You use dicominfo() to read the metadata. You use dicomread() on the metadata to read the content of the image. You set the PixelSpacing field in the metadata. You dicomwrite() of the content of the image and the metadata into a new file.
Or... you fix the viewer, or get a new viewer.
See https://www.mathworks.com/matlabcentral/answers/215612-how-can-i-convert-pixels-to-mm-for-a-specific-dicom-image#answer_178301 for more information about correctly computing position information for DICOM files.
  11 comentarios
Walter Roberson
Walter Roberson el 7 de Mayo de 2018
When you do dicominfo on the original file does the modality show up as OT ("other") or as US ("ultrasound")?
Stelios Fanourakis
Stelios Fanourakis el 8 de Mayo de 2018
OT comes always

Iniciar sesión para comentar.

Categorías

Más información sobre Biomedical Imaging en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by