Пример #1
0
def getOK(text):
	gd = GenericDialog('User prompt')
	gd.addMessage(text)
	gd.hideCancelButton()
	gd.enableYesNoCancel()
	gd.showDialog()
	return gd.wasOKed()
def get_metadata_table_filepath():
    """Get a the metadata template filename"""
    d = GenericDialog("Metadata Template")
    d.addMessage("Please choose a metadata template")
    d.enableYesNoCancel("OK", "Cancel")
    d.hideCancelButton()
    d.showDialog()
    if d.wasOKed():
        od = OpenDialog("Metadata File")
        return os.path.join(od.getDirectory(), od.getFileName())
    else:
        return
from ij.gui import GenericDialog

gd = GenericDialog("How to cite the plugins")
gd.addMessage("""If you use these plugins, please cite : 
		
		Thomas LSV, Schaefer F and Gehrig J. 
		Fiji plugins for qualitative image annotations: routine analysis and application to image classification
		[version 2; peer review: 2 approved, 1 approved with reservations]. 
		F1000Research 2021, 9:1248 
		doi : 10.12688/f1000research.26872.2""")

#URL = r"https://doi.org/10.12688/f1000research.26872.1/" # mind the last slash at the end of URL, otherwise not working
URL = r"https://f1000research.com/articles/9-1248"
gd.addHelp(URL)
gd.setHelpLabel("Article page")
gd.hideCancelButton()
gd.showDialog()
Пример #4
0
def display_msg(title, message):
    gd = GenericDialog(title)
    gd.addMessage(message)
    gd.hideCancelButton()
    gd.showDialog()
Пример #5
0
uThres = gdp.getNextNumber()
uGsize = gdp.getNextNumber()
uGshape = gdp.getNextNumber()
uGshapemax = gdp.getNextNumber()
uOverlap = gdp.getNextNumber()
uExclude = gdp.getNextChoice()

# Files will automatically be output to a new Fiji_Analysis directory. If this directory already exists, files will be overwritten. This checks to make sure the directory does not yet exist.
if path.exists(outdir + File.separatorChar +
               "Fiji_Analysis") and path.isdir(outdir + File.separatorChar +
                                               "Fiji_Analysis"):
    gdchk = GenericDialog("WARNING")
    gdchk.addMessage(
        "Analysis folder already exists. Choose a different directory to avoid overwritng your current data"
    )
    gdchk.hideCancelButton()
    gdchk.showDialog()
    print "Analysis folder already exists. Choose a new directory to avoid overwriting your current analysis"
    uknow = gdchk.wasOKed()
    if uknow == True:
        IJ.getImage()

#Creates Fiji_Analysis directory.
File(outdir + File.separatorChar + "Fiji_Analysis").mkdir()
analysisOut = outdir + File.separatorChar + "Fiji_Analysis"
print analysisOut

inputPaths = [path_wt, path_dic, path_mut, path_bg]

# Since the script is critically depedent on file input order, files are duplicated and saved with easily referenced names in the new Directory.  0 = WT, 1 = DIC, 2 = MUT, 3 = BG. ALWAYS.
newPaths = []