Main Content

Import and Spatial Referencing

Read images and spatial metadata from medical imaging file formats

Medical Imaging Toolbox™ supports specialized file formats that store medical image data and metadata that describes the patient, imaging procedure, and spatial referencing. Spatial referencing specifies the location of an image in the patient coordinate system, which is defined relative to the anatomical axes of the patient. The medicalVolume and medicalImage objects automatically parse metadata to import and store image data and spatial information from DICOM, NIfTI, and NRRD files. You can also read the image and metadata separately using functions for each file format.

Functions

expand all

medicalImage2-D medical image pixel data and file metadata
extractFrameExtract pixel data for one frame of 2-D medical image series
montageDisplay medical image slices or frames as montage in patient coordinates
implayView 2-D medical image series in Video Viewer app
medicalVolume3-D medical image voxel data and spatial referencing information
extractSliceExtract voxels and spatial details for one slice of medical volume
montageDisplay medical image slices or frames as montage in patient coordinates
replaceSliceReplace voxel values for one slice of medical volume
resampleResample medical image volume in different patient coordinate system
sliceCornersExtract coordinates of corner voxels for one slice of medical volume
sliceLimitsExtract X-, Y-, Z-limits for one slice of medical volume
sliceViewerBrowse slices of medical image volume in patient coordinates
volshowDisplay medical volume in patient coordinates
writeWrite affine medical volume data to NIfTI file
medicalref3dSpatial referencing information for 3-D medical image volumes
intrinsicToWorldMappingGeometric transform between intrinsic and patient coordinates of medical image volume
containsDetermine if affine image volume contains points specified in patient coordinate system
intrinsicToWorldMap points from intrinsic coordinates to patient coordinates
oneSliceIntrinsicToWorldMappingGeometric transform between intrinsic and patient coordinates of medical image volume slice
orientUpdate patient coordinate system convention
sliceCornersExtract patient coordinates of corner voxels for one slice
worldToIntrinsicMap points from patient coordinates to intrinsic coordinates
worldToSubscriptConvert from patient coordinates to row and column subscripts

Work with DICOM Files

dicominfoRead metadata from DICOM message
dicomreadRead DICOM image
dicomwriteWrite images as DICOM files
dicomCollectionGather details about related series of DICOM files
dicomFileProcess DICOM file
isAttributeCheck if specified attribute is present in DICOM file
getAttributeGet value of specified DICOM attribute
getPixelDataGet pixel data of DICOM file
writeCreate selectively modified copy of DICOM file

Work with NRRD Files

isnrrdCheck if file is valid NRRD file
nrrdinfoRead metadata from NRRD file
nrrdreadRead NRRD image

Work with NIfTI Files

niftiinfoRead metadata from NIfTI file
niftireadRead NIfTI image
niftiwriteWrite volume to file using NIfTI format

Work with Analyze 7.5 Files

analyze75infoRead metadata from header file of Analyze 7.5 data set
analyze75readRead image data from image file of Analyze 7.5 data set

Work with Interfile Files

interfileinfoRead metadata from Interfile file
interfilereadRead images in Interfile format

Topics