Programmatic and reproducible use of volumeViewer app

4 ビュー (過去 30 日間)
Kevin Mallery
Kevin Mallery 2018 年 4 月 5 日
コメント済み: Divyajyoti Nayak 2025 年 6 月 6 日
Is there a way to visualize a volumetric image in a controlled way? The volumeViewer app gives the quality of visualization I want but I need to be able to reproduce figures with the same viewing angle and alpha map. Is there a way to produce the same volumetric image in a normal figure window so I can use view, xlabel, grid, etc.? I also need to be able to export these visualizations.

回答 (1 件)

Divyajyoti Nayak
Divyajyoti Nayak 2025 年 6 月 4 日
編集済み: Divyajyoti Nayak 2025 年 6 月 6 日
From MATLAB R2022b onwards, the 'viewer3d' command can be used to create a viewer object in a new figure window to visualize 3d images. The properties of the viewer object, such as orientation, camera position, background color, etc. can be modified using dot notation.
viewer = viewer3d(BackgroundColor="white", GradientColor=[0.5 0.5 0.5],Lighting="on");
viewer.CameraPosition = [120 120 200];
viewer.CameraTarget = [120 120 -10];
viewer.CameraUpVector = [0 1 0];
viewer.CameraZoom = 1.5;
Here's some documentation to help you out:
  2 件のコメント
Les Beckham
Les Beckham 2025 年 6 月 4 日
Your answer would likely be more useful if you fix the typo to clarify what version you are referring to here:
"From MATLAB R202b onwards"
^?
Divyajyoti Nayak
Divyajyoti Nayak 2025 年 6 月 6 日
Hi @Les Beckham, thanks for pointing it out.I've fixed the typo.

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by