Main Content

Read and Write Image Data from Files

Read and write image data from files, get information about contents of image files

Image Processing Toolbox™ enables you to read and write image files in many common file formats including BMP, GIF, JPEG, PNG, and TIFF. The toolbox supports reading and writing medical file formats including DICOM, NifTI, and Analyze 7.5. You can also work with images in specialized file formats, including NITF, DPX, and Interfile.

Apps

DICOM BrowserExplore collection of DICOM files

Functions

expand all

imreadRead image from graphics file
imwriteWrite image to graphics file
imfinfoInformation about graphics file
dicominfoRead metadata from DICOM message
dicomreadRead DICOM image
dicomwriteWrite images as DICOM files
dicomreadVolumeConstruct 4-D volume from set of DICOM images
dicomCollectionGather details about related series of DICOM files
dicomContoursExtract ROI data from DICOM-RT structure set
dicomanonAnonymize DICOM file
dicomdictGet or set active DICOM data dictionary
dicomdisp Display DICOM file structure
dicomlookupFind attribute in DICOM data dictionary
dicomuidGenerate DICOM globally unique identifier
images.dicom.decodeUIDGet information about DICOM unique identifier
images.dicom.parseDICOMDIRExtract metadata from DICOMDIR file
tiffreadVolumeRead volume from TIFF file
niftiinfoRead metadata from NIfTI file
niftiwriteWrite volume to file using NIfTI format
niftireadRead NIfTI image
analyze75infoRead metadata from header file of Analyze 7.5 data set
analyze75readRead image data from image file of Analyze 7.5 data set
interfileinfoRead metadata from Interfile file
interfilereadRead images in Interfile format
nitfinfoRead metadata from National Imagery Transmission Format (NITF) file
nitfreadRead image from NITF file
isnitfCheck if file is National Imagery Transmission Format (NITF) file
dpxinfoRead metadata from DPX file
dpxreadRead DPX image

Topics

Read and Write Standard Graphics Files

Image Types in the Toolbox

Image types determine how MATLAB® interprets data matrix elements as pixel intensity values. The toolbox supports many image types including binary, grayscale, truecolor, multispectral, and label images.

Work with DICOM and Other Medical Files

DICOM Support in Image Processing Toolbox

The Digital Imaging and Communications in Medicine (DICOM) Standard facilitates access to image data and files across medical imaging equipment.

Mayo Analyze 7.5 Files

Analyze 7.5 is a file format, developed by the Mayo Clinic, for storing MRI data.

Interfile Files

Interfile is a file format that was developed for the exchange of nuclear medicine image data.

Featured Examples