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


Python ResultsTable.showRowNumbers方法代码示例

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


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

示例1: new_Table

# 需要导入模块: from ij.measure import ResultsTable [as 别名]
# 或者: from ij.measure.ResultsTable import showRowNumbers [as 别名]
def new_Table():
    """Creates a new ResultsTable padded with float("nan"), ie, all
       empty cells will be filled with Java's String.valueOf(Double.NaN)
    """
    new_rt = RT()
    new_rt.setNaNEmptyCells(True);
    new_rt.showRowNumbers(False);
    return new_rt
开发者ID:tferr,项目名称:Scripts,代码行数:10,代码来源:Extract_Bouts_From_Tracks.py

示例2: measure

# 需要导入模块: from ij.measure import ResultsTable [as 别名]
# 或者: from ij.measure.ResultsTable import showRowNumbers [as 别名]
    def measure(self):
        imp = IJ.openImage(self.filename)
        IJ.log("Input file: %s" % self.filename)

        ImageConverter(imp).convertToGray8()

        res = Auto_Threshold().exec(imp, self.myMethod, self.noWhite, self.noBlack, self.doIwhite, self.doIset, self.doIlog, self.doIstackHistogram)

        rt = ResultsTable()
        rt.showRowNumbers(False)
        pa = PA(self.options, PA.AREA + PA.PERIMETER + PA.CIRCULARITY, rt, self.MINSIZE, self.MAXSIZE)
        pa.analyze(imp)
        self.result = self.rtToResult(rt)
        self.mask = imp
开发者ID:whatalnk,项目名称:LAMeasure,代码行数:16,代码来源:LAMeasure.py

示例3: makeParameters

# 需要导入模块: from ij.measure import ResultsTable [as 别名]
# 或者: from ij.measure.ResultsTable import showRowNumbers [as 别名]
	try:
		image = IJ.openImage(options['inputFile'])
	except Exception:
		images = BF.openImagePlus(options['inputFile'])
		image = images[0]
	
	if options['oneShot']:
		results.append(runSimulation(options, image))
	else:
		parameters = makeParameters(options)
		for index in range(0, len(parameters)):
			options.update(parameters[index])
			results.append(runSimulation(options, image))
	
	resultsTable = ResultsTable()
	resultsTable.showRowNumbers(False)

	for i in range(0, len(results)):
		if options['oneShot']:
			localBackground = options['localBackground']
			seedRadius = options['seedRadius']
			gaussXY = options['gaussXY']
			gaussZ = options['gaussZ']
		else:
			localBackground = parameters[i]['localBackground']
			seedRadius = parameters[i]['seedRadius']
			gaussXY = parameters[i]['gaussXY']
			gaussZ = parameters[i]['gaussZ']
		
		resultsTable.incrementCounter()
		resultsTable.addValue("Threshold", localBackground)
开发者ID:rejsmont,项目名称:nuclearP,代码行数:33,代码来源:SegmentationOptimizer.py

示例4: main

# 需要导入模块: from ij.measure import ResultsTable [as 别名]
# 或者: from ij.measure.ResultsTable import showRowNumbers [as 别名]
def main():
    rt = RT.open2(table_file.getAbsolutePath())
    if not rt: return

    log(" --- --- --- ")
    log("Loaded %s" % table_file.getAbsolutePath())
    log("Loading column lists...")

    # Get column indices from imported file
    headings = getColumnHeadings(rt)
    id_col = getColumnIndex(headings, "TID")
    t_col = getColumnIndex(headings, "t [")
    d2p_col = getColumnIndex(headings, "D2P [")
    angle_col = getColumnIndex(headings, u'\u03B1 [deg]')
    delta_col = getColumnIndex(headings, u'\u0394\u03B1 [deg]')
    if angle_col == RT.COLUMN_NOT_FOUND:
        log("Failed to detect index for angle column. Re-trying...")
        angle_col = getColumnIndex(headings, u'? [deg]')
    if delta_col == RT.COLUMN_NOT_FOUND:
        log("Failed to detect index for delta angle column. Re-trying...")
        delta_col = getColumnIndex(headings, u'?? [deg]')
    log("Last column index is %s" % rt.getLastColumn())

    if RT.COLUMN_NOT_FOUND in (id_col, d2p_col, delta_col, angle_col):
        uiservice.showDialog("Error: Some key columns were not found!", "Invalid Table?")
        return

    log("Settings: BOUT_WINDOW= %s, MIN_D2P= %s, DEF_FRAME_INTERVAL= %s"
            % (BOUT_WINDOW, '{0:.4f}'.format(MIN_D2P), DEF_FRAME_INTERVAL))

    # Store all data on dedicated lists
    track_id_rows = rt.getColumnAsDoubles(id_col)
    d2p_rows = rt.getColumnAsDoubles(d2p_col)
    angle_rows = rt.getColumnAsDoubles(angle_col)
    delta_rows = rt.getColumnAsDoubles(delta_col)
    t_rows = rt.getColumnAsDoubles(t_col)

    # Assess n of data points and extract unique path ids
    n_rows = len(track_id_rows)
    row_indices = range(n_rows)
    track_ids = set(track_id_rows)
    n_tracks = len(track_ids)
    log("Table has %g rows" % n_rows)
    log("Table has %g tracks" % n_tracks)

    log("Parsing tracks...")
    for track_id in track_ids:


        for row, next_row in zip(row_indices, row_indices[1:]):

            if track_id_rows[row] != track_id:
                continue

            if not isNumber(angle_rows[row]):
                 rt.setValue("FLAG", row, "NA")
                 continue

            lower_bound = max(0, row - BOUT_WINDOW + 1)
            upper_bound = min(n_rows-1, row + BOUT_WINDOW)
            win_d2p = []
            for _ in range(lower_bound, upper_bound):
                win_d2p.append(d2p_rows[row])

            if sum(win_d2p) <= MIN_D2P * len(win_d2p):
                rt.setValue("FLAG", row, 0)

            else:
                current_angle = angle_rows[row]
                next_angle = angle_rows[next_row]
                current_delta = delta_rows[row]

                flag = -1 if current_angle < 0 else 1
                delta_change = (abs(current_delta) > 90)
                same_sign = ((current_angle<0) == (next_angle<0))
                if delta_change and not same_sign:
                    flag *= -1

                rt.setValue("FLAG", row, flag)
                if next_row == n_rows - 1:
                    rt.setValue("FLAG", next_row, flag)

    if rt.save(table_file.getAbsolutePath()):
        log("Processed table successfully saved (file overwritten)")
    else:
        log("Could not override input file. Displaying it...")
        rt.show(table_file.name)


    log("Creating onset table...")
    onset_rt = RT()
    onset_rt.showRowNumbers(False)

    frame_int = DEF_FRAME_INTERVAL
    if "table" in frame_rate_detection:
        frame_int = getFrameIntervalFromTable(row_indices, track_id_rows, t_rows)
    elif "image" in frame_rate_detection:
        frame_int = getFrameIntervalFromImage(image_file.getAbsolutePath())
    else:
        log("Using default frame rate")
#.........这里部分代码省略.........
开发者ID:tferr,项目名称:Scripts,代码行数:103,代码来源:Tag_and_Onset_MtrackJ_paths.py


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