I am an oceanographer and I have a problem in my research. I am working on the FIJI software (Image J) and I have to process many images to do some quantification.
I have images of samples taken with different Fluorescence : CY3 ; TxET , and DAPI
I would like to do a batch processing thanks to a MACRO code in .ijm allowing to process all my images by doing the following manipulation:
Image n°1 fluo TxET - image n°1 fluo CY3
The goal would be to process all the images of my file.
But the problem is that my code (below) is not working, with the error : Error: ')' expected in line 10: list = getFileList ( inputDir <,> prefixes [ p ] + "_*.tif" ) ;
Here is the code that I started to write :
// Define the folder containing the input images
inputDir = "/path/to/folder/containing/images/",
// Define the file name prefixes for each fluorescence
prefixes = ["CY3", "TxET", "DAPI"];
// Browse all prefixes and subtract the corresponding images
for (p = 0; p < prefixes.length; p++) {
// Get the list of files corresponding to the current prefix
list = getFileList(inputDir, prefixes[p] + "_*.tif");
// Browse all files matching the current prefix
for (i = 0; i < list.length; i++) {
// Get the name of the current file
filename = list[i];
// Extract the number of the current image from the filename
num = parseInt(filename.replace(prefixes[p] + "_", "").replace(".tif", ""));
// Subtract the current image of the current fluorescence with the corresponding image of the CY3 fluorescence
if (prefixes[p] != "CY3") {
cy3Filename = "CY3_" + num + ".tif";
txetFilename = "TxET_" + num + ".tif";
outputFilename = "TxET-CY3_" + num + ".tif";
run("Image Calculator...", "operand1=[" + inputDir + txetFilename + "] operand2=[" + inputDir + cy3Filename + "] operation=Subtract create");
saveAs("Tiff", inputDir + outputFilename);
}
} }
And i expect to obtain a new image with only the fluorescence of TxET - CY3