當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。