//SAMA
version=0.97;
//Copyright (C) 2015 Maël Montévil and Tessie Paulose
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
chosendir = getDirectory("Choose the original images Directory");
list = getFileList(chosendir);
dir=File.getParent(chosendir)+"/";
Rdatadir =dir+"SAMA-Image data/";
run("Clear Results");
plate="Experiment1";
well="Replicate1";
addTreatment=true;
Treatments = newArray(0);
Treatmentsb = newArray(0);
manual=false;
while(addTreatment){
Dialog.create("Add a new experimental parameter");
Dialog.addMessage("WARNING: this process will overwrite your former conditions.csv file if any.");
Dialog.addMessage("Add a new experimental parameter.");
Dialog.addString("Name of the experimental parameter","Condition1", 20);
Dialog.addCheckbox("Add another experimental parameter?", false);
Dialog.addCheckbox("Input the conditions for each stack here (tedious for large datasets)?", manual);
Dialog.addMessage("Alternatively you can complete consitions.csv with Excel or Openoffice.");
Dialog.show();
Treatments = Array.concat(Treatments,Dialog.getString());
Treatmentsb = Array.concat(Treatmentsb,"");
addTreatment=Dialog.getCheckbox();
manual=Dialog.getCheckbox();
}
for (i=0; i