What exactly represents a voxel after loading an image into an array/matrix?

6 views (last 30 days)
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!

Accepted Answer

Image Analyst
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
Nitinkumar Ambekar
Nitinkumar Ambekar on 22 Dec 2015
Edited: Nitinkumar Ambekar on 22 Dec 2015
I didnt get it sir, do you mean after loading an image into 3d array, each element is a voxel, as I asked in question foo(n,n,n)? In shot, just tell me how to access a voxel?
Image Analyst
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.

Sign in to comment.

More Answers (1)

Guillaume
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
Nitinkumar Ambekar
Nitinkumar Ambekar on 23 Dec 2015
Thank you so much, both of you. Now I got it. I am working on a project in which I have to classify voxels in .dcm DICOM images, I have loaded these images in 3d array.
Walter Roberson
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.

Sign in to comment.

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!