You can use the dicomread
function to read all the dcm images from a folder and use the cat
function to concatenate them in a 3D matrix. Here's how you can do it:
main.m550 chars18 lines
The resulting img_stack
variable will be a 3D matrix where the first two dimensions are the size of the images and the third dimension is the number of images. You can access each individual image using indexing, for example img_stack(:, :, 1)
will give you the first image.
gistlibby LogSnag