Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
pmi432 / LR07 / 2read / image processing toolbox guide.pdf
Скачиваний:
166
Добавлен:
18.03.2015
Размер:
18.08 Mб
Скачать

3 Reading and Writing Image Data

creator of the metadata (e.g., an equipment vendor) must provide you with the information.

3Save your copy of the dictionary.

4Set MATLAB to use your copy of the DICOM dictionary, dicomdict function.

Reading Image Data from a DICOM File

To read image data from a DICOM file, use the dicomread function. The dicomread function reads files that comply with the DICOM specification but can also read certain common noncomplying files.

When using dicomread, you can specify the filename as an argument, as in the following example. The example reads the sample DICOM file that is included with the toolbox.

I = dicomread('CT-MONO2-16-ankle.dcm');

You can also use the metadata structure returned by dicominfo to specify the file you want to read, as in the following example.

info = dicominfo('CT-MONO2-16-ankle.dcm'); I = dicomread(info);

Viewing Images from DICOM Files

To view the image data imported from a DICOM file, use one of the toolbox image display functions imshow or imtool. Note, however, that because the image data in this DICOM file is signed 16-bit data, you must use the autoscaling syntax with either display function to make the image viewable.

imshow(I,'DisplayRange',[])

3-12

Соседние файлы в папке 2read