Storing multiple images in one 4D Array

3 visualizaciones (últimos 30 días)
Kevin
Kevin el 9 de Oct. de 2014
Comentada: Shivang Patel el 13 de Feb. de 2015
Hello Matlab Users,
I have multiple ultrasound images in a 3D plot. They are all at different angles and irregularly scattered. For computational reasons I constructed a simple surface and used the CData command to place the image inside the surface rather than computing the image pixel per pixel at the right position in 3D.
[I] = imread('picture.png'])
h=surf(xPicture,yPicture,zPicture); %Position of the ultrasound image in 3D
set(h,'CData',I,'FaceColor','texturemap');
set(h,'EdgeColor','none');
Now I want to store all the surfaces in a single 4D Array. But I don't get how I can access the gray scale values of each picture in cartesian coordinates and write them in an array without using countless for-loops.
Your help would be greatly appreciated.
Kevin

Respuesta aceptada

Bruno Pop-Stefanov
Bruno Pop-Stefanov el 10 de Oct. de 2014
I am not sure I understand what you would like to achieve exactly, but here are a few suggestions:
If you have p images, each of size n-by-m, why not simply store them in an (n x m x p) matrix?
What do you mean by 4-D array? What does each dimension correspond to? If you want to store, for each pixel, the 3-D position and the intensity at that position, you could have a simple N-by-4 matrix (2-D): the three first columns are for the x, y and z positions and the fourth column is the intensity value.
You won't be able to get the intensity at an xyz position from the 3-D plot directly. To link intensity values with xyz positions, you would have to find the transformation from pixel locations in the image space to the 3-D coordinates, as defined by xPicture, yPicture, and zPicture.
If you have some data we can play with, that would be easier to help you.
  2 comentarios
Kevin
Kevin el 15 de Oct. de 2014
Thank you Bruno Pop-Stefanov for your suggestions. I got the 4D array idea from the matlab MRI example, where the 4 dimension were for x,y,z and the intesity value.
Shivang Patel
Shivang Patel el 13 de Feb. de 2015
I have Question for you Mr. Bruno Pop-Stefanov...
Suppose, If i have 72 color(RGB) images with 3 dimension([row column depth]) , Then how to store in array? and how to access for feature use... I don't want to use cell...
Actually, whenever I was tried this thing, error msg was "dimension mismatch..."
Thanks in advanced...

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by