pwd='C:\Users\user\Desktop\Research work\CARDIX\CARDIX\CAT SCAN CARDIAQUE'
fileFolder=fullfile(pwd, '75.0% - 5');
files=dir(fullfile(fileFolder, '*.dcm'));
result = cell(1,length(files));
for k = 1:length(files)
baseFileName = files(k).name;
fullFileName = fullfile(fileFolder, baseFileName);
fprintf(1, 'Now reading %s\n', fullFileName);
[imageArray,map]= dicomread(fullFileName);
result{k} = imageArray;
end
outputFilename = 'myMatFile.mat';
outputFolder = fileFolder;
save(fullfile(outputFolder,outputFilename),'result','map');
load myMatFile.mat;
D = squeeze(D);
h = vol3d('cdata',D,'texture','3D');