DICOM File Output Error (DICOMファイル​のアウトプットエラー​について)

5 vues (au cours des 30 derniers jours)
ssk
ssk le 2 Fév 2019
Commenté : ssk le 3 Fév 2019
Hi, there!
I tried to output DICOM file in the following way, however I couldn't upload well. (please see the attachment.) The directory structure and the source code are described below.
DICOMファイルをアウトプットしようとしたところ、下図のように画像なしでアップロードされてしまい、うまくできません。ディレクトリの構造とソースコードを以下に記しますので、ご助言頂けますと幸いです。
どうぞよろしくお願いいたします。
Directory structure is as follows;
ディレクトリの構造は以下のとおりです。
main
-- a
-- image.dcm(10 dicom file)
 -- b
  -- image.dcm(10 dicom file)
 -- c
  -- image.dcm(10 dicom file)
-- d
  -- image.dcm(10 dicom file)
Here is my source code.
ソースコードは以下のとおりです。
%path = current directory
currentdirectory = pwd;
categories = {'a', 'b', 'c','d'};
%Create an ImageDatastore to help you manage the data.
imds = imageDatastore(fullfile(currentdirectory, categories),'IncludeSubfolders',true,'FileExtensions','.dcm','LabelSource', 'foldernames');
figure
%output 10 DICOM image
numImages = 10;
perm = randperm(numImages,10);
for i = 1:10
subplot(4,5,i);
imshow(imds.Files{perm(i)});
end

Réponse acceptée

Satoshi Kobayashi
Satoshi Kobayashi le 3 Fév 2019
Modifié(e) : Satoshi Kobayashi le 3 Fév 2019
グレースケールイメージの表示範囲の問題だと推測します。
16 BPPのdicomで再現した結果、指定しなかった場合のグレースケールイメージの表示範囲(座標軸のCLim)は[-32768 32767]、すなわち、int16の最小値と最大値でした。
また、imshow をファイル名と共に呼び出す場合は、'DisplayRange' パラメーターを指定しなければなりません。
よって、以下のようにグレースケールイメージの表示範囲を指定してください。
imshow(imds.Files{perm(i)},'DisplayRange',[0 80]);
  1 commentaire
ssk
ssk le 3 Fév 2019
Kobayashiさま
ご回答いただき誠にありがとうございます。
頂いたコードをもとに修正したところ、無事コンパイルできました。
本当にありがとうございました。

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!