示例#1
0
                    0)
Win.addMessage("If more than 1 template expected :")
Win.addNumericField("Score_Threshold [0-1]",
                    prefs.getFloat("Score_Threshold", 0.5), 2)
#Win.addNumericField("Min_peak_height relative to neighborhood ([0-1], decrease to get more hits)", prefs.getFloat("Tolerance",0.1), 2)
Win.addNumericField("Maximal_overlap between Bounding boxes [0-1]",
                    prefs.getFloat("MaxOverlap", 0.4), 2)
Win.addMessage("Outputs")
Win.addCheckbox("Add_ROI detected to ROI manager",
                prefs.getInt("AddRoi", True))
Win.addCheckbox("Show_result table", prefs.getInt("ShowTable", False))
Win.addMessage("""If you use this plugin please cite :
Laurent SV Thomas, Jochen Gehrig
bioRxiv 619338; doi: https://doi.org/10.1101/619338""")
Win.addHelp(
    "https://github.com/multi-template-matching/MultiTemplateMatching-Fiji/wiki"
)

Win.showDialog()

if Win.wasOKed():
    template = Win.getNextImage()
    image = Win.getNextImage()
    flipv = Win.getNextBoolean()
    fliph = Win.getNextBoolean()
    angles = Win.getNextString()
    method = Win.getNextChoice()
    n_hit = int(Win.getNextNumber())
    score_threshold = Win.getNextNumber()
    #tolerance   = Win.getNextNumber()
    tolerance = 0
示例#2
0
                    prefs.getFloat("Score_Threshold", 0.5), 2)
#Win.addNumericField("Min_peak_height relative to neighborhood ([0-1], decrease to get more hits)", prefs.getFloat("Tolerance",0.1), 2)
Win.addNumericField("Maximal_overlap between Bounding boxes [0-1]",
                    prefs.getFloat("MaxOverlap", 0.4), 2)

# Outputs
Win.addMessage("Outputs")
Win.addCheckbox("Open_images as a stack (must have identical sizes)",
                prefs.getInt("ShowImages", True))
Win.addCheckbox("Add_ROI detected  to ROI Manager",
                prefs.getInt("AddRoi", True))
Win.addCheckbox("Show_result table", prefs.getInt("ShowTable", False))
Win.addMessage("""If you use this plugin please cite :
Laurent SV Thomas, Jochen Gehrig
bioRxiv 619338; doi: https://doi.org/10.1101/619338""")
Win.addHelp("https://github.com/LauLauThom/MultiTemplateMatching/wiki")

Win.showDialog()

if Win.wasOKed():
    TemplatePath = Win.getNextString()
    ImagePath = Win.getNextString()
    RoiPath = Win.getNextString()
    flipv = Win.getNextBoolean()
    fliph = Win.getNextBoolean()
    angles = Win.getNextString()
    method = Win.getNextChoice()
    n_hit = int(Win.getNextNumber())
    score_threshold = Win.getNextNumber()
    #tolerance   = Win.getNextNumber()
    tolerance = 0
gdp.addCheckbox("Always Select Golgi", golgi_select_def)
gdp.addToSameRow()
gdp.addCheckbox("Always Auto-Detect Golgi", auto_golgi_def)
gdp.addCheckbox("Mean_Max Detection", mean_max_def)
gdp.addToSameRow()
gdp.addCheckbox("Manual Background Selection", man_bck_def)
gdp.addCheckbox("Auto Position Image Window (position x,y):", auto_pos_def)

gdp.addStringField("x: ", xpos_def, 5)

gdp.addStringField("y: ", ypos_def, 5)
gdp.addMessage("------------------------------------------------------------", italicFont)
progress = images_processed(dest)
gdp.addMessage(str(progress[0])+'% Images Assayed' + ' ' +
               '(' + str(progress[2]) + '/' + str(progress[1]) + ')', italicFont)
gdp.addHelp("https://github.com/JohnSargeant-rgb")
gdp.showDialog()
if gdp.wasOKed():
    dest = gdp.getNextString().strip()
    ProFolder = gdp.getNextString().strip()
    Quant = gdp.getNextString().strip()
    Quant_MM = gdp.getNextString().strip()
    transport_c = gdp.getNextChoice()
    file_type = gdp.getNextString().strip()
    golgi_c = gdp.getNextChoice()
    extension = gdp.getNextString().strip()
    zoom_to = int(gdp.getNextChoice())
    radius = gdp.getNextString().strip()
    color_scale = gdp.getNextChoice()
    always_select = gdp.getNextBoolean()
    always_auto = gdp.getNextBoolean()
		ref="reformatted"
	outputf.setText("Output Folders: "+reg+", "+ref)
	return

## START!

gd = GenericDialogPlus('CMTK Registration GUI')

# 0.1) Identify path to CMTK binaries
bindir=cmtkgui.install_dir()
print 'bindir is ' + bindir
# 0.1) Identify path to munger.pl script
#munger='/Users/jefferis/bin/munger.pl'
munger=cmtkgui.tool_path('munger')
print 'munger is ' + munger
gd.addHelp("http://flybrain.mrc-lmb.cam.ac.uk/dokuwiki/doku.php?id=warping_manual:registration_gui")

dirFieldWidth=50
gdMargin=130
gd.addDirectoryField("Registration Folder",None,dirFieldWidth)
regrootf = gd.getStringFields().get(0)
# reference brain
gd.addFileField("Reference Brain", "",dirFieldWidth)
# input directory/image
gd.addDirectoryOrFileField("Input Image or Image Directory",None,dirFieldWidth)
imgdirf = gd.getStringFields().get(2)

gd.setInsets(10,gdMargin,10)
gd.addMessage("Output folders:")
outputf=gd.getMessage()
示例#5
0
    return


## START!
try:
    gd = GenericDialogPlus('CMTK Registration GUI')

    # 0.1) Identify path to CMTK binaries
    bindir = cmtkgui.install_dir()
    print 'bindir is ' + bindir
    # 0.1) Identify path to munger.pl script
    #munger='/Users/jefferis/bin/munger.pl'
    munger = cmtkgui.tool_path('munger')
    print 'munger is ' + munger
    gd.addHelp(
        "http://flybrain.mrc-lmb.cam.ac.uk/dokuwiki/doku.php?id=warping_manual:registration_gui"
    )

    dirFieldWidth = 50
    gdMargin = 130
    gd.addDirectoryField("Registration Folder", None, dirFieldWidth)
    regrootf = gd.getStringFields().get(0)
    # reference brain
    gd.addFileField("Reference Brain", "", dirFieldWidth)
    # input directory/image
    gd.addDirectoryOrFileField("Input Image or Image Directory", None,
                               dirFieldWidth)
    imgdirf = gd.getStringFields().get(2)

    gd.setInsets(10, gdMargin, 10)
    gd.addMessage("Output folders:")