Multi-plane image inputs must be RGB images of size MxNx3.

45 visualizaciones (últimos 30 días)
Deepa S
Deepa S el 19 de Dic. de 2019
Comentada: Walter Roberson el 20 de Dic. de 2019
i have a total of 381 dicom imgaes which i have stacked. now i want to see the stacked images but when i use imshow function for it gives an error 'Multi-plane image inputs must be RGB images of size MxNx3'. my stacked image variable shows it value 512x512x381 uint16. how can i see those stacked images?

Respuestas (1)

Walter Roberson
Walter Roberson el 19 de Dic. de 2019
imshow is only for single grayscale images or single rgb images.
If you are using a fairly recent version see volumeViewer() and otherwise look in the File Exchange for vol3d v2.
Or use implay() if you don't need a volume view.
  3 comentarios
Rik
Rik el 20 de Dic. de 2019
While it is possible to do that, you really shouldn't. By doing that you will be throwing out a lot of image detail and you will treat different slices of your CT as the three color channels.
What would be your goal with turning three slices into a color image?
Walter Roberson
Walter Roberson el 20 de Dic. de 2019
RGB8 = im2uint8(IndividualGrayscaleImage(:,:,[1 1 1]));
However this will not help you view the images as a volume.
For some of the functions able to display volumes, it can help to
reshape(ImageStack, size(ImageStack,1), size(ImageStack,2), 1, size(ImageStack,3))
or equivalently,
permute(ImageStack, [1 2 4 3])
manking a 512 x 512 x 1 x 381 stack .
Some of the display routines need this 4D array in order to distinguish what could hypothetically be a single image with 381 information channels compared to a stack of 381 grayscale images.
However, imshow() is not one of the routines. imshow() can only handle grayscale and RGB.

Iniciar sesión para comentar.

Categorías

Más información sobre 3-D Volumetric Image Processing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by