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. The toolbox also supports reading RAW file formats. 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
dicomfindFind location and value of target attribute in DICOM metadata (Since R2021b)
dicomupdateUpdate value of target attribute in DICOM metadata (Since R2021b)
dicomreadRead DICOM image
dicomwriteWrite images as DICOM files
dicomreadVolumeCreate 4-D volume from set of DICOM images
dicomCollectionGather details about related series of DICOM files
dicomContoursExtract ROI data from DICOM-RT structure set (Since R2020a)
dicomanonAnonymize DICOM file
dicomdictGet or set active DICOM data dictionary
dicomdispDisplay 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
rawinfoRead metadata from RAW file (Since R2021a)
rawreadRead color filter array (CFA) image from RAW file (Since R2021a)
raw2rgbTransform color filter array (CFA) image in RAW file into RGB image (Since R2021a)
planar2rawCombine planar sensor images into full Bayer pattern CFA (Since R2021a)
raw2planarSeparate Bayer pattern color filter array (CFA) image into sensor element images (Since R2021a)
tiffreadVolumeRead volume or time series image stack from TIFF file (Since R2020b)
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
exrinfoRead metadata from EXR file (Since R2022b)
exrreadRead image data from EXR file (Since R2022b)
exrwriteWrite image data to EXR file (Since R2022b)
isexrCheck if file is valid EXR file (Since R2022b)
exrHalfAsSingle Convert numeric values into half-precision values (Since R2022b)

Topics

Read and Write Standard Graphics Files

Work with RAW Files

Work with DICOM and Other Medical Files

Featured Examples