Multidimensional array (76x93x76), displaying as [x y z]

1 vue (au cours des 30 derniers jours)
Robert Te
Robert Te le 3 Mar 2015
Commenté : Stephen23 le 8 Mar 2015
Hi all, I'm a beginner in matlab and i'd like some help with this problem. I have a 3D data file(.nii), loads into a messy looking array with many columns and rows, and >> [m n o] = size(Array) gives a 76x93x76 data array.
How can I display this as a [DimensionX DimensionY DimensionZ] array? I need it for simple matrice calculations. Also, how do i turn it back into that [76x93x76] again for saving?
Thanks!
--Robertte
  5 commentaires
Robert Te
Robert Te le 7 Mar 2015
Yes you got it! Apologies for the awkward phrasing. I have the 3D array stored in a 76x93x76 array, and i need to find a way to extract each dimension(x,y,z) and make it into an [x y z] array.
The "x,y,z co-ordinates" make up the 3D array i am talking about. Hope this clarifies!
Stephen23
Stephen23 le 8 Mar 2015
The problem is you have not described how the X, Y and Z dimensions can be extracted from this array. If this is a a simple numeric data array (which you don't say), then the coordinates of the data locations are completely unknown. Lets have a look at a simple 2D example:
data = [1,2,3;4,5,6]; % 2x3
If we only have this data matrix, then _we know nothing about its X and Y coordinates of these data points, ie where the data was sampled. It is possible to define them separately:
X = [-40,20,80]; % 3
Y = [0.3,0.6]; % 2
You can see that the data matrix itself does not imply anything about the values of these coordinates. Until you actually tell us how to "extract" the coordinates from your 3D array there is not much more that we can do for you.

Connectez-vous pour commenter.

Réponses (1)

Jan
Jan le 7 Mar 2015
Did you ask your favorite internet search engine already? Perhaps others have solved the problem already, e.g. FEX: nifti-data-viewer or FEX: tools for nifti images.

Catégories

En savoir plus sur Feature Detection and Extraction dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by