1
votes

I have a series of DICOM files that I'm displaying through implay but I'm not sure how to use the autoscaling syntax so the video doesn't look all whitewashed. Usually with imshow or imtool its "imtool(I,'DisplayRange',[])" but how can I do the same to implay?

D = dir('*.dcm');
baseFilenames = {D.name};
numberOfFiles = length(baseFilenames);
for k = 1:numberOfFiles
    fullFileName = baseFilenames{k};
    imArray(:,:,k) = dicomread(fullFileName);
end
implay(imArray)
1

1 Answers

0
votes

I don't think there is an autoscaler for implay.

If your data is type double, you should scale it manually so your images are between [0 1] - that is what is expected by most Image Processing toolbox functions. There are various functions like imadjust that could be used for this purpose but chances are that you can simply apply the same factor to the entire image stack. If you don't actually want to modify imArray because you need the original DICOM values for later, you can just do it in the implay line:

implay(imArray./sf)

(Will get slightly more complex if you have negative values in your DICOM, of course).