Created
December 9, 2016 19:48
-
-
Save PMLLancao/47ab20b75ef1a2964e0630a14098d8e0 to your computer and use it in GitHub Desktop.
Calculation for FRET Maps.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
macro "Ratiometric FRET" { | |
path = getDirectory("Choose a Directory"); | |
list = getFileList(path); | |
length = list.length; | |
File.makeDirectory(path + "Imaging/"); | |
//FRET map creation | |
for (i=0; i<length; i++) { | |
n=i+1; | |
open(path+list[i]); | |
img = File.nameWithoutExtension(); | |
selectWindow(img+".lsm"); | |
run("Subtract Background...", "rolling=300 stack"); | |
run("StackReg", "transformation=Translation"); | |
run("Median...", "radius=1.3 stack"); | |
run("Stack to Images"); | |
run("Duplicate...", "title=mask"); | |
run("Threshold..."); | |
setAutoThreshold("Default dark"); | |
waitForUser("Imagen "+n+" de "+length,"Apply Threshold y click OK"); | |
run("16-bit"); | |
run("Divide...", "value=255"); | |
saveAs("Tiff", path + "Imaging/mask 000" + i); | |
imageCalculator("Divide create 32-bit", "1-0002","1-0001"); | |
imageCalculator("Multiply create","Result of 1-0002","mask 000"+i+".tif"); | |
selectWindow("Result of Result of 1-0002"); | |
saveAs("Tiff", path + "Imaging/fret map " + i); | |
run("Close All"); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So the problem is this line
Too many double quoting! It should be enough with