change resolution of DICOM

17 vues (au cours des 30 derniers jours)
Ahmad Abbas
Ahmad Abbas le 16 Fév 2021
Commenté : Rik le 18 Fév 2021
i am trying to reduce the DICOM image resolution. i though of using imresize, but imresize does not determine a mean, it samples the nearest grid point. which is not the best way for DICOM. is there another way to do it ???
the code below i used in the first time and trying to find better way
clear
image_list=dir('MicroFinal*.dcm');
[slice_no,y]=size(image_list);
for i=1:slice_no
rph_ct=dicomread(image_list(i).name);
image_stuck(:,:,i)=dicomread(image_list(i).name); % this line to get the 3d matrix
imgHdr = dicominfo(image_list(i).name);
rph_ctd_hu = imresize(rph_ct,[41,41]);
rph_ctd_huu = int16(rph_ctd_hu);
dicomwrite(rph_ctd_huu, ['F' num2str(i) '.dcm'], imgHdr,'CreateMode','Copy')
end

Réponse acceptée

Walter Roberson
Walter Roberson le 16 Fév 2021
imresize() does not normally sample the nearest grid point (but it can.) The default is bicubic interpolation. You can change the interpolation method; https://www.mathworks.com/help/images/ref/imresize.html#buxswkh-1-method

Plus de réponses (1)

Rik
Rik le 16 Fév 2021
It looks like you want to interpolate a 3D image. As most image processing methods assume a 2D image, you might be better off looking at tools like interpn. See the documentation for the options. The default is an n-linear iterpolation (so trilinear for 3D).
  4 commentaires
Walter Roberson
Walter Roberson le 18 Fév 2021
Your existing code looks okay, but you might want to experiment with changing interpolation methods for imresize(). Though as I indicated earlier, the default is not to take nearest grid element.
Rik
Rik le 18 Fév 2021
For 2D images imresize should be what you need, so you should have a look at the answer by Walter.
If you want to take into account the fact that you have a 3D image stack, you can use my suggestion. You don't need to change the number of slices, but this will allow the interpollation method to consider values from neighboring slices.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Geometric Transformation and Image Registration dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by