フィルターのクリア

How can I rotate a volshow image programatically?

24 ビュー (過去 30 日間)
Carsten
Carsten 2024 年 5 月 22 日 21:01
コメント済み: Matt J 2024 年 5 月 23 日 13:16
Hi!
I have a volshow image of a brain and I want to rotate it programatically (and then use getframe to write a video with writeVideo).
I tried using CameraPosition and CameraDirection of the Viewer3D parent object, but I have no clue how these work (and whether I need to move LightPosition with the camera). It seems highly complicated to move the camera around the brain like this. Is there an easier way to do that? Can I rotate the volume instead of the camera?
  2 件のコメント
Image Analyst
Image Analyst 2024 年 5 月 23 日 2:53
Did you want to just rotate the data and axes together, like with view, or did you (for some reason) want to rotate the volume within the fixed axes (keep axes and viewing angle fixed)?
Carsten
Carsten 2024 年 5 月 23 日 10:22
Like with "view" would be fine but that does not seem to work for volshow, only for normal figures. Matt J's answer below (Transformation property) seems to work.

サインインしてコメントする。

採用された回答

Matt J
Matt J 2024 年 5 月 23 日 8:36
Can I rotate the volume instead of the camera?
Yes, you can use the Transformation property.
I tried using CameraPosition and CameraDirection of the Viewer3D parent object, but I have no clue how these work
They don't work. You don't have camera properties in a volume rendering such as what you have in a 3D plot.
  2 件のコメント
Carsten
Carsten 2024 年 5 月 23 日 10:50
Thanks, that works. Rotation with rigidtform3d wobbles a bit back and forth, but I think I'll manage with that. I probably need to move the origin (rotation center) of the volume, which I have not found, yet.
Matt J
Matt J 2024 年 5 月 23 日 13:16
You're quite welcome, but please Accept-click the answer to indicate that it addressed your problem.

サインインしてコメントする。

その他の回答 (0 件)

製品


リリース

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by