To parse med files in Matlab, one option is to use the DICOM (Digital Imaging and Communications in Medicine) toolbox, which provides support for DICOM and other medical image file formats.
Assuming that the med file is in DICOM format, you can use the dicomread
function to read the image data and dicominfo
function to get metadata information:
main.m124 chars6 lines
Alternatively, you can use the med2image
function from the med2image toolbox to convert the med file to a supported image format (e.g., TIFF or PNG) and then read the image data using Matlab's built-in imread
function:
main.m132 chars6 lines
Note that the med2image toolbox requires Python to be installed on your system.
gistlibby LogSnag