天天练039-模型创建(Model Maker)

一、学习素材: Slicercn002

二、学习目标:熟悉Model Maker的用法

image Model Maker(Wiki)


帮助:

模块Model Maker进入方法:

在Editor模块中选中MakeModelEffect工具,并点击Go To Model Maker。

模块选择导航栏搜索“Model Maker”选择模块

前提条件是先通过工具或者模块制作好标签图,在Editor模块中的融合体数据就是标签图,当然也可以通过其他模块进行创建,模型和标签图之间可以进行转换。

在Editor模块中应用阈值工具如下图设置后点击应用(Apply)

通过改变岛工具更改标签图的颜色(标签值)

如下图进行参数设置,参数的详细设置及含义参见 Model Maker Wiki

完成建模之后如下图,背板透明度在Model模块中进行调节,后续章节进行讲解。

在Model模块中可以进行更多设置

GIF


三、思考题:

  1. 如何指定某一标签进行建模操作?

  2. 如何指定某几个不连续的标签进行建模操作?

  3. 如何指定某一组连续标签进行建模操作?

  4. Generate All Models、Labels、Start Label和End Label三组参数的优先级是什么?

    参考提示

    优先级就是选中甲参数后,不再执行乙和丙参数,即使已经填写了其他参数,则甲参数具有最高优先级。

  5. 如果不希望进行平滑(Smooth)和抽取(Decimate)操作,相应参数如何设置?

  6. 在Editor模块中可以快速进行模型创建,分别是哪两种方法?


:pushpin: Model Maker Wiki的译文请大家勘误,思考题答案请在Wiki中查找。


天天练主题索引


1 个赞

image Model Maker(Wiki)


Module Description


The Modelmaker is used to create 3D surface models from segmented image data, called label maps. Label maps can be the result of automated segmentation or interactive editing.

Modelmaker用于从分割图像数据创建3D曲面模型,称为标记图。 标记图可以是自动分割或交互式编辑的结果。


More details on the algorithm can be found in References.

有关该算法的更多详细信息,请参见参考资料


Create 3D surface models from segmented data.

从分割数据创建3D曲面模型。

Models are imported into Slicer under a model hierarchy node in a MRML scene. The model colors are set by the color table associated with the input volume (these colours will only be visible if you load the model scene file).

模型在MRML场景中的模型层次结构节点下导入到Slicer中。 模型颜色由与输入体数据相关的颜色表设置(这些颜色只有在加载模型场景文件时才可见)。


IO:

Specify an Input Volume that is a segmented label map volume. Create a new Models hierarchy to provide a structure to contain the return models created from the input volume.

指定一个输入体数据,它是一个分割标签映射体数据。 创建一个新的* 模型 *层次结构,以提供一个结构来包含从输入体数据创建的返回模型。


Create Multiple:

If you specify a list of Labels , it will over ride any start/end label settings.

如果您指定标签列表,它将优先于任何开始/结束标签设置。

If you click Generate All it will over ride the list of lables and any start/end label settings.

如果您点击生成所有,它将优先于标签列表和任何开始/结束标签设置。


Model Maker Parameters:

You can set the number of smoothing iterations, target reduction in number of polygons (decimal percentage). Use 0 and 1 if you wish no smoothing nor decimation.

您可以设置平滑迭代次数,减少多边形数量(十进制百分比)。 如果不希望平滑或抽取,请使用0和1。

You can set the flags to split normals or generate point normals in this pane as well.

在该窗格中您还可以设置拆分法线或生成点法线的标识。

You can save a copy of the models after intermediate steps (marching cubes, smoothing, and decimation if not joint smoothing, otherwise just after decimation); these models are not saved in the mrml file, turn off deleting temporary files first in the python window:
slicer.modules.modelmaker.cliModuleLogic().DeleteTemporaryFilesOff()

您可以在中间步骤后保存模型的副本(如果不是联合平滑,则可以在行进立方体,平滑和抽取之后保存,否则就在抽取后)。 这些模型不保存在mrml文件中,关闭python窗口中首先删除临时文件:slicer.modules.modelmaker.cliModuleLogic().DeleteTemporaryFilesOff()


Parameters(参数):

IO : Input/output parameters(输入输出参数)

Input Volume (InputVolume): Input label map. The Input Volume drop down menu is populated with the label map volumes that are present in the scene, select one from which to generate models.

输入体数据(InputVolume):输入标记图。从“输入体数据”下拉菜单中选择一个场景中存在的标签映射体数据来生成模型。


Models (ModelSceneFile): Generated models, under a model hierarchy node. Models are imported into Slicer under a model hierarchy node, and their colors are set by the color table associated with the input label map volume. The model hierarchy node must be created before running the model maker, by selecting Create New ModelHierarchy from the Models drop down menu. If you’re running from the command line, a model hierarchy node in a new mrml scene will be created for you.

模型(模型场景文件):生成的模型,位于模型层次结构节点下。在模型层次节点下的模型被导入到Slicer中,模型的颜色由与输入标签映射体数据相关的颜色表设置。模型层次结构节点必须在运行模型创建之前创建,通过从模型下拉菜单中选择创建新模型层次结构。如果你从命令行运行,将为您创建新mrml场景中的模型层次结构节点。


Create Multiple (创建多个):

Create more than one model at the same time, used for continuous ranges of labels.

同时创建多个模型,用于连续范围的标签。

Model Name (Name): Name to use for this model. Any text entered in the entry box will be the starting string for the created model file names. The label number and the color name will also be part of the file name. If making multiple models, use this as a prefix to the label and color name.

模型名称(名称):用于此模型的名称。 在输入框中输入的任何文本都将是创建的模型文件名的起始字符串。 标签号码和颜色名称也将成为文件名称的一部分。 如果制作多个模型,请将标签和颜色名称用作前缀。

Generate All Models (GenerateAll): Generate models for all labels in the input volume. select this option if you want to create all models that correspond to all values in a labelmap volume (using the Joint Smoothing option below is useful with this option). Ignores Labels, Start Label, End Label settings. Skips label 0.

生成所有模型(GenerateAll):会将输入体数据中的所有标签生成模型。 如果要创建对应于标签映射体数据中所有值的所有模型(使用下面的“联合平滑”选项对此选项有用),请选择此选项。 忽略标签,开始标签,结束标签设置。 跳过标签0。


Model Maker Parameters:(模型创建参数)

Labels (Labels): A comma separated list of label values from which to make models. f you specify a list of Labels, it will override any start/end label settings. If you click Generate All Models it will override the list of labels and any start/end label settings.

标签(标签):用于制作模型的标签值列表,多个标签用英文逗号分隔。 如果您指定了标签列表,它将优先于任何开始/结束标签设置。 如果单击“生成所有模型”,它将优先于标签列表和任何开始/结束标签设置。

Start Label (StartLabel): If you want to specify a continuous range of labels from which to generate models, enter the lower label here. Voxel value from which to start making models. Used instead of the label list to specify a range (make sure the label list is empty or it will over ride this).

开始标签(StartLabel):如果您想要指定连续范围的标签来生成模型,请在此处输入较低的标签。 从中开始制作模型的体素值。 用来代替标签列表来指定一个范围(确保标签列表是空的,否则将优先执行标签表)。

End Label (EndLabel): If you want to specify a continuous range of labels from which to generate models, enter the higher label here. Voxel value up to which to continue making models. Skip any values with zero voxels.

结束标签(EndLabel):如果您想要指定连续范围的标签来生成模型,请在此处输入较高的标签。 体素值可以继续制作模型。 用零体素(-1)跳过任何值。

Skip Un-Named Labels (SkipUnNamed): Select this to not generate models from labels that do not have names defined in the color look up table associated with the input label map. If true, only models which have an entry in the color table will be generated. If false, generate all models that exist within the label range.

跳过未命名的标签(SkipUnNamed):选择此项不会从与输入标记图关联的颜色表中查找没有定义名称的标签生成模型。 如果勾选则只会生成颜色表中有条目的模型。 如果取消勾选则生成标签范围内存在的所有模型。

Joint Smoothing (JointSmoothing): This will ensure that all resulting models fit together smoothly, like jigsaw puzzle pieces. Otherwise the models will be smoothed independently and may overlap.

联合平滑(JointSmoothing):这将确保所有生成的模型能够平滑地合在一起,就像拼图游戏一样。 否则模型将被独立平滑并可能重叠。

Smooth (Smooth): Here you can set the number of smoothing iterations for Laplacian smoothing, or the degree of the polynomial approximating the windowed Sinc function. Use 0 if you wish no smoothing.

平滑(Smooth):您可以在此处设置拉普拉斯平滑(Laplacian)的平滑迭代次数或近似加窗Sinc函数的多项式的阶数。 如果您不希望平滑请设置为0。

Filter Type (FilterType): You can control the type of smoothing done on the models by selecting a filter type of either Sinc or Laplacian.

滤波类型(Filter Type):您可以通过选择Sinc或Laplacian的滤波器类型来控制在模型上完成的平滑类型。

Decimate (Decimate): Chose the target reduction in number of polygons as a decimal percentage (between 0 and 1) of the number of polygons. Specifies the percentage of triangles to be removed. For example, 0.1 means 10% reduction and 0.9 means 90% reduction.

抽取(Decimate):选择多边形数量的目标减少数作为多边形数量的小数百分比(介于0和1之间)。 指定要删除的三角形的百分比。 例如,0.1意味着减少10%,而0.9意味着减少90%。

Split Normals (SplitNormals): Splitting normals is useful for visualizing sharp features. However it creates holes in surfaces which affects measurements.

分割法线(SplitNormals):分割法线对于可视化尖锐特征非常有用。 但是它会在表面上产生影响尺寸的小孔。

Point Normals (PointNormals): Turn this flag on if you wish to calculate the normal vectors for the points.

点法线(PointNormals):如果您想计算点的法向量,请打开此标志。

Pad (Pad): Pad the input volume with zero value voxels on all 6 faces in order to ensure the production of closed surfaces. Sets the origin translation and extent translation so that the models still line up with the unpadded input volume.

Pad (Pad): 在输入体数据的6个面上填充零值体素以确保产生封闭表面。 设置原点转换和范围转换,以便模型仍然与未填充的输入体数据对齐。


Debug :(调试)

Color Hierarchy (ModelHierarchyFile): A mrml file that contains a template model hierarchy tree with a hierarchy node per color used in the input volume’s color table. Color names used for the models are matched to template hierarchy names to create a multi level output tree. Create a hierarchy in the Models GUI and save a scene, then clean it up to remove everything but the model hierarchy and display nodes.

颜色层次结构(ModelHierarchyFile):一个mrml文件,其中包含模板模型层次结构树,并在输入体数据颜色表中使用每种颜色的层次节点。 用于模型的颜色名称与模板层次结构名称相匹配,以创建多级输出树。 在Models GUI中创建一个层次结构并保存一个场景,然后将其清理干净,除去模型层次结构和显示节点之外的所有内容。

Save Intermediate Models (SaveIntermediateModels): You can save a copy of the models after each of the intermediate steps (marching cubes, smoothing, and decimation if not joint smoothing, otherwise just after decimation). These intermediate models are not saved in the mrml file, you have to load them manually after turning off deleting temporary files in they python console (View ->Python Interactor) using the following command slicer.modules.modelmaker.cliModuleLogic().DeleteTemporaryFilesOff().

保存中间模型(SaveIntermediateModels):您可以在每个中间步骤之后保存模型的副本(如果不是联合平滑,则进行立方体,平滑和抽取,否则在抽取之后)。 这些中间模型不保存在mrml文件中,你必须关闭并删除他们的临时文件,之后再手动加载它们,在Python控制台中(View →python console)使用下面的命令: slicer.modules.modelmaker.cliModuleLogic().DeleteTemporaryFilesOff().

Debug (debug): turn this flag on in order to see debugging output (look in the Error Log window that is accessed via the View menu)

调试(debug):打开此标志以查看调试输出(查看通过查看菜单访问的错误日志窗口)

:sweat:看的眼疼,看完不知道怎么用啦