本文整理汇总了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) )