How can I change voxel size in a volume?

46 visualizaciones (últimos 30 días)
Simone Cotta Ramusino
Simone Cotta Ramusino el 25 de Mayo de 2022
Comentada: Simone Cotta Ramusino el 26 de Mayo de 2022
Hi everyone,
I have a 3D matrix with size 100x100x41, (obtained by uploading a DICOM file, but that's not the point). From the header, I know that voxels have size 0.723x0.723x1 mm; I'd like to get them 0.08x0.04x0.027 mm, how can I do? I was thinking about imresize and imresize3, using for each the respective scaling factor, but it does not convince me at all, since in no way Matlab has a pixel/voxel size reference, it reads them only as elements of a matrix. Moreover, memory "explodes" using imresize3, because it increases the number of slices a lot.
DCM=rand(100,100,41); % here I create a similar volume, but it can be any
DCM_resize=imresize(DCM,'Scale',[9.0375 18.0832],'method','bicubic');
Last think, I'd like the image not to be stretched, keeping its aspect ratio. Thanks for your help.
  1 comentario
Bjorn Gustavsson
Bjorn Gustavsson el 25 de Mayo de 2022
What do you intend to reveal with this rather large up-sampling? Almost a factor of 40 in the third dimension?

Iniciar sesión para comentar.

Respuesta aceptada

Walter Roberson
Walter Roberson el 25 de Mayo de 2022
In order to keep the aspect ratio, all dimensions must be interpolated by the same factor, which would be max() of the requested factors.
You want your Z to be about 39 times finer (1/0.027) so that is the factor you would have to use for each dimension to avoid changing the aspect ratio.
This refers to keeping the aspect ratio within the matrix. If you are just concerned with keeping the aspect ratio for display purposes, rather than for computation, then there may be additional options.
  13 comentarios
Walter Roberson
Walter Roberson el 26 de Mayo de 2022
Editada: Walter Roberson el 26 de Mayo de 2022
imshow3d does not know anything about reference objects.
See also volumeviewer()
Simone Cotta Ramusino
Simone Cotta Ramusino el 26 de Mayo de 2022
Thanks sir, you cleared my mind.

Iniciar sesión para comentar.

Más respuestas (0)

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by