how i can use dicomwrite and copy the metadata for the code below
clearmyFolder = 'C:\Users\Admin\Desktop\MATLAB\Crop cochlea';filePattern = fullfile(myFolder, '*dcm');theFiles = dir(filePattern);crop=zeros(209,218,394);for k = 1 : length(theFiles) baseFileName = theFiles(k).name; fullFileName = fullfile(myFolder, baseFileName); fprintf(1, 'Now reading %s\n',fullFileName); crop(:,:,k)=x;endtmp11 = min(max (0.7966*crop -568.5, -1000),4096); hu = uint16(tmp11);imagesc(hu(:,:,200))
Best Answer