MATLAB: Micro CT slices to 3D image of the object

image processingImage Processing Toolbox

I have multiple tiff slices of a material made by micro CT I want to get a 3D image of the object .Please any help

Best Answer

tiff_filename = 'afaf28g.tif'; %use appropriate file name
num_slices = 0;
while true
try
this_slice = imread(tiff_filename, 'index', num_slices + 1);
num_slices = num_slices + 1; %only get here if read worked
catch
break; %normal to get here at end of slices
end
end
data_slices = cell(num_slices, 1);
for K = 1 : num_slices
data_slices{K} = imread(tiff_filename, 'index', K);
end
Now you can go through the process of determining whether all of the slices are the same size, and if not then figuring out where you want to pad them.
After that, to visualize you can consider slice() or isosurface() or the File Exchange contribution vol3d v2