Dicom files consist of metadata and image data within a file. The Dicom toolkit provides functions to read and write dicom data.
%% read the meta information from a dicom file > info = dicominfo (file_in_loadpath('imdata/simple-test.dcm'); info = scalar structure containing the fields: Filename = a.dcm FileModDate = 04-Feb-2017 02:08:31 FileMetaInformationVersion = 0 1 MediaStorageSOPClassUID = 1.2.840.10008.5.1.4.1.1.7 MediaStorageSOPInstanceUID = 1.2.826.0.1.3680043.2.1143.4379544382488839209812957878553810312 TransferSyntaxUID = 1.2.840.10008.1.2 ImplementationClassUID = 1.2.826.0.1.3680043.2.1143.107.104.103.115.2.6.3 ImplementationVersionName = GDCM 2.6.3 SourceApplicationEntityTitle = GDCM ImageType = DERIVED \SECONDARY SOPClassUID = 1.2.840.10008.5.1.4.1.1.7 SOPInstanceUID = 1.2.826.0.1.3680043.2.1143.4379544382488839209812957878553810312 StudyDate = 20170203 StudyTime = 210831.360586 Modality = OT ConversionType = WSD NominalScannedPixelSpacing = 1 1 StudyInstanceUID = 1.2.826.0.1.3680043.2.1143.1282184104726305239898701219563360204 SeriesInstanceUID = 1.2.826.0.1.3680043.2.1143.9385265081744858155080799316976198629 SamplesPerPixel = 1 PhotometricInterpretation = MONOCHROME1 Rows = 10 Columns = 5 BitsAllocated = 8 BitsStored = 8 HighBit = 7 PixelRepresentation = 0 RescaleIntercept = 0 RescaleSlope = 1 RescaleType = US PixelData = not assigned %% read the image data > image = dicomread(file_in_loadpath('imdata/simple-test.dcm')) image = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Help for each function can be displayed by help thefunctionname
ie:
help dicominfo