4D figure with a colormap

5 次查看(过去 30 天)
Hi!
I have an exercise where I have a certain dicom collection input and from there I have to get only 1 of the series (corresponding to the ones that have 'US' as a Modality in the table) and do the following:
  • read the series data with the color map
  • display in 1 figure the montage of the series with the color map
Can someone please help me in how should I do this?
The begin of the code will be something like this: (my problem is that I get an 4-D uint8 type of variable and I cannot show it as a regular image)
dir = fullfile( matlabroot, 'toolbox/images/imdata'); %Directory from where I get the dicom Collectuon
infoTable = dicomCollection(dir);
disp(infoTable)
T2 = strcmp(infoTable.Modality,'US'); %Finds the series with the Modality equal to ’US’
series = infoTable(T2,:); %Series with the modality equal to 'US'
fileName = series.Filenames; %Cell array with the file name
fName = fileName{1,1}; %String with the file name
I2 = dicomread(fName);
Thank you a lot in advance, this is the only information I have (I'm not even telled to use a specific colormap).

采纳的回答

DGM
DGM 2021-11-1
Well, dicomCollection() won't run in-browser, but see if this is what you're after:
dir = fullfile( matlabroot, 'toolbox/images/imdata'); %Directory from where I get the dicom Collectuon
infoTable = dicomCollection(dir);
disp(infoTable)
T2 = strcmp(infoTable.Modality,'US'); %Finds the series with the Modality equal to ’US’
series = infoTable(T2,:); %Series with the modality equal to 'US'
fileName = series.Filenames; %Cell array with the file name
fName = fileName{1,1}; %String with the file name
[I2 map] = dicomread(fName);
montage(I2,map,'size',[5 2])

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 DICOM Format 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by