Creating 3D volume from 2D slice set of grayscale images

房东的猫 提交于 2019-11-28 17:40:06

Part 0 - Assumptions


  • all 2D images are of the same dimension, hence your 3D volume can hold all of them in a rectangular cube
  • majority of the pixels in each of the 2D images have 3D spatial relationships (you can't visualize much if the pixels in each of the 2D images are of some random distribution. )

Part 1 - Visualizing 3D Volume from A Stack of 2D Images


To visualize or reconstruct a 3D volume from a stack of 2D images, you can try the following toolkits in matlab.

1 3D CT/MRI images interactive sliding viewer http://www.mathworks.com/matlabcentral/fileexchange/29134-3d-ctmri-images-interactive-sliding-viewer

[2] Viewer3D http://www.mathworks.com/matlabcentral/fileexchange/21993-viewer3d

[3] Image3 http://www.mathworks.com/matlabcentral/fileexchange/21881-image3

[4] Surface2Volume http://www.mathworks.com/matlabcentral/fileexchange/8772-surface2volume

[5] SliceOMatic http://www.mathworks.com/matlabcentral/fileexchange/764

Note that if you are familiar with VTK, you can try this: [6] matVTK http://www.cir.meduniwien.ac.at/matvtk/

I am currently sticking with [5] SliceOMatic for its simplicity and ease of use. However, by default, rendering 3D is quite slow in Matlab. Turning on openGL would give faster rendering. (http://www.mathworks.com/help/techdoc/ref/opengl.html) Or simply put, set(gcf, 'Renderer', 'OpenGL').


Part 2 - Interpolating pixels in between the slices


To interpolate pixels in between the slices, you need to specify an interpolation method (some of the above toolkits have this capability / flexibility. Otherwise, to give you a head start, some examples for interpolation are bicubic, spline, polynomial etc..(you can work this out by looking up on google or google/scholar for interpolation methods much more specific to your problem domain).


Part 3 - 3D Pre-processing


Looking at your procedures, you process the volumetric data by processing each of the 2D images first. In many advanced algorithms, or in true 3D processing, what you can do is to process the volumetric data in 3D domain first (simply put, you take the 26 neighbors or more in to account first.). Once this step is done, you can simply output the volumetric data into a stack of 2D images for cross-sectional viewing or supply to one of the aforementioned toolkits for 3D viewing or output to third party 3D viewing applications.


I have followed the above concepts for my own medical imaging research projects and the above finding is based on my research experience documented here (with latest revisions).

MATLAB generally plots volumetric data using a 3d array. The data points are spatially evenly separated along each axis. If there are sites in the 3d array for which you do not have data for, usually they are assigned the NaN value and the various plotting functions can generally handle this in a reasonable way (i.e. will generally behave as you intended).

If you load the slices into the 3d array such that adjacent points in the z-direction of the data are also adjacent in the 3rd dimension of the array then you should be fine.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!