How to rotate a 3D meshgrid around a specific point (not center point)

조회 수: 5 (최근 30일)
viet le
viet le 2020년 6월 10일
답변: Ameer Hamza 2020년 6월 10일
Hi Everyone,
I want to rotate a 3D image around a specific point (not in center point). Below is a code that I used imrotate3, and it was rotated around center point
DoseSimulated = imrotate3(DoseSimulated,XrotSAG,[1,0,0],'cubic','crop');
DoseSimulated = imrotate3(DoseSimulated,YrotCORO,[0,1,0],'cubic','crop');
DoseSimulated = imrotate3(DoseSimulated,ZrotTRAN,[0,0,1],'cubic','crop');
where DoseSimulated is 3D dose image (it is a medical image), and XrotSAG, YrotCORO, ZrotTRAN are corresponded rotation degree about X axis, Y axis, Z axis.
Can anyone know how can I solve it.
Thanks for your reading thru.

답변 (1개)

Ameer Hamza
Ameer Hamza 2020년 6월 10일
First translate the image https://www.mathworks.com/help/releases/R2020a/images/ref/imtranslate.html to the center point and then apply the rotation.

카테고리

Help CenterFile Exchange에서 Geometric Transformation and Image Registration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by