What method does the volume viewer use to upscale to a cube?

1 visualización (últimos 30 días)
Gerard Carroll
Gerard Carroll el 3 de Jun. de 2022
Respondida: aditi bagora el 10 de Oct. de 2023
I have an image that does not have the same dimensions in all directions. In the volumeViewer app, it is possible to upscale to a cube. What method does it use to do this? My image has two dimensions of the same length, with one different. Dividing the length of the other dimensions by the different dimension gets a different scaling factor than what the volumeViewer app gives. I'd like to be able to programmatically upscale my images.
Thanks!

Respuestas (1)

aditi bagora
aditi bagora el 10 de Oct. de 2023
Hello Gerard,
I understand you would like to replicate the functionality provided by the Volume Viewer app programmatically.
To achieve this, you can utilize the "imresize3()" function, which allows you to resize the image in specified dimensions and obtain the desired output. The function employs bi-cubic interpolation by default for resizing. If you want to upscale the image to a cube, you can pass the same length for all three dimensions.
Here's an example of how you can use the "imresize3()" function:
resized_img = imresize3(img, [dim_in_x, dim_in_y, dim_in_z]); % resize the image based on the given input dimensions
new_dimension = size(resized_img); %verify iamge after resizing
If you are dealing with medical image data, it is important to note that the third dimension typically represents the number of captured images or slices. It is advisable to exercise caution when applying interpolation, as medical data is sensitive, and resizing may potentially impact the quality of the images.
Please refer to the following documentation links to learn more about "imresize3()" function.
Hope this helps!
Regards,
Aditi

Categorías

Más información sobre DICOM Format en Help Center y File Exchange.

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by