3-D Volumetric Image Processing
3-D volumetric images, or volumes, represent the brightness or color of a scene sampled in three spatial dimensions: height, width, and depth. Volumes are used in a variety of fields, such as:
Medical imaging, which analyzes structures in the body to detect irregularities and measure tissue properties.
Manufacturing, which examines goods for quality and improves product design.
Geological imaging, which performs nondestructive testing of the environment and examines properties of rocks and fossils.
Archaeology and art restoration, which digitally preserve artifacts and conduct non-invasive analysis of archaeological findings.
Image Processing Toolbox™ represents volumes as multidimensional arrays with three spatial dimensions. Grayscale and binary volumes are typically 3-D arrays, where each (row, column, plane) index of the array corresponds to a single voxel in the volume. Color volumes are typically 4-D arrays, where the fourth dimension stores the intensity values of the color channels.
Note
Image Processing Toolbox also uses multidimensional arrays to represent image sequences. Unlike volumes, image sequences typically have a temporal dimension that stores samples of the scene over time. Some functions work for both volumetric images and image sequences, whereas other functions work for only one type of input. For more information, see Work with Image Sequences as Multidimensional Arrays.
This page provides a list of functions that support 3-D volumetric images in Image Processing Toolbox.
Volume Import and Export
Function | Description |
---|---|
Blocked Volumes | |
blockedImage | Big or multiresolution image made from smaller discrete blocks |
blockedImageDatastore | Datastore that reads blocks from blockedImage
objects |
makeMultiLevel3D | Create 3-D multilevel blocked image with different resolutions from a single level of a blocked image |
Standard File Formats | |
dicomread | Read DICOM image |
dicomreadVolume | Create 4-D volume from set of DICOM images |
dicomContours | Extract ROI data from DICOM-RT structure set |
niftiinfo | Read metadata from NIfTI file |
niftiwrite | Write volume to file using NIfTI format |
niftiread | Read NIfTI image |
tiffreadVolume | Read volume from TIFF file |
medicalVolume (Medical Imaging Toolbox) | 3-D medical image voxel data and spatial referencing information (requires Medical Imaging Toolbox™) |
Display
Function | Description |
---|---|
Interactively Display and Explore Volumes | |
Volume Viewer | View volumetric data and labeled volumetric data, and interactively adjust display settings |
Render Volumes in 3-D Space | |
viewer3d | Create 3-D viewer with scene-level controls |
volshow | Display volume in 3-D viewer |
Surface | Display surface in 3-D viewer |
Display 2-D Cross Sections (Slices) | |
montage | Display multiple image slices as rectangular montage |
sliceViewer | Browse image slices in grayscale or RGB volume |
orthosliceViewer | Browse orthogonal slices in grayscale or RGB volume |
obliqueslice | Extract oblique slice from volume |
See these related examples:
Geometric Transformations and Registration
Function | Description |
---|---|
Resize, Rotate, and Crop Volumes | |
imresize3 | Resize 3-D grayscale volume |
imrotate3 | Rotate 3-D grayscale volume |
imcrop3 | Crop 3-D volume |
Create and Apply 3-D Geometric Transformation | |
imwarp | Apply geometric transformation |
transltform3d | 3-D translation geometric transformation |
rigidtform3d | 3-D rigid geometric transformation |
simtform3d | 3-D similarity geometric transformation |
affinetform3d | 3-D affine geometric transformation |
randomAffine3d | Randomized 3-D affine geometric transformation |
transformPointsForward | Apply forward geometric transformation |
transformPointsInverse | Apply inverse geometric transformation |
Register 3-D Volumes | |
imregister | Intensity-based volume registration |
imregdemons | Estimate displacement field that aligns two volumes |
Medical Registration Estimator (Medical Imaging Toolbox) | Interactively register volumes using the Medical Registration Estimator app (requires Medical Imaging Toolbox) |
Store 3-D Spatial Referencing | |
imref3d | Reference volume to world coordinates |
affineOutputView | Spatial extent of transformed volume |
For an example, see Register Multimodal 3-D Medical Images.
Filtering and Enhancement
Function | Description |
---|---|
Apply Filter to Volume | |
imfilter | Apply N-D filter to multidimensional volumes |
fspecial3 | Create predefined 3-D filter |
medfilt3 | 3-D median filtering |
imgaussfilt3 | 3-D Gaussian filtering |
imboxfilt3 | 3-D box filtering |
imnoise | Add noise to volume |
integralBoxFilter3 | Box filtering of 3-D integral volumes |
integralImage3 | 3-D integral volume |
fibermetric | Enhance elongated or tubular structures in volume using Frangi vesselness filter |
padarray | Pad array |
Adjust Contrast | |
histeq | Enhance contrast using histogram equalization |
imadjustn | Adjust intensity values |
imhistmatchn | Adjust histogram of volume to match reference histogram |
Deblur Volumes | |
deconvblind | Deblur volume using blind deconvolution |
deconvlucy | Deblur volume using Lucy-Richardson method |
deconvreg | Deblur volume using regularized filter |
deconvwnr | Deblur volume using Wiener filter |
edgetaper | Taper discontinuities along volume edges |
otf2psf | Convert optical transfer function to point-spread function |
psf2otf | Convert point-spread function to optical transfer function |
Segmentation
For more information about image and volume segmentation techniques, see Get Started with Image Segmentation.
Function | Description |
---|---|
Segment Volume Interactively | |
Volume Segmenter | Interactively segment objects in a volume and refine segmentation masks using the Volume Segmenter app |
Medical Image Labeler (Medical Imaging Toolbox) | Interactively label volumes using manual, semiautomated, and automated techniques including deep learning networks (requires Medical Imaging Toolbox) |
Binary Volume Segmentation | |
activecontour | Segment grayscale volume into foreground and background using active contours (snakes) region growing technique |
lazysnapping | Segment grayscale volume into foreground and background using graph-based segmentation |
grabcut | Segment grayscale volume into foreground and background using iterative graph-based segmentation |
adaptthresh | Adaptive volume threshold using local first-order statistics |
graythresh | Global volume threshold using Otsu's method |
gradientweight | Calculate weights for voxels based on volume gradient |
graydiffweight | Calculate weights for image pixels based on grayscale intensity difference |
grayconnected | Select contiguous volumetric region with similar gray values using flood-fill technique |
imbinarize | Binarize volume by thresholding |
imsegfmm | Binary volume segmentation using fast marching method |
Segment Volumes into Labeled Volumes | |
imsegkmeans3 | K-means clustering based volume segmentation |
superpixels3 | 3-D superpixel oversegmentation of volume |
watershed | Watershed transform |
Evaluate Segmentation Results | |
bfscore | Contour matching score |
dice | Sørensen-Dice similarity coefficient |
jaccard | Jaccard similarity coefficient |
See these related examples:
Morphology
To ensure a volume is processed as a volume and not an image sequence, use a 3-D structuring element.
Function | Description |
---|---|
Morphological Operations | |
bwmorph3 | Morphological operations on binary volume |
imclose | Morphologically close volume |
imdilate | Dilate volume |
imerode | Erode volume |
imopen | Morphologically open volume |
imbothat | Bottom-hat filtering |
imtophat | Top-hat filtering |
bwskel | Reduce all objects to lines in binary volume |
bwhitmiss | Binary hit-miss operation |
bwperim | Find perimeter of objects in binary volume |
imclearborder | Suppress light structures connected to volume border |
imkeepborder | Retain light structures connected to volume border |
bwulterode | Ultimate erosion |
imfill | Fill regions and holes in volume |
padarray | Pad volume |
Morphological Reconstruction | |
imreconstruct | Morphological reconstruction |
imregionalmax | Regional maxima |
imregionalmin | Regional minima |
imextendedmax | Extended-maxima transform |
imextendedmin | Extended-minima transform |
imhmax | Suppress regional maxima using H-maxima transform |
imhmin | Suppress regional minima using H-minima transform |
imimposemin | Impose minima |
Structuring Elements | |
strel | Morphological structuring element for binary volumes |
offsetstrel | Morphological offset structuring element for grayscale volumes |
conndef | Create connectivity array |
Image and Object Analysis
Function | Description |
---|---|
Analyze Objects | |
regionprops3 | Measure properties of 3-D regions |
bwselect3 | Select objects in binary volume |
bwconncomp | Find and count connected components in binary volume |
bwareaopen | Remove small objects from binary volume |
Evaluate Image Quality | |
immse | Mean-squared error |
psnr | Peak signal-to-noise ratio (PSNR) |
ssim | Structural similarity (SSIM) index |
multissim3 | Multiscale structural similarity (MS-SSIM) index |
Measure Image Properties | |
imhist | Histogram of volume data |
bwdist | Distance transform of binary volume |
bwdistgeodesic | Geodesic distance transform of binary volume |
graydist | Gray-weighted distance transform |
Detect Edges | |
edge3 | Find edges in grayscale volume |
imgradient3 | Find gradient magnitude and direction of volume |
imgradientxyz | Find directional gradients of volume |
Measure Texture | |
entropy | Entropy of grayscale volume |
entropyfilt | Local entropy of grayscale volume |
rangefilt | Local range of volume |
stdfilt | Local standard deviation of volume |
Deep Learning with Volumes
For more information, see Get Started with Image Preprocessing and Augmentation for Deep Learning (Computer Vision Toolbox) and Preprocess Volumes for Deep Learning (Deep Learning Toolbox).
Function | Description |
---|---|
Read and Preprocess Data for Deep Learning | |
blockedImageDatastore | Datastore that reads blocks from blockedImage
objects |
randomPatchExtractionDatastore | Datastore that extracts random 3-D patches from volumes or pixel label volumes |
randomAffine3d | Randomized 3-D affine transformation |
centerCropWindow3d | Centered cuboidal cropping window |
randomCropWindow3d | Randomized cuboidal cropping window |
Create Deep Neural Networks | |
resize3dLayer | Resize 3-D layer in neural network (requires Deep Learning Toolbox™) |
dlresize | Resize spatial dimensions of dlarray object
(requires Deep Learning Toolbox) |
For an example, see 3-D Brain Tumor Segmentation Using Deep Learning.
Arithmetic
Function | Description |
---|---|
imabsdiff | Absolute difference of two volumes |
imadd | Add two volumes or add constant to volume |
imdivide | Divide one volume into another or divide volume by constant |
immultiply | Multiply two volumes or multiply volume by constant |
imsubtract | Subtract one volume from another or subtract constant from volume |