How can I change voxel size in a volume?
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Simone Cotta Ramusino
am 25 Mai 2022
Kommentiert: Simone Cotta Ramusino
am 26 Mai 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 Kommentar
Bjorn Gustavsson
am 25 Mai 2022
What do you intend to reveal with this rather large up-sampling? Almost a factor of 40 in the third dimension?
Akzeptierte Antwort
Walter Roberson
am 25 Mai 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 Kommentare
Walter Roberson
am 26 Mai 2022
Bearbeitet: Walter Roberson
am 26 Mai 2022
imshow3d does not know anything about reference objects.
See also volumeviewer()
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


