DICOM File Output Error (DICOMファイルのアウトプットエラーについて)
Show older comments
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

Accepted Answer
More Answers (0)
Categories
Find more on ファイルからのイメージ データの読み取りと書き込み in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!