How to change the orientation of a medical Volume object ?
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
David Hassanein BERRO
el 19 de Jun. de 2023
Comentada: David Hassanein BERRO
el 18 de Sept. de 2024
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 comentarios
Lipi Vora
el 16 de Sept. de 2024
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
Respuesta aceptada
Shaik mohammed ghouse basha
el 19 de Jun. de 2023
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.
Refer to https://in.mathworks.com/help/medical-imaging/ref/medicalvolume.resample.html for more information and example.
3 comentarios
Shaik mohammed ghouse basha
el 19 de Jun. de 2023
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.
Más respuestas (0)
Ver también
Categorías
Más información sobre Import and Spatial Referencing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!