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


Python ResultsTable.open方法代码示例

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


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

示例1: IJ

# 需要导入模块: from ij.measure import ResultsTable [as 别名]
# 或者: from ij.measure.ResultsTable import open [as 别名]
# IJ BAR: https://github.com/tferr/Scripts#scripts
#
# Imports numeric values copied to the clipboard into the Results table. Useful, since
# BARs that analyze tabular data can only read values from the main IJ "Results" table
#
# Requirements: Requires BAR_-XX.jar to be installed in the plugins folder of IJ
#
# NB: When copying data from withing IJ (e.g., lists from histograms or plot profiles),
# Use Edit>Options>Input/Output... to specify if column headers/row numbers should be
# copied to the clipboard


import os, sys, tempfile
from bar import Utils as barUtils
from ij import IJ
from ij.plugin.filter import Analyzer
import ij.measure.ResultsTable as RT


fd, path = tempfile.mkstemp()
try:
    os.write(fd, barUtils.getClipboardText())
    os.close(fd)
    rt = RT.open(path) #IOException if getClipboardText()==""
    if Analyzer.resetCounter():
        rt.show("Results")
except:
    IJ.error("Could not place clipboard into Results table.")
finally:
    os.remove(path)
开发者ID:imagejan,项目名称:Scripts,代码行数:32,代码来源:Clipboard_to_Results.py

示例2: str

# 需要导入模块: from ij.measure import ResultsTable [as 别名]
# 或者: from ij.measure.ResultsTable import open [as 别名]
    # Process list of images
    for (counter, f) in enumerate(files):

        # Display progress
        IJ.showStatus("Processing file "+ str(counter+1) +"/"+ str(len(files)))

        # Open each image and process it
        imp = IJ.openImage(f)
        myRoutines(imp)

        # Save processed image in out_dir (enforcing .tif extension)
        newpath = os.path.splitext(out_dir + imp.getTitle())[0] +".tif"
        IJ.saveAsTiff(imp, newpath)
        imp.close()

        # Log paths of processed files
        csvWriter.writerow([f, newpath])

    # Display CSV log
    csvFile.close()
    rt = ResultsTable.open(csvPath)
    rt.show("_ProcessedFileList.csv")

    # Proudly inform that processing terminated
    if IJ.showMessageWithCancel("All done","Reveal output directory?"):
        Utils.revealFile(out_dir);

else:
    # Inform no filtered files were found
    IJ.error("No matches for the selected extension(s).")
开发者ID:tferr,项目名称:Scripts,代码行数:32,代码来源:Process_Folder_PY.py

示例3: CompositeImage

# 需要导入模块: from ij.measure import ResultsTable [as 别名]
# 或者: from ij.measure.ResultsTable import open [as 别名]
	image_two = HyperStackConverter.toHyperStack(image,2,z_slices,1)
	image = CompositeImage(image_two)
	image.show()
	
	rt = run_comdet(image)
	rt.save(directory+"/"+filename+"_results.csv" )
	
	image = IJ.getImage()
	if auto_cell:
		
		mask = generate_mask(image_green, auto_cell_thresh)
		fs = FileSaver(mask)
		filepath = directory + "/" + filename + "_mask.tiff" 
		
		fs.saveAsTiff(filepath) 
		rest = ResultsTable.open(directory+"/"+filename+"_results.csv")
		
		#print(rest.getColumnHeadings())
		remove_outside_cell(rest,mask)
		rest.save(directory+"/"+filename+"_results.csv" )
	else:
		rest = rt

	
	
	
	
	
	
	image.setDimensions(2, z_slices, 1)
	image.setOpenAsHyperStack(True)
开发者ID:erickmartins,项目名称:ImageJ_Macros,代码行数:33,代码来源:coloc.py


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