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

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 (Since R2023a)
isAttributeCheck if specified attribute is present in DICOM file (Since R2023a)
getAttributeGet value of specified top level DICOM attribute (Since R2023a)
findAttributeFind location and value of specified DICOM attribute (Since R2023b)
updateAttributeUpdate value of specified DICOM attribute (Since R2023b)
getPixelDataGet pixel data of DICOM file (Since R2023a)
writeCreate selectively modified copy of DICOM file (Since R2023a)
dicomConnectionEstablish connection with PACS server (Since R2024b)
testConnectionTest connection with PACS server (Since R2024b)
dicomstoreStore DICOM files to PACS server (Since R2024b)
dicomqueryQuery PACS server for DICOM metadata (Since R2024b)
dicomgetRetrieve DICOM files from PACS server (Since R2024b)

Work with NRRD Files

isnrrdCheck if file is valid NRRD file (Since R2022b)
nrrdinfoRead metadata from NRRD file (Since R2022b)
nrrdreadRead NRRD image (Since R2022b)

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

Featured Examples