What exactly represents a voxel after loading an image into an array/matrix?
6 views (last 30 days)
Show older comments
Nitinkumar Ambekar
on 22 Dec 2015
Commented: Walter Roberson
on 23 Dec 2015
I know a voxel represents a grid in 3d space, but what exactly voxel is when we load an image(s) in matrix? I am not sure but if I load an image in array/matrix foo, then foo(1,1,1) represents a voxel? Is it necessary to load an images(s) in 3d matrix/array?
Will anybody please clear my basic concept by giving a simplest example, I am newbie to matlab and image processing!
0 Comments
Accepted Answer
Image Analyst
on 22 Dec 2015
A voxel represents some attribute of your sample at a 3-D location. For example, it could be the radiographic density, or the signal from an MRI instrument, or the color of a fluorescent material, or whatever.
2 Comments
Image Analyst
on 22 Dec 2015
Yes, that's correct. The voxel value is gotten by specifying the indexes for row, column, and slice, channel, plane or whatever you want to call the third spatial dimension.
voxelValue = array3d(row, column, slice);
A color image is also 3D but since the third dimension represents all the same spatial location, just different spectral values, a color image pixel is not called a voxel. A voxel means that there is a spatial variation along the "z" dimension.
More Answers (1)
Guillaume
on 22 Dec 2015
It all depends what sort of image you're loading. I'm not familiar with 3d image formats at all but the image formats I'm familiar with (bmp, png, jpeg, etc.) only hold 2D data but may result in a 3d array in matlab because the 3rd dimension is used to store the colour information (rgb triplet).
I suppose with a 3d format, you'd either get a 3d array if the image is greyscale / indexed, or a 4d array if the image is colour.
8 Comments
Walter Roberson
on 23 Dec 2015
dicom arrays are usually 2D arrays of data, and the data is often not in the range expected for pixels. You usually have to recenter and scale if you want pixel values. You might choose to impart false colors according to the data, but the data in dicom data is seldom inherently representing color.
See Also
Categories
Find more on DICOM Format in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!