Dicom directory (of slices) to 3D volume image
No License
This function reads all good dicom files in a given directory and outputs a volume image. The slices are sorted by the SliceLocation tag in the image header. If no directory is specified, it opens a folder browser.
It also collects user specified (or default) header information for each slice and calculates some additional data for each slice such as the physical width and height of the image (e.g. PhysicalWidth = PixelWidth(1)*Rows). It also determines some meta data about the image such as the physical aspect ratio which is useful for volume rendering utilities.
Finally, it saves all the data to the dicom directory as a MAT file. In the future, the user will be able to switch the file saving on and off, and also specify alternate formats.
Cite As
Ariel Balter (2024). Dicom directory (of slices) to 3D volume image (https://www.mathworks.com/matlabcentral/fileexchange/23455-dicom-directory-of-slices-to-3d-volume-image), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- Image Processing and Computer Vision > Image Processing Toolbox > Import, Export, and Conversion >
- Image Processing and Computer Vision > Image Processing Toolbox > 3-D Volumetric Image Processing >
- Industries > Medical Devices > DICOM Format >
Tags
Acknowledgements
Inspired by: isdicom, 3D Free Form Image Registration Toolbox (GUI), Read and write single file dicom volumes
Inspired: dicomfolder
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.3.0.0 | Added robustness in handling directories with subdirectories (Mac OSIRIX users end up with these), very large data sets (>2GB), and missing header info. Changed screen outputs to fprintf in case user wants to compile. |
||
1.2.0.0 | Fixed a few bugs. Better handling of empty directories or insufficient header info for some calculations. Slight improvements to documentation and organization. |
||
1.1.0.0 | Fixed a bug. |
||
1.0.0.0 |