当前位置: 首页>>代码示例>>Python>>正文


Python EditUtil.getLabelName方法代码示例

本文整理汇总了Python中EditUtil.EditUtil.getLabelName方法的典型用法代码示例。如果您正苦于以下问题:Python EditUtil.getLabelName方法的具体用法?Python EditUtil.getLabelName怎么用?Python EditUtil.getLabelName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EditUtil.EditUtil的用法示例。


在下文中一共展示了EditUtil.getLabelName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: create

# 需要导入模块: from EditUtil import EditUtil [as 别名]
# 或者: from EditUtil.EditUtil import getLabelName [as 别名]
  def create(self):
    super(MakeModelEffectOptions,self).create()

    self.goToModelMaker = qt.QPushButton("Go To Model Maker", self.frame)
    self.goToModelMaker.setToolTip( "The Model Maker interface contains a whole range of options for building sets of models and controlling the parameters." )
    self.frame.layout().addWidget(self.goToModelMaker)
    self.widgets.append(self.goToModelMaker)

    self.smooth = qt.QCheckBox("Smooth Model", self.frame)
    self.smooth.checked = True
    self.smooth.setToolTip("When smoothed, the model will look better, but some details of the label map will not be visible on the model.  When not smoothed you will see individual voxel boundaries in the model.  Smoothing here corresponds to Decimation of 0.25 and Smooting iterations of 10.")
    self.frame.layout().addWidget(self.smooth)
    self.widgets.append(self.smooth)

    #
    # model name
    #
    self.nameFrame = qt.QFrame(self.frame)
    self.nameFrame.setLayout(qt.QHBoxLayout())
    self.frame.layout().addWidget(self.nameFrame)
    self.widgets.append(self.nameFrame)

    self.modelNameLabel = qt.QLabel("Model Name: ", self.nameFrame)
    self.modelNameLabel.setToolTip( "Select the name for the newly created model." )
    self.nameFrame.layout().addWidget(self.modelNameLabel)
    self.widgets.append(self.modelNameLabel)

    self.modelName = qt.QLineEdit(self.nameFrame)
    self.modelName.setText( self.getUniqueModelName( EditUtil.getLabelName() ) )
    self.nameFrame.layout().addWidget(self.modelName)
    self.widgets.append(self.modelName)

    self.apply = qt.QPushButton("Apply", self.frame)
    self.apply.objectName = self.__class__.__name__ + 'Apply'
    self.apply.setToolTip("Build a model for the current label value of the label map being edited in the Red slice window.  Model will be created in the background." )
    self.frame.layout().addWidget(self.apply)
    self.widgets.append(self.apply)

    HelpButton(self.frame, "Use this tool build a model.  A subset of model building options is provided here.  Go to the Model Maker module to expose a range of parameters.  Use Merge and Build button in the Advanced... tab to quickly make a model of all defined structures in the merge label map.")

    # Add vertical spacer
    self.frame.layout().addStretch(1)

    self.connections.append( (self.apply, 'clicked()', self.onApply) )
    self.connections.append( (self.goToModelMaker, 'clicked()', self.onGoToModelMaker) )
开发者ID:LucasGandel,项目名称:Slicer,代码行数:47,代码来源:MakeModelEffect.py


注:本文中的EditUtil.EditUtil.getLabelName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。