Effacer les filtres
Effacer les filtres

4D dicom matrix? Why not 3D?

2 vues (au cours des 30 derniers jours)
Antonio
Antonio le 8 Fév 2013
I converted a mha file to dicom format (and got this file: https://www.dropbox.com/s/i0cr2910ie4k5zy/TumorSimOutput2_T1.dcm ) via a Linux utility program (this one: http://manpages.ubuntu.com/manpages/lucid/man1/gdcm2vtk.1.html ) and visualize it via imshow using threedimensional indexing:
imshow(image_data(:,:,index),'DisplayRange',[]);
when I examine the dimensions of image_data I get:
256 256 1 181
I don't understand the purpose of this dimension of 1 element and why isn't required to specify it via imshow. Is this the gray level intensity? How can I check that?

Réponse acceptée

Walter Roberson
Walter Roberson le 8 Fév 2013
Some MATLAB routines recognizes four-dimensional arrays as being arrays of images when the third dimension is 1 (grayscale) or 3 (RGB)
However, when you use
image_data(:,:,index)
on a 4 dimensional array, the result is defined to be the same as if you had specified
image_data(:,:,index,1)
As the final two dimensions are both 1, the result of this would be automatically collapsed in representation to two dimensions.
  1 commentaire
Antonio
Antonio le 8 Fév 2013
Thanks, this clarifies my doubt. I realized that converting this grayscale dimension to RGB may be useful for my image processing task.
How can I do this conversion on this 4D Matrix?

Connectez-vous pour commenter.

Plus de réponses (1)

ChristianW
ChristianW le 8 Fév 2013
Modifié(e) : ChristianW le 8 Fév 2013
"Is this the gray level intensity?" - Yes, color reserved dimensions.
It's mostly not about the gray scale. These values just reference to a color in the colormap.
[X, map] = dicomread('US-PAL-8-10x-echo.dcm');
montage(X, map, 'Size', [2 5]);

Catégories

En savoir plus sur DICOM Format dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by