Hi, I am in stuck on a dicom write problem.
I got some PET/CT image which was 512*512*206 size.
I want to change it's matrix size on 128*128, and to make DICOM file using dicomwrite function.
I have converted matrix size to 128 by 128 using imresize function successfully,
however when I made dicom file using the this file (matrix size 128*128), it didn't work well.
metadata = dicominfo('original dicom image') %loaded original dicom image information
PET_ num2str(i)= imresize(petimg(:,:,i), [128 128]) %loaded all PET image and converted matrix size using for loop.
dicomwrite(PET_1,'PET_1.dcm',metadata,'CreateMode','Copy'); %write dicom file.
PET_1 is 128*128 image which is changed in original matrix size.
metadata is dicom information to change some information.(rows, columns, heights, width, pixel size, etc)
In this code, dicom file was generated. but opened the this dicom image file, image was damaged, unlikely original file.
I'm sorry for my insufficient English language skills.