I have 25 2D images (of equal size), each image represents one layer equally spaced. Each image is in grayscale and black color (or values equal 0 in data matrix after importing it) is the background that needs to be removed.
And my questions are:
-
How to combine these 25 images to one 3D image? How to draw each one with some space between?
-
How to remove the background color? Is it possible to create some kind of colorscale where values equal 0 will be transparent?
A little additional data:
-
These images are in DCM format (DICOM images) and I import them using
dicomreadfunction. -
Each image (320×320 px) represents one layer that is 4 mm thick and spacing between layers is 1,2 mm. We can assume, that width of each image is about 120-125 mm
2D into 3D matrix:
Transparency:
Set the transparent voxels to a value of
NaN. Most graphics just leaveNaNas empty space.Related projects
You are likely to be interested in SliceOMatic
My first project at The MathWorks was a demo similar to yours. It was reconstruction of a 3-D solid from planar slices (unregistered). Most of the work was in the registration.
This is a related project also that might be of interest.