主要内容

Explore 3-D Volumetric Data with Volume Viewer App

This example shows how to look at and explore 3-D volumetric data using the Volume Viewer app. Volume rendering is highly dependent on defining an appropriate alphamap so that structures in your data that you want to see are opaque and structures that you do not want to see are transparent. To illustrate, the example loads an MRI study of the human head into the Volume Viewer and explores the data using the visualization capabilities of the Volume Viewer.

将卷数据加载到卷查看器中

该示例的这一部分显示了如何将体积数据加载到卷查看器中。

Load the MRI data of a human head from a MAT-file into the workspace. The MRI data is a modified subset of the BraTS data set [1]. This operation creates a variable namedDin your workspace that contains the volumetric data. Use thesqueezecommand to remove the singleton dimension from the data.

loadMRID = squeeze(D); whos
Name Size Bytes Class Attributes D 128x128x27 442368 uint8 map 89x3 2136 double siz 1x3 24 double

Open the音量查看器应用程序。来自Matlab®工具分,打开“应用”选项卡以及图像处理和计算机视觉下,单击。You can also open the app using thevolumeViewercommand.

Load volumetric data into音量查看器应用程序。点击导入量。您可以通过指定其文件名来加载图像或从工作区加载变量。如果您具有使用多个文件代表卷的DICOM格式的体积数据,则可以指定DICOM文件夹名称。选择Import From Workspace选项,因为数据在工作空间中。

Select the workspace variable in theImport from Workspacedialog box and click好的

To start a new instance of the音量查看器, 点击新会话

创建新会话时,此选项会删除当前查看器中的所有数据。点击Yesto create the new session.

查看卷查看器中的卷数据

In this part of the example, you decide how you want to view your data.音量查看器提供几种选择。

查看卷音量查看器应用程序。默认,音量查看器将数据显示为卷,但您也可以将其视为切片平面。显示为体积的MRI数据可识别为人头。要探索音量,请使用鼠标轮或右键单击在图像上放大和缩放。您还可以通过将光标放在图像窗口中,按下鼠标并移动光标来旋转音量。您始终在卷的中心放大或旋转。轴的位置方向轴window reflects the spatial orientation of the image as you rotate it.

要更改显示窗口中使用的背景颜色,请单击Background Color并选择一种颜色。

View the MRI data as a set of slice planes. ClickSlice Planes。您也可以放大并旋转数据的视图。使用三个切片窗口中的滚动条查看任何平面中的单个切片。

Continue using音量查看器功能,直到您获得数据的最佳视图为止。

Adjust View of Volume Data in Volume Viewer

在示例的这一部分中,您可以调整体积数据的视图音量查看器应用程序。

点击Volume返回将数据视为卷,并使用的功能音量查看器为了获得最佳的数据可视化。音量查看器提供几个空间参考选项,使您可以更真实地了解头部音量。(在默认视图中,头部似乎是扁平的。)

  • 指定尺寸- 您可以在x,y和z方向上指定尺寸。

  • Upsample To Cube- -音量查看器计算一个比例因子,该比例因素使每个维度中的样品数量与体积中最大的维度相同。此设置可以使非侧面采样数据看起来更正确地缩放。

  • Use Volume Metadata- -If the data file includes resolution data in its metadata,音量查看器使用元数据并显示量的量表。音量查看器选择Use Volume Metadata选项,默认情况下,如果存在元数据。

使用渲染编辑器提炼视图

示例的这一部分描述了如何使用音量查看器渲染编辑器来修改您对数据的看法。使用渲染编辑器,您可以:

  • 选择overall viewing approach: Volume Rendering, Maximum Intensity Projection, or Isosurface.

  • Modify the alphamap by specifying a preset alphamap, such as ct-bone, or by customizing the alphamap using the Opacity/Image Intensity curve.

  • Specify the colormap used in the visualization.

  • Specify the lighting in the visualization.

选择观看方法。

音量查看器offers several viewing approaches for volumes. The最大强度投影(MIP) option looks for the voxel with the highest intensity value for each ray projected through the data. MIP can be useful for revealing the highest intensity structure within a volume. You can also view the volume as an等法表

指定alphamap。

Volume rendering is highly dependent on defining an appropriate alphamap so that structures you want to see are opaque and structures you do not want to see are transparent. The Rendering Editor lets you define the opacity and transparency of voxel values throughout the volume. You can choose from a set of alphamap presets that automatically achieve certain well-defined effects. For example, to define a view that works well with CT bone data, select theCT Bonerendering preset. By default,音量查看器使用简单的线性关系,但是每个预设会更改图的曲线,以使某些数据值或多或少地不透明度。您可以直接操纵剧情来自定义alphamap。

指定菌落。

当与体素强度和不透明度一起使用时,颜色是体积可视化的重要元素。在渲染编辑器中,您可以从预定义的Matlab colormaps的列表中进行选择,例如jetparula。您还可以指定已定义为工作区中变量的自定义colormap。您还可以使用交互式色条刻度更改任何colormap的结肠胶片。例如,要减轻可视化中的颜色值,请单击颜色栏以创建圆形滑块。要修改结肠座,以使更多的价值映射到较浅的颜色,请将滑块移至左侧。您可以在颜色栏上创建多个滑块以定义其他Colormappings。

修改照明效果。默认,音量查看器uses certain lighting effects on the volume display. You can turn off these lighting effects by clearing the灯光check box.

保存音量查看器渲染和相机配置设置

After working in音量查看器to achieve the best view of your data, you can save your rendering settings and camera configuration.音量查看器stores this information in a structure, calledconfigby default, that it writes to the workspace. You can use this structure with the沃尔肖Labelvolshow重新创建您获得的视图的功能音量查看器

To save rendering and camera configuration settings, click出口然后单击Rendering and Camera Configurations选项。

指定结构的名称音量查看器creates or accept the default name (config) and click好的

参考

[1] Medical Segmentation Decathlon. "Brain Tumours." Tasks. Accessed May 10, 2018.http://medicaldecathlon.com/

The BraTS data set is provided by Medical Segmentation Decathlon under the CC-BY-SA 4.0 license. All warranties and representations are disclaimed. See the license for details. MathWorks® has modified the subset of data used in this example. This example uses the MRI data of one scan from the original data set, saved to a MAT file.