本文整理汇总了Python中ilastik.applets.dataSelection.opDataSelection.DatasetInfo.sequenceAxis方法的典型用法代码示例。如果您正苦于以下问题:Python DatasetInfo.sequenceAxis方法的具体用法?Python DatasetInfo.sequenceAxis怎么用?Python DatasetInfo.sequenceAxis使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilastik.applets.dataSelection.opDataSelection.DatasetInfo
的用法示例。
在下文中一共展示了DatasetInfo.sequenceAxis方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _get_template_dataset_infos
# 需要导入模块: from ilastik.applets.dataSelection.opDataSelection import DatasetInfo [as 别名]
# 或者: from ilastik.applets.dataSelection.opDataSelection.DatasetInfo import sequenceAxis [as 别名]
def _get_template_dataset_infos(self, input_axes=None, sequence_axis=None):
"""
Sometimes the default settings for an input file are not suitable (e.g. the axistags need to be changed).
We assume the LAST non-batch input in the workflow has settings that will work for all batch processing inputs.
Here, we get the DatasetInfo objects from that lane and store them as 'templates' to modify for all batch-
processing files.
"""
template_infos = {}
# If there isn't an available dataset to use as a template
if len(self.dataSelectionApplet.topLevelOperator.DatasetGroup) == 0:
num_roles = len(
self.dataSelectionApplet.topLevelOperator.DatasetRoles.value)
for role_index in range(num_roles):
template_infos[role_index] = DatasetInfo()
if input_axes:
template_infos[role_index].axistags = vigra.defaultAxistags(
input_axes)
if sequence_axis:
template_infos[role_index].sequenceAxis = sequence_axis
return template_infos
# Use the LAST non-batch input file as our 'template' for DatasetInfo settings (e.g. axistags)
template_lane = len(
self.dataSelectionApplet.topLevelOperator.DatasetGroup) - 1
opDataSelectionTemplateView = self.dataSelectionApplet.topLevelOperator.getLane(
template_lane)
for role_index, info_slot in enumerate(opDataSelectionTemplateView.DatasetGroup):
if info_slot.ready():
template_infos[role_index] = info_slot.value
else:
template_infos[role_index] = DatasetInfo()
if input_axes:
# Support the --input_axes arg to override input axis order, same as DataSelection applet.
template_infos[role_index].axistags = vigra.defaultAxistags(
input_axes)
if sequence_axis:
template_infos[role_index].sequenceAxis = sequence_axis
return template_infos