How to change the orientation of a medical Volume object ?

30 次查看(过去 30 天)
I'm using the new Medical Imaging Toolbox.
I want to know how to change the orientation of a medical Volume object, for example how to resample voxels from "transverse" to "sagittal" or "coronal" ? Is there a simple way to do it with medicalref3d object ?
Thank you very much.
  2 个评论
Lipi Vora
Lipi Vora 2024-9-16,15:06
Hello David,
Is there a reason or use case or workflow down the line that requires you to change the orientation as you describe?
Thanks,
Lipi Vora
David Hassanein BERRO
David Hassanein BERRO 2024-9-18,4:37
Hello Lipi,
Yes of course, most of the time, medical doctors need to see the images in the 3 planes of view. Usually images are acquired in one orientation, and we need to resample them in the orther 2 orientations.
Regards

请先登录,再进行评论。

采纳的回答

Shaik mohammed ghouse basha
I understand that you want to resample voxels from "transverse" to "sagitta" or "coronal".
You can do this by using resample function. In resample function you pass old medical volume object and and new resample options via medicalref3d object.
  3 个评论
Shaik mohammed ghouse basha
I understand your query. Transverse to saggital can be changed by rotating along Y - axis by 90 degrees. In the given documentation link it was an example of changing ratio right. With the sample example I modified it to change orientaiton to saggital.
Here is the code of it:
zipFile = matlab.internal.examples.downloadSupportFile("medical","MedicalVolumeDICOMData.zip");
filepath = fileparts(zipFile);
unzip(zipFile,filepath)
dataFolder = fullfile(filepath,"MedicalVolumeDICOMData","LungCT01");
medVol = medicalVolume(dataFolder);
O = medVol.VolumeGeometry;
A = [0 0 1 0; 0 1 0 0; -1 0 0 0; 0 0 0 1]; % rotate along Y - axis
t = affinetform3d(A);
R = medicalref3d(size(medVol.Voxels), t);
R = orient(R, O.PatientCoordinateSystem);
N = resample(medVol, R); % N is the new medical volume object with orientation as saggital.
To change orientation you need to rotate along X - axis.
For this you just need to change the vector A, [1 0 0 0; 0 0 -1 0; 0 1 0 0] by using this matrix you get orientaiton of N as coronal.
David Hassanein BERRO
Thank you very much.
You gave me the good point to start with and to improve (such as the size of the volume). Now I understand.
Best Regards

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Preprocessing and Augmentation 的更多信息

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by